-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathwex.go
33 lines (32 loc) · 765 Bytes
/
wex.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Package wex provides native Go client for interacting with WEX (former BTC-E) Public API v3 and Trading API.
//
// Example usage:
//
// package main
//
// import (
// "fmt"
// wex "github.com/onuryilmaz/go-wex"
// )
//
// func main() {
//
// api := wex.API{}
//
// ticker, err := api.Public.Ticker([]string{"btc_usd"})
// if err == nil {
// fmt.Printf("BTC buy price: %.3f \n", ticker["btc_usd"].Buy)
// fmt.Printf("BTC sell price: %.3f \n", ticker["btc_usd"].Sell)
// }
//
// info, err := api.Trade.GetInfoAuth("API_KEY", "API_SECRET")
// if err == nil {
// fmt.Printf("BTC amount: %.3f \n", info.Funds["btc"])
// }
// }
package wex
// API allows to use public and trade APIs of BTC-E
type API struct {
Public PublicAPI
Trade TradeAPI
}