-
Notifications
You must be signed in to change notification settings - Fork 7
/
order_create_test.go
39 lines (34 loc) · 1.02 KB
/
order_create_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
package bitopro
import (
"encoding/json"
"testing"
)
func TestAuthAPI_CreateOrderLimitBuy(t *testing.T) {
// satoshi amount
if json, err := json.MarshalIndent(getAuthClient().CreateOrderLimitBuy(1, "eth_twd", "11", "1"), "", " "); err != nil {
t.Error(err)
} else {
t.Logf("\n%s", string(json))
}
}
func TestAuthAPI_CreateOrderLimitSell(t *testing.T) {
if json, err := json.MarshalIndent(getAuthClient().CreateOrderLimitSell(1, "eth_twd", "1", "1"), "", " "); err != nil {
t.Error(err)
} else {
t.Logf("\n%s", string(json))
}
}
func TestAuthAPI_CreateOrderMarketBuy(t *testing.T) {
if json, err := json.MarshalIndent(getAuthClient().CreateOrderMarketBuy(1, "eth_twd", "1000"), "", " "); err != nil {
t.Errorf("err=%+v\n", err)
} else {
t.Logf("err=nil, res=%s", string(json))
}
}
func TestAuthAPI_CreateOrderMarketSell(t *testing.T) {
if json, err := json.MarshalIndent(getAuthClient().CreateOrderMarketSell(1, "eth_twd", "1"), "", " "); err != nil {
t.Error(err)
} else {
t.Logf("\n%s", string(json))
}
}