-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitso_test.go
58 lines (45 loc) · 1.02 KB
/
bitso_test.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package bitso
import (
"fmt"
"testing"
)
const (
// Add your key here
KEY = ""
// Add your secret key here
SECRET = ""
)
func TestBitso(t *testing.T) {
api := NewAPI(KEY, SECRET)
books, err := api.AvailableBooks()
fmt.Println(err)
fmt.Printf("%+v\n", books)
tickers, err := api.Tickers()
fmt.Println(err)
fmt.Printf("%+v\n", tickers)
ticker1, err := api.Ticker("")
fmt.Println(err)
fmt.Printf("%+v\n", ticker1)
ticker2, err := api.Ticker("btc_mxn")
fmt.Println(err)
fmt.Printf("%+v\n", ticker2)
orderbook, err := api.OrderBook("btc_mxn", false)
fmt.Println(err)
fmt.Printf("%+v\n", orderbook)
trades, err := api.Trades("btc_mxn", "", "", 10)
fmt.Println(err)
fmt.Printf("%+v\n", trades)
api.Key = KEY
api.Secret = SECRET
api.Devel = true
accountstatus, err := api.AccountStatus()
fmt.Println(err)
fmt.Printf("%+v\n", accountstatus)
balance, err := api.Balance()
fmt.Println(err)
fmt.Printf("%+v\n", balance)
fees, err := api.Fees()
fmt.Println(err)
fmt.Printf("%+v\n", fees)
// fmt.Println(api)
}