-
Notifications
You must be signed in to change notification settings - Fork 34
/
walletResponse.go
291 lines (270 loc) · 10.4 KB
/
walletResponse.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
package spotclient
import "github.com/shopspring/decimal"
// AllCoinInfoResponse all coin info response
type AllCoinInfoResponse []struct {
Coin string `json:"coin"`
DepositAllEnable bool `json:"depositAllEnable"`
Free string `json:"free"`
Freeze string `json:"freeze"`
IPOAble string `json:"ipoable"`
IPOIng string `json:"ipoing"`
IsLegalMoney bool `json:"isLegalMoney"`
Locked string `json:"locked"`
Name string `json:"name"`
NetworkList []struct {
AddressRegex string `json:"addressRegex"`
Coin string `json:"coin"`
DepositDesc string `json:"depositDesc,omitempty"`
DepositEnable bool `json:"depositEnable"`
IsDefault bool `json:"isDefault"`
MemoRegex string `json:"memoRegex"`
MinConfirm int `json:"minConfirm"`
Name string `json:"name"`
Network string `json:"network"`
ResetAddressStatus bool `json:"resetAddressStatus"`
SpecialTips string `json:"specialTips"`
UnLockConfirm int `json:"unLockConfirm"`
WithdrawDesc string `json:"withdrawDesc,omitempty"`
WithdrawEnable bool `json:"withdrawEnable"`
WithdrawFee string `json:"withdrawFee"`
WithdrawMin string `json:"withdrawMin"`
InsertTime int64 `json:"insertTime,omitempty"`
UpdateTime int64 `json:"updateTime,omitempty"`
WithdrawIntegerMultiple string `json:"withdrawIntegerMultiple,omitempty"`
} `json:"networkList"`
Storage string `json:"storage"`
Trading bool `json:"trading"`
WithdrawAllEnable bool `json:"withdrawAllEnable"`
Withdrawing string `json:"withdrawing"`
}
// SpotSnapshotResponse spot snapshot response
type SpotSnapshotResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
SnapshotVos []struct {
Data struct {
Balances []struct {
Asset string `json:"asset"`
Free string `json:"free"`
Locked string `json:"locked"`
} `json:"balances"`
TotalAssetOfBtc string `json:"totalAssetOfBtc"`
} `json:"data"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
} `json:"snapshotVos"`
}
// FuturesSnapshotResponse futures snapshot response
type FuturesSnapshotResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
SnapshotVos []struct {
Data struct {
Assets []struct {
Asset string `json:"asset"`
MarginBalance string `json:"marginBalance"`
WalletBalance string `json:"walletBalance"`
} `json:"assets"`
Position []struct {
EntryPrice string `json:"entryPrice"`
MarkPrice string `json:"markPrice"`
PositionAmt string `json:"positionAmt"`
Symbol string `json:"symbol"`
UnRealizedProfit string `json:"unRealizedProfit"`
} `json:"position"`
} `json:"data"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
} `json:"snapshotVos"`
}
// MarginSnapshotResponse margin snapshot response
type MarginSnapshotResponse struct {
Code int `json:"code"`
Msg string `json:"msg"`
SnapshotVos []struct {
Data struct {
MarginLevel string `json:"marginLevel"`
TotalAssetOfBtc string `json:"totalAssetOfBtc"`
TotalLiabilityOfBtc string `json:"totalLiabilityOfBtc"`
TotalNetAssetOfBtc string `json:"totalNetAssetOfBtc"`
UserAssets []struct {
Asset string `json:"asset"`
Borrowed string `json:"borrowed"`
Free string `json:"free"`
Interest string `json:"interest"`
Locked string `json:"locked"`
NetAsset string `json:"netAsset"`
} `json:"userAssets"`
} `json:"data"`
Type string `json:"type"`
UpdateTime int64 `json:"updateTime"`
} `json:"snapshotVos"`
}
// SAPIWithdrawResponse sapi withdraw response
type SAPIWithdrawResponse struct {
ID string `json:"id"`
}
// DepositHistoryNetworkResponse DepositHistoryNetwork response
type DepositHistoryNetworkResponse []struct {
Amount string `json:"amount"`
Coin string `json:"coin"`
Network string `json:"network"`
Status int `json:"status"`
Address string `json:"address"`
AddressTag string `json:"addressTag"`
TxID string `json:"txId"`
InsertTime int64 `json:"insertTime"`
TransferType int `json:"transferType"`
ConfirmTimes string `json:"confirmTimes"`
}
// DepositHistoryResponse DepositHistory response
type DepositHistoryResponse struct {
DepositList []struct {
InsertTime int64 `json:"insertTime"`
Amount decimal.Decimal `json:"amount"`
Asset string `json:"asset"`
Address string `json:"address"`
TxID string `json:"txId"`
Status int `json:"status"`
AddressTag string `json:"addressTag,omitempty"`
} `json:"depositList"`
Success bool `json:"success"`
}
// WithdrawHistoryNetworkResponse withdraw network response
type WithdrawHistoryNetworkResponse []struct {
Address string `json:"address"`
Amount string `json:"amount"`
ApplyTime string `json:"applyTime"`
Coin string `json:"coin"`
ID string `json:"id"`
WithdrawOrderID string `json:"withdrawOrderId,omitempty"`
Network string `json:"network"`
TransferType int `json:"transferType,omitempty"`
Status int `json:"status"`
TxID string `json:"txId"`
}
// WithdrawHistoryResponse withdraw response
type WithdrawHistoryResponse struct {
WithdrawList []struct {
ID string `json:"id"`
WithdrawOrderID interface{} `json:"withdrawOrderId"`
Amount decimal.Decimal `json:"amount"`
TransactionFee decimal.Decimal `json:"transactionFee"`
Address string `json:"address"`
Asset string `json:"asset"`
TxID string `json:"txId"`
ApplyTime int64 `json:"applyTime"`
Status int `json:"status"`
AddressTag string `json:"addressTag,omitempty"`
} `json:"withdrawList"`
Success bool `json:"success"`
}
// DepositAddressNetworkResponse deposit address response
type DepositAddressNetworkResponse struct {
Address string `json:"address"`
Coin string `json:"coin"`
Tag string `json:"tag"`
Url string `json:"url"`
}
// DepositAddressResponse deposit address response
type DepositAddressResponse struct {
Address string `json:"address"`
Success bool `json:"success"`
AddressTag string `json:"addressTag"`
Asset string `json:"asset"`
}
// SAPIAccountResponse account response
type SAPIAccountResponse struct {
Data string `json:"data"`
}
// AccountSAPIStatusResponse account API trading status response
type AccountSAPIStatusResponse struct {
Data struct {
IsLocked bool `json:"isLocked"`
PlannedRecoverTime int `json:"plannedRecoverTime"` // If API trading function is locked, this is the planned recover time
TriggerCondition struct {
GCR int `json:"GCR"` // Number of GTC orders
IFER int `json:"IFER"` // Number of FOK/IOC orders
UFR int `json:"UFR"` // Number of orders
} `json:"triggerCondition"`
Indicators map[string][]struct {
Unfilled string `json:"i"` // Unfilled Ratio (UFR)
Count int64 `json:"c"` // Count of all order
Value decimal.Decimal `json:"v"` // Current value
TriggerValue decimal.Decimal `json:"t"` // Trigger value
} `json:"indicators"`
UpdateTime int64 `json:"updateTime"`
} `json:"data"`
}
// DustLogSAPIResponse Fetch small amounts of assets exchanged BNB records
type DustLogSAPIResponse struct {
Total int `json:"total"`
UserAssetDriblets []struct {
TotalTransferredAmount string `json:"totalTransferedAmount"`
TotalServiceChargeAmount string `json:"totalServiceChargeAmount"`
TransId int64 `json:"transId"`
UserAssetDribletDetails []struct {
TransId int `json:"transId"`
ServiceChargeAmount string `json:"serviceChargeAmount"`
Amount string `json:"amount"`
OperateTime interface{} `json:"operateTime"`
TransferredAmount string `json:"transferedAmount"`
FromAsset string `json:"fromAsset"`
} `json:"userAssetDribbletDetails"`
OperateTime int64 `json:"operateTime,omitempty"`
} `json:"userAssetDribblets"`
}
// DustTransferResponse Convert dust assets to BNB.
type DustTransferResponse struct {
TotalServiceCharge string `json:"totalServiceCharge"`
TotalTransferred string `json:"totalTransfered"`
TransferResult []struct {
Amount string `json:"amount"`
FromAsset string `json:"fromAsset"`
OperateTime int64 `json:"operateTime"`
ServiceChargeAmount string `json:"serviceChargeAmount"`
TranId int64 `json:"tranId"`
TransferredAmount string `json:"transferedAmount"`
} `json:"transferResult"`
}
// AccountDividendRecordResponse Query asset dividend record.
type AccountDividendRecordResponse struct {
Rows []struct {
Amount string `json:"amount"`
Asset string `json:"asset"`
DivTime int64 `json:"divTime"`
EnInfo string `json:"enInfo"`
TranID int64 `json:"tranId"`
} `json:"rows"`
Total int `json:"total"`
}
// SAPIAssetDetailResponse Fetch details of assets supported on Binance.
type SAPIAssetDetailResponse map[string]struct {
MinWithdrawAmount string `json:"minWithdrawAmount"`
DepositStatus bool `json:"depositStatus"`
WithdrawFee string `json:"withdrawFee"`
WithdrawStatus bool `json:"withdrawStatus"`
DepositTip string `json:"depositTip"`
}
// SAPITradeFeeResponse Fetch trade fee, values in percentage.
type SAPITradeFeeResponse []struct {
Symbol string `json:"symbol"`
MakerCommission decimal.Decimal `json:"makerCommission"`
TakerCommission decimal.Decimal `json:"takerCommission"`
}
// UniversalTransferResponse universal transfer
type UniversalTransferResponse struct {
TranID int64 `json:"tranId"`
}
// UniversalTransferRecordResponse universal transfer record
type UniversalTransferRecordResponse struct {
Total int `json:"total"`
Rows []struct {
Asset string `json:"asset"`
Amount string `json:"amount"`
Type string `json:"type"`
Status string `json:"status"`
TranID int64 `json:"tranId"`
Timestamp int64 `json:"timestamp"`
} `json:"rows"`
}