/
model.go
93 lines (79 loc) · 1.33 KB
/
model.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package main
import (
"encoding/json"
)
type orderReq struct {
Symbol string `json:"symbol"`
Type string `json:"type"`
Side string `json:"side"`
Price string `json:"price"`
Quantity string `json:"quantity"`
MsgNo string `json:"msgNo"`
}
/* -------------------------------------------- */
type baseResp struct {
Code string
Msg string
Timestamp int64
Data interface{}
}
type serverTime struct {
baseResp
Data int64
}
type coinConfig struct {
Name string
FullName string
DepositStatus string
WithDrawStatus string
MinWithDraw json.Number
WithDrawFee json.Number
TakerFeeRate json.Number
MakerFeeRate json.Number
}
type spotConfig struct {
Symbol string
Accuracy []string
}
type contractConfig struct {
Symbol string
MakerFeeRate string
TakerFeeRate string
}
type configResp struct {
baseResp
Data struct {
CoinConfig []coinConfig
SpotConfig []spotConfig
ContractConfig []contractConfig
}
}
type tickerResp struct {
baseResp
Data []struct {
P string
C string
S string
V string
H string
L string
Ver string
}
}
type orderResp struct {
baseResp
Data struct{
Symbol string
OrderId string
}
}
type assetsResp struct {
baseResp
Data []struct{
CoinType string
Count string
Frozen string
Type string
BtcQuantity string
}
}