-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbalance.go
48 lines (44 loc) · 952 Bytes
/
balance.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
package hitbtc
/*
{"balance": [
{"currency_code": "BTC","cash": 0.045457701,"reserved": 0.01},
{"currency_code": "EUR","cash": 0.0445544,"reserved": 0},
{"currency_code": "LTC","cash": 0.7,"reserved": 0.1},
{"currency_code": "USD","cash": 2.9415029,"reserved": 1.001}
]}
*/
type OneTradeBalance struct {
Currency string `json:"currency_code"`
Cash float64 `json:"cash,string"`
Resvered float64 `json:"reserved,string"`
}
type TradeBalance struct {
Balance []OneTradeBalance `json:"balance"`
}
/*
{
"balance": [
{
"currency_code": "USD",
"balance": 13.12
},
{
"currency_code": "EUR",
"balance": 0
},
{
"currency_code": "LTC",
"balance": 1.07
},
{"currency_code": "BTC",
"balance": 11.9
}
]}
*/
type OnePaymentBalance struct {
Currency string `json:"currency_code"`
Balance float64 `json:"balance,string"`
}
type PaymentBalance struct {
Balance []OnePaymentBalance `json:"balance"`
}