binance 2.12.3 → 2.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/coinm-client.d.ts +79 -37
- package/lib/coinm-client.js +102 -59
- package/lib/coinm-client.js.map +1 -1
- package/lib/main-client.d.ts +979 -682
- package/lib/main-client.js +1311 -1048
- package/lib/main-client.js.map +1 -1
- package/lib/types/futures.d.ts +23 -0
- package/lib/types/spot.d.ts +177 -3
- package/lib/usdm-client.d.ts +108 -49
- package/lib/usdm-client.js +152 -89
- package/lib/usdm-client.js.map +1 -1
- package/package.json +1 -1
package/lib/main-client.js
CHANGED
|
@@ -44,1249 +44,1413 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
*
|
|
47
|
-
*
|
|
47
|
+
* SPOT TRADING Endpoints - General endpoints
|
|
48
48
|
*
|
|
49
49
|
**/
|
|
50
|
-
|
|
51
|
-
return this.get('
|
|
52
|
-
}
|
|
53
|
-
getBalances() {
|
|
54
|
-
return this.getPrivate('sapi/v1/capital/config/getall');
|
|
55
|
-
}
|
|
56
|
-
getDailyAccountSnapshot(params) {
|
|
57
|
-
return this.getPrivate('sapi/v1/accountSnapshot', params);
|
|
58
|
-
}
|
|
59
|
-
disableFastWithdrawSwitch() {
|
|
60
|
-
return this.postPrivate('sapi/v1/account/disableFastWithdrawSwitch');
|
|
50
|
+
testConnectivity() {
|
|
51
|
+
return this.get('api/v3/ping');
|
|
61
52
|
}
|
|
62
|
-
|
|
63
|
-
|
|
53
|
+
getExchangeInfo(params) {
|
|
54
|
+
const symbols = (params === null || params === void 0 ? void 0 : params.symbols) && JSON.stringify(params.symbols);
|
|
55
|
+
const symbol = params === null || params === void 0 ? void 0 : params.symbol;
|
|
56
|
+
let urlSuffix = '';
|
|
57
|
+
if (symbol) {
|
|
58
|
+
urlSuffix += '?symbol=' + symbol;
|
|
59
|
+
}
|
|
60
|
+
else if (symbols) {
|
|
61
|
+
urlSuffix += '?symbols=' + symbols;
|
|
62
|
+
}
|
|
63
|
+
return this.get('api/v3/exchangeInfo' + urlSuffix);
|
|
64
64
|
}
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
/**
|
|
66
|
+
*
|
|
67
|
+
* SPOT TRADING Endpoints - Market endpoints
|
|
68
|
+
*
|
|
69
|
+
**/
|
|
70
|
+
getOrderBook(params) {
|
|
71
|
+
return this.get('api/v3/depth', params);
|
|
67
72
|
}
|
|
68
|
-
|
|
69
|
-
return this.
|
|
73
|
+
getRecentTrades(params) {
|
|
74
|
+
return this.get('api/v3/trades', params);
|
|
70
75
|
}
|
|
71
|
-
|
|
72
|
-
return this.
|
|
76
|
+
getHistoricalTrades(params) {
|
|
77
|
+
return this.get('api/v3/historicalTrades', params);
|
|
73
78
|
}
|
|
74
|
-
|
|
75
|
-
return this.
|
|
79
|
+
getAggregateTrades(params) {
|
|
80
|
+
return this.get('api/v3/aggTrades', params);
|
|
76
81
|
}
|
|
77
|
-
|
|
78
|
-
return this.
|
|
82
|
+
getKlines(params) {
|
|
83
|
+
return this.get('api/v3/klines', params);
|
|
79
84
|
}
|
|
80
|
-
|
|
81
|
-
return this.
|
|
85
|
+
getUIKlines(params) {
|
|
86
|
+
return this.get('api/v3/uiKlines', params);
|
|
82
87
|
}
|
|
83
|
-
|
|
84
|
-
return this.
|
|
88
|
+
getAvgPrice(params) {
|
|
89
|
+
return this.get('api/v3/avgPrice', params);
|
|
85
90
|
}
|
|
86
|
-
|
|
87
|
-
|
|
91
|
+
get24hrChangeStatististics(params) {
|
|
92
|
+
if (params && typeof params['symbol'] === 'string') {
|
|
93
|
+
return this.get('api/v3/ticker/24hr', params);
|
|
94
|
+
}
|
|
95
|
+
if (params && params['symbols'] && Array.isArray(params['symbols'])) {
|
|
96
|
+
const symbols = params.symbols;
|
|
97
|
+
const symbolsQueryParam = JSON.stringify(symbols);
|
|
98
|
+
return this.get('api/v3/ticker/24hr?symbols=' + symbolsQueryParam);
|
|
99
|
+
}
|
|
100
|
+
return this.get('api/v3/ticker/24hr');
|
|
88
101
|
}
|
|
89
|
-
|
|
90
|
-
return this.
|
|
102
|
+
getTradingDayTicker(params) {
|
|
103
|
+
return this.get('api/v3/ticker/tradingDay', params);
|
|
91
104
|
}
|
|
92
|
-
|
|
93
|
-
return this.
|
|
105
|
+
getSymbolPriceTicker(params) {
|
|
106
|
+
return this.get('api/v3/ticker/price', params);
|
|
94
107
|
}
|
|
95
|
-
|
|
96
|
-
return this.
|
|
108
|
+
getSymbolOrderBookTicker(params) {
|
|
109
|
+
return this.get('api/v3/ticker/bookTicker', params);
|
|
97
110
|
}
|
|
98
|
-
|
|
99
|
-
return this.
|
|
111
|
+
getRollingWindowTicker(params) {
|
|
112
|
+
return this.get('api/v3/ticker', params);
|
|
100
113
|
}
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
/**
|
|
115
|
+
*
|
|
116
|
+
* SPOT TRADING Endpoints - Trading endpoints
|
|
117
|
+
*
|
|
118
|
+
**/
|
|
119
|
+
submitNewOrder(params) {
|
|
120
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
121
|
+
return this.postPrivate('api/v3/order', params);
|
|
103
122
|
}
|
|
104
|
-
|
|
105
|
-
|
|
123
|
+
testNewOrder(params) {
|
|
124
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
125
|
+
return this.postPrivate('api/v3/order/test', params);
|
|
106
126
|
}
|
|
107
|
-
|
|
108
|
-
return this.getPrivate('
|
|
127
|
+
getOrder(params) {
|
|
128
|
+
return this.getPrivate('api/v3/order', params);
|
|
109
129
|
}
|
|
110
|
-
|
|
111
|
-
return this.
|
|
130
|
+
cancelOrder(params) {
|
|
131
|
+
return this.deletePrivate('api/v3/order', params);
|
|
112
132
|
}
|
|
113
|
-
|
|
114
|
-
return this.
|
|
133
|
+
cancelAllSymbolOrders(params) {
|
|
134
|
+
return this.deletePrivate('api/v3/openOrders', params);
|
|
115
135
|
}
|
|
116
|
-
|
|
117
|
-
return this.postPrivate('
|
|
136
|
+
replaceOrder(params) {
|
|
137
|
+
return this.postPrivate('api/v3/order/cancelReplace', params);
|
|
118
138
|
}
|
|
119
|
-
|
|
120
|
-
return this.
|
|
139
|
+
getOpenOrders(params) {
|
|
140
|
+
return this.getPrivate('api/v3/openOrders', params);
|
|
121
141
|
}
|
|
122
|
-
|
|
123
|
-
return this.getPrivate('
|
|
142
|
+
getAllOrders(params) {
|
|
143
|
+
return this.getPrivate('api/v3/allOrders', params);
|
|
124
144
|
}
|
|
125
|
-
|
|
126
|
-
|
|
145
|
+
/**
|
|
146
|
+
* @deprecated
|
|
147
|
+
*/
|
|
148
|
+
submitNewOCO(params) {
|
|
149
|
+
this.validateOrderId(params, 'listClientOrderId');
|
|
150
|
+
this.validateOrderId(params, 'limitClientOrderId');
|
|
151
|
+
this.validateOrderId(params, 'stopClientOrderId');
|
|
152
|
+
return this.postPrivate('api/v3/order/oco', params);
|
|
127
153
|
}
|
|
128
|
-
|
|
129
|
-
|
|
154
|
+
submitNewOrderList(params) {
|
|
155
|
+
this.validateOrderId(params, 'listClientOrderId');
|
|
156
|
+
this.validateOrderId(params, 'aboveClientOrderId');
|
|
157
|
+
this.validateOrderId(params, 'belowClientOrderId');
|
|
158
|
+
return this.postPrivate('api/v3/orderList/oco', params);
|
|
130
159
|
}
|
|
131
|
-
|
|
132
|
-
|
|
160
|
+
// TO CHECK!!
|
|
161
|
+
submitNewOrderListOTO(params) {
|
|
162
|
+
this.validateOrderId(params, 'listClientOrderId');
|
|
163
|
+
this.validateOrderId(params, 'workingClientOrderId');
|
|
164
|
+
this.validateOrderId(params, 'pendingClientOrderId');
|
|
165
|
+
return this.postPrivate('api/v3/orderList/oto', params);
|
|
133
166
|
}
|
|
134
|
-
|
|
135
|
-
|
|
167
|
+
// TO CHECK!!
|
|
168
|
+
submitNewOrderListOTOCO(params) {
|
|
169
|
+
this.validateOrderId(params, 'listClientOrderId');
|
|
170
|
+
this.validateOrderId(params, 'workingClientOrderId');
|
|
171
|
+
this.validateOrderId(params, 'pendingAboveClientOrderId');
|
|
172
|
+
this.validateOrderId(params, 'pendingBelowClientOrderId');
|
|
173
|
+
return this.postPrivate('api/v3/orderList/otoco', params);
|
|
136
174
|
}
|
|
137
|
-
|
|
138
|
-
|
|
175
|
+
cancelOCO(params) {
|
|
176
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
177
|
+
return this.deletePrivate('api/v3/orderList', params);
|
|
139
178
|
}
|
|
140
|
-
|
|
141
|
-
return this.getPrivate('
|
|
179
|
+
getOCO(params) {
|
|
180
|
+
return this.getPrivate('api/v3/orderList', params);
|
|
142
181
|
}
|
|
143
|
-
|
|
144
|
-
return this.getPrivate('
|
|
182
|
+
getAllOCO(params) {
|
|
183
|
+
return this.getPrivate('api/v3/allOrderList', params);
|
|
145
184
|
}
|
|
146
|
-
|
|
147
|
-
|
|
185
|
+
/**
|
|
186
|
+
* Query open OCO
|
|
187
|
+
*/
|
|
188
|
+
getAllOpenOCO() {
|
|
189
|
+
return this.getPrivate('api/v3/openOrderList');
|
|
148
190
|
}
|
|
149
|
-
|
|
150
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Places an order using smart order routing (SOR).
|
|
193
|
+
*/
|
|
194
|
+
submitNewSOROrder(params) {
|
|
195
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
196
|
+
return this.postPrivate('api/v3/sor/order', params);
|
|
151
197
|
}
|
|
152
|
-
|
|
153
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Test new order creation and signature/recvWindow using smart order routing (SOR).
|
|
200
|
+
* Creates and validates a new order but does not send it into the matching engine.
|
|
201
|
+
*/
|
|
202
|
+
testNewSOROrder(params) {
|
|
203
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
204
|
+
return this.postPrivate('api/v3/sor/order/test', params);
|
|
154
205
|
}
|
|
155
206
|
/**
|
|
156
207
|
*
|
|
157
|
-
*
|
|
158
|
-
* Sub-Account Endpoints
|
|
208
|
+
* SPOT TRADING Endpoints - Account endpoints
|
|
159
209
|
*
|
|
160
210
|
**/
|
|
161
|
-
|
|
162
|
-
|
|
211
|
+
/**
|
|
212
|
+
* Get current account information
|
|
213
|
+
*/
|
|
214
|
+
getAccountInformation() {
|
|
215
|
+
return this.getPrivate('api/v3/account');
|
|
163
216
|
}
|
|
164
|
-
|
|
165
|
-
return this.getPrivate('
|
|
217
|
+
getAccountTradeList(params) {
|
|
218
|
+
return this.getPrivate('api/v3/myTrades', params);
|
|
166
219
|
}
|
|
167
|
-
|
|
168
|
-
return this.getPrivate('
|
|
220
|
+
getOrderRateLimit() {
|
|
221
|
+
return this.getPrivate('api/v3/rateLimit/order');
|
|
169
222
|
}
|
|
170
|
-
|
|
171
|
-
return this.getPrivate('
|
|
223
|
+
getPreventedMatches(params) {
|
|
224
|
+
return this.getPrivate('api/v3/myPreventedMatches', params);
|
|
172
225
|
}
|
|
173
|
-
|
|
174
|
-
return this.
|
|
226
|
+
getAllocations(params) {
|
|
227
|
+
return this.getPrivate('api/v3/myAllocations', params);
|
|
175
228
|
}
|
|
176
|
-
|
|
177
|
-
return this.getPrivate('
|
|
229
|
+
getCommissionRates(params) {
|
|
230
|
+
return this.getPrivate('api/v3/account/commission', params);
|
|
178
231
|
}
|
|
179
|
-
|
|
180
|
-
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* MARGIN TRADING Endpoints - Market Data endpoints
|
|
235
|
+
*
|
|
236
|
+
**/
|
|
237
|
+
getCrossMarginCollateralRatio() {
|
|
238
|
+
return this.getPrivate('sapi/v1/margin/crossMarginCollateralRatio');
|
|
181
239
|
}
|
|
182
|
-
|
|
183
|
-
return this.
|
|
240
|
+
getAllCrossMarginPairs() {
|
|
241
|
+
return this.get('sapi/v1/margin/allPairs');
|
|
184
242
|
}
|
|
185
|
-
|
|
186
|
-
return this.getPrivate('sapi/v1/
|
|
243
|
+
getIsolatedMarginAllSymbols(params) {
|
|
244
|
+
return this.getPrivate('sapi/v1/margin/isolated/allPairs', params);
|
|
187
245
|
}
|
|
188
|
-
|
|
189
|
-
return this.
|
|
246
|
+
getAllMarginAssets() {
|
|
247
|
+
return this.get('sapi/v1/margin/allAssets');
|
|
190
248
|
}
|
|
191
|
-
|
|
192
|
-
return this.
|
|
249
|
+
getMarginDelistSchedule() {
|
|
250
|
+
return this.getPrivate('sapi/v1/margin/delist-schedule');
|
|
193
251
|
}
|
|
194
|
-
|
|
195
|
-
return this.getPrivate('sapi/v1/
|
|
252
|
+
getIsolatedMarginTierData(params) {
|
|
253
|
+
return this.getPrivate('sapi/v1/margin/isolatedMarginTier', params);
|
|
196
254
|
}
|
|
197
|
-
|
|
198
|
-
return this.
|
|
255
|
+
queryMarginPriceIndex(params) {
|
|
256
|
+
return this.get('sapi/v1/margin/priceIndex', params);
|
|
199
257
|
}
|
|
200
|
-
|
|
201
|
-
return this.
|
|
258
|
+
getMarginAvailableInventory(params) {
|
|
259
|
+
return this.getPrivate('sapi/v1/margin/available-inventory', params);
|
|
202
260
|
}
|
|
203
|
-
|
|
204
|
-
return this.getPrivate('sapi/v1/
|
|
261
|
+
getLeverageBracket() {
|
|
262
|
+
return this.getPrivate('sapi/v1/margin/leverageBracket');
|
|
205
263
|
}
|
|
206
|
-
|
|
207
|
-
|
|
264
|
+
/**
|
|
265
|
+
*
|
|
266
|
+
* MARGIN TRADING Endpoints - Borrow and Repay endpoints
|
|
267
|
+
*
|
|
268
|
+
**/
|
|
269
|
+
getNextHourlyInterestRate(params) {
|
|
270
|
+
return this.getPrivate('sapi/v1/margin/next-hourly-interest-rate', params);
|
|
208
271
|
}
|
|
209
|
-
|
|
210
|
-
return this.getPrivate('sapi/v1/
|
|
211
|
-
email,
|
|
212
|
-
});
|
|
272
|
+
getMarginInterestHistory(params) {
|
|
273
|
+
return this.getPrivate('sapi/v1/margin/interestHistory', params);
|
|
213
274
|
}
|
|
214
|
-
|
|
215
|
-
return this.postPrivate('sapi/v1/
|
|
275
|
+
submitMarginAccountBorrowRepay(params) {
|
|
276
|
+
return this.postPrivate('sapi/v1/margin/borrow-repay', params);
|
|
216
277
|
}
|
|
217
|
-
|
|
218
|
-
return this.
|
|
278
|
+
getMarginAccountBorrowRepayRecords(params) {
|
|
279
|
+
return this.getPrivate('sapi/v1/margin/borrow-repay', params);
|
|
219
280
|
}
|
|
220
|
-
|
|
221
|
-
return this.
|
|
281
|
+
getMarginInterestRateHistory(params) {
|
|
282
|
+
return this.getPrivate('sapi/v1/margin/interestRateHistory', params);
|
|
222
283
|
}
|
|
223
|
-
|
|
224
|
-
return this.
|
|
284
|
+
queryMaxBorrow(params) {
|
|
285
|
+
return this.getPrivate('sapi/v1/margin/maxBorrowable', params);
|
|
225
286
|
}
|
|
226
|
-
|
|
227
|
-
|
|
287
|
+
/**
|
|
288
|
+
*
|
|
289
|
+
* MARGIN TRADING Endpoints - Trade endpoints
|
|
290
|
+
*
|
|
291
|
+
**/
|
|
292
|
+
getMarginForceLiquidationRecord(params) {
|
|
293
|
+
return this.getPrivate('sapi/v1/margin/forceLiquidationRec', params);
|
|
228
294
|
}
|
|
229
|
-
|
|
230
|
-
return this.
|
|
295
|
+
getSmallLiabilityExchangeCoins() {
|
|
296
|
+
return this.getPrivate('sapi/v1/margin/exchange-small-liability');
|
|
231
297
|
}
|
|
232
|
-
|
|
233
|
-
return this.getPrivate('sapi/v1/
|
|
298
|
+
getSmallLiabilityExchangeHistory(params) {
|
|
299
|
+
return this.getPrivate('sapi/v1/margin/exchange-small-liability-history', params);
|
|
234
300
|
}
|
|
235
|
-
|
|
236
|
-
return this.
|
|
301
|
+
marginAccountCancelOpenOrders(params) {
|
|
302
|
+
return this.deletePrivate('sapi/v1/margin/openOrders', params);
|
|
237
303
|
}
|
|
238
|
-
|
|
239
|
-
|
|
304
|
+
marginAccountCancelOCO(params) {
|
|
305
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
306
|
+
return this.deletePrivate('sapi/v1/margin/orderList', params);
|
|
240
307
|
}
|
|
241
|
-
|
|
242
|
-
return this.
|
|
308
|
+
marginAccountCancelOrder(params) {
|
|
309
|
+
return this.deletePrivate('sapi/v1/margin/order', params);
|
|
243
310
|
}
|
|
244
|
-
|
|
245
|
-
|
|
311
|
+
marginAccountNewOCO(params) {
|
|
312
|
+
this.validateOrderId(params, 'listClientOrderId');
|
|
313
|
+
this.validateOrderId(params, 'limitClientOrderId');
|
|
314
|
+
this.validateOrderId(params, 'stopClientOrderId');
|
|
315
|
+
return this.postPrivate('sapi/v1/margin/order/oco', params);
|
|
246
316
|
}
|
|
247
|
-
|
|
248
|
-
|
|
317
|
+
marginAccountNewOrder(params) {
|
|
318
|
+
this.validateOrderId(params, 'newClientOrderId');
|
|
319
|
+
return this.postPrivate('sapi/v1/margin/order', params);
|
|
249
320
|
}
|
|
250
|
-
|
|
251
|
-
return this.
|
|
321
|
+
getMarginOrderCountUsage(params) {
|
|
322
|
+
return this.getPrivate('sapi/v1/margin/rateLimit/order', params);
|
|
252
323
|
}
|
|
253
|
-
|
|
254
|
-
return this.
|
|
324
|
+
queryMarginAccountAllOCO(params) {
|
|
325
|
+
return this.getPrivate('sapi/v1/margin/allOrderList', params);
|
|
255
326
|
}
|
|
256
|
-
|
|
257
|
-
return this.getPrivate('sapi/v1/
|
|
327
|
+
queryMarginAccountAllOrders(params) {
|
|
328
|
+
return this.getPrivate('sapi/v1/margin/allOrders', params);
|
|
258
329
|
}
|
|
259
|
-
|
|
260
|
-
return this.
|
|
330
|
+
queryMarginAccountOCO(params) {
|
|
331
|
+
return this.getPrivate('sapi/v1/margin/orderList', params);
|
|
261
332
|
}
|
|
262
|
-
|
|
263
|
-
return this.
|
|
333
|
+
queryMarginAccountOpenOCO(params) {
|
|
334
|
+
return this.getPrivate('sapi/v1/margin/openOrderList', params);
|
|
264
335
|
}
|
|
265
|
-
|
|
266
|
-
return this.getPrivate('sapi/v1/
|
|
336
|
+
queryMarginAccountOpenOrders(params) {
|
|
337
|
+
return this.getPrivate('sapi/v1/margin/openOrders', params);
|
|
267
338
|
}
|
|
268
|
-
|
|
269
|
-
return this.
|
|
339
|
+
queryMarginAccountOrder(params) {
|
|
340
|
+
return this.getPrivate('sapi/v1/margin/order', params);
|
|
270
341
|
}
|
|
271
|
-
|
|
272
|
-
return this.getPrivate('sapi/v1/
|
|
342
|
+
queryMarginAccountTradeList(params) {
|
|
343
|
+
return this.getPrivate('sapi/v1/margin/myTrades', params);
|
|
273
344
|
}
|
|
274
|
-
|
|
275
|
-
return this.
|
|
345
|
+
submitSmallLiabilityExchange(params) {
|
|
346
|
+
return this.postPrivate('sapi/v1/margin/exchange-small-liability', params);
|
|
276
347
|
}
|
|
277
|
-
|
|
278
|
-
return this.
|
|
348
|
+
submitManualLiquidation(params) {
|
|
349
|
+
return this.postPrivate('sapi/v1/margin/manual-liquidation', params);
|
|
279
350
|
}
|
|
280
|
-
|
|
281
|
-
|
|
351
|
+
/**
|
|
352
|
+
*
|
|
353
|
+
* MARGIN TRADING Endpoints - Transfer endpoints
|
|
354
|
+
*
|
|
355
|
+
**/
|
|
356
|
+
getCrossMarginTransferHistory(params) {
|
|
357
|
+
return this.getPrivate('sapi/v1/margin/transfer', params);
|
|
282
358
|
}
|
|
283
|
-
|
|
284
|
-
return this.getPrivate('sapi/v1/
|
|
359
|
+
queryMaxTransferOutAmount(params) {
|
|
360
|
+
return this.getPrivate('sapi/v1/margin/maxTransferable', params);
|
|
285
361
|
}
|
|
286
|
-
|
|
287
|
-
|
|
362
|
+
/**
|
|
363
|
+
*
|
|
364
|
+
* MARGIN TRADING Endpoints - Account endpoints
|
|
365
|
+
*
|
|
366
|
+
**/
|
|
367
|
+
updateCrossMarginMaxLeverage(params) {
|
|
368
|
+
return this.postPrivate('sapi/v1/margin/max-leverage', params);
|
|
288
369
|
}
|
|
289
|
-
|
|
290
|
-
return this.
|
|
370
|
+
disableIsolatedMarginAccount(params) {
|
|
371
|
+
return this.deletePrivate('sapi/v1/margin/isolated/account', params);
|
|
291
372
|
}
|
|
292
|
-
|
|
293
|
-
return this.
|
|
373
|
+
enableIsolatedMarginAccount(params) {
|
|
374
|
+
return this.postPrivate('sapi/v1/margin/isolated/account', params);
|
|
294
375
|
}
|
|
295
|
-
|
|
296
|
-
return this.getPrivate('sapi/v1/
|
|
376
|
+
getBNBBurn() {
|
|
377
|
+
return this.getPrivate('sapi/v1/bnbBurn');
|
|
297
378
|
}
|
|
298
|
-
|
|
299
|
-
return this.
|
|
379
|
+
getMarginSummary() {
|
|
380
|
+
return this.getPrivate('sapi/v1/margin/tradeCoeff');
|
|
300
381
|
}
|
|
301
|
-
|
|
302
|
-
return this.getPrivate('sapi/v1/
|
|
382
|
+
queryCrossMarginAccountDetails() {
|
|
383
|
+
return this.getPrivate('sapi/v1/margin/account');
|
|
303
384
|
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
*/
|
|
307
|
-
getBrokerIfNewSpotUser() {
|
|
308
|
-
return this.getPrivate('sapi/v1/apiReferral/ifNewUser');
|
|
385
|
+
getCrossMarginFeeData(params) {
|
|
386
|
+
return this.getPrivate('sapi/v1/margin/crossMarginData', params);
|
|
309
387
|
}
|
|
310
|
-
|
|
311
|
-
return this.getPrivate('sapi/v1/
|
|
388
|
+
getIsolatedMarginAccountLimit() {
|
|
389
|
+
return this.getPrivate('sapi/v1/margin/isolated/accountLimit');
|
|
312
390
|
}
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
return this.getPrivate(prefix + '/v1/apiReferral/userCustomization');
|
|
391
|
+
getIsolatedMarginAccountInfo(params) {
|
|
392
|
+
return this.getPrivate('sapi/v1/margin/isolated/account', { params });
|
|
316
393
|
}
|
|
317
|
-
|
|
318
|
-
return this.
|
|
394
|
+
getIsolatedMarginFeeData(params) {
|
|
395
|
+
return this.getPrivate('sapi/v1/margin/isolatedMarginData', params);
|
|
319
396
|
}
|
|
320
|
-
|
|
321
|
-
return this.
|
|
397
|
+
toggleBNBBurn(params) {
|
|
398
|
+
return this.postPrivate('sapi/v1/bnbBurn', params);
|
|
322
399
|
}
|
|
323
|
-
|
|
324
|
-
|
|
400
|
+
/**
|
|
401
|
+
* Possibly @deprecated
|
|
402
|
+
* Only existing in old documentation, not in new documentation
|
|
403
|
+
*/
|
|
404
|
+
getMarginCapitalFlow(params) {
|
|
405
|
+
return this.getPrivate('sapi/v1/margin/capital-flow', params);
|
|
325
406
|
}
|
|
326
|
-
|
|
327
|
-
|
|
407
|
+
/**
|
|
408
|
+
* @deprecated on 2024-01-09, use getMarginAccountBorrowRepayRecords() instead
|
|
409
|
+
*/
|
|
410
|
+
queryLoanRecord(params) {
|
|
411
|
+
return this.getPrivate('sapi/v1/margin/loan', params);
|
|
328
412
|
}
|
|
329
|
-
|
|
330
|
-
|
|
413
|
+
/**
|
|
414
|
+
* @deprecated on 2024-01-09, use getMarginAccountBorrowRepayRecords() instead
|
|
415
|
+
*/
|
|
416
|
+
queryRepayRecord(params) {
|
|
417
|
+
return this.getPrivate('sapi/v1/margin/repay', params);
|
|
331
418
|
}
|
|
332
|
-
|
|
333
|
-
|
|
419
|
+
/**
|
|
420
|
+
* @deprecated on 2024-01-09, use submitUniversalTransfer() instead
|
|
421
|
+
*/
|
|
422
|
+
isolatedMarginAccountTransfer(params) {
|
|
423
|
+
return this.postPrivate('sapi/v1/margin/isolated/transfer', params);
|
|
334
424
|
}
|
|
335
|
-
|
|
336
|
-
|
|
425
|
+
/**
|
|
426
|
+
*
|
|
427
|
+
* WALLET Endpoints - Capital endpoints
|
|
428
|
+
*
|
|
429
|
+
**/
|
|
430
|
+
getBalances() {
|
|
431
|
+
return this.getPrivate('sapi/v1/capital/config/getall');
|
|
337
432
|
}
|
|
338
|
-
|
|
339
|
-
return this.postPrivate('sapi/v1/
|
|
433
|
+
withdraw(params) {
|
|
434
|
+
return this.postPrivate('sapi/v1/capital/withdraw/apply', params);
|
|
340
435
|
}
|
|
341
|
-
|
|
342
|
-
return this.
|
|
436
|
+
getWithdrawHistory(params) {
|
|
437
|
+
return this.getPrivate('sapi/v1/capital/withdraw/history', params);
|
|
343
438
|
}
|
|
344
|
-
|
|
345
|
-
return this.
|
|
439
|
+
getWithdrawAddresses() {
|
|
440
|
+
return this.getPrivate('sapi/v1/capital/withdraw/address/list');
|
|
346
441
|
}
|
|
347
|
-
|
|
348
|
-
return this.
|
|
442
|
+
getDepositHistory(params) {
|
|
443
|
+
return this.getPrivate('sapi/v1/capital/deposit/hisrec', params);
|
|
349
444
|
}
|
|
350
|
-
|
|
351
|
-
return this.
|
|
445
|
+
getDepositAddress(params) {
|
|
446
|
+
return this.getPrivate('sapi/v1/capital/deposit/address', params);
|
|
352
447
|
}
|
|
353
|
-
|
|
354
|
-
return this.
|
|
448
|
+
getDepositAddresses(params) {
|
|
449
|
+
return this.getPrivate('sapi/v1/capital/deposit/address/list', params);
|
|
355
450
|
}
|
|
356
|
-
|
|
357
|
-
return this.postPrivate('sapi/v1/
|
|
451
|
+
submitDepositCredit(params) {
|
|
452
|
+
return this.postPrivate('sapi/v1/capital/deposit/credit-apply', params);
|
|
358
453
|
}
|
|
359
|
-
|
|
360
|
-
return this.getPrivate('sapi/v1/
|
|
454
|
+
getAutoConvertStablecoins() {
|
|
455
|
+
return this.getPrivate('sapi/v1/capital/contract/convertible-coins');
|
|
361
456
|
}
|
|
362
|
-
|
|
363
|
-
return this.
|
|
364
|
-
}
|
|
365
|
-
// USD & Coin-M can be found under API getIncome() (find "API rebate" in results)
|
|
366
|
-
getBrokerSpotRebateHistory(days, customerId) {
|
|
367
|
-
if (days === 7) {
|
|
368
|
-
return this.getPrivate('sapi/v1/apiReferral/rebate/recentRecord', {
|
|
369
|
-
customerId,
|
|
370
|
-
});
|
|
371
|
-
}
|
|
372
|
-
if (days === 30) {
|
|
373
|
-
return this.getPrivate('sapi/v1/apiReferral/rebate/historicalRecord', {
|
|
374
|
-
customerId,
|
|
375
|
-
});
|
|
376
|
-
}
|
|
457
|
+
setConvertibleCoins(params) {
|
|
458
|
+
return this.postPrivate('sapi/v1/capital/contract/convertible-coins', params);
|
|
377
459
|
}
|
|
378
460
|
/**
|
|
379
461
|
*
|
|
380
|
-
*
|
|
462
|
+
* WALLET Endpoints - Asset endpoints
|
|
381
463
|
*
|
|
382
464
|
**/
|
|
383
|
-
|
|
384
|
-
return this.
|
|
385
|
-
}
|
|
386
|
-
getExchangeInfo(params) {
|
|
387
|
-
const symbols = (params === null || params === void 0 ? void 0 : params.symbols) && JSON.stringify(params.symbols);
|
|
388
|
-
const symbol = params === null || params === void 0 ? void 0 : params.symbol;
|
|
389
|
-
let urlSuffix = '';
|
|
390
|
-
if (symbol) {
|
|
391
|
-
urlSuffix += '?symbol=' + symbol;
|
|
392
|
-
}
|
|
393
|
-
else if (symbols) {
|
|
394
|
-
urlSuffix += '?symbols=' + symbols;
|
|
395
|
-
}
|
|
396
|
-
return this.get('api/v3/exchangeInfo' + urlSuffix);
|
|
465
|
+
getAssetDetail(params) {
|
|
466
|
+
return this.getPrivate('sapi/v1/asset/assetDetail', params);
|
|
397
467
|
}
|
|
398
|
-
|
|
399
|
-
return this.
|
|
468
|
+
getWalletBalances() {
|
|
469
|
+
return this.getPrivate('sapi/v1/asset/wallet/balance');
|
|
400
470
|
}
|
|
401
|
-
|
|
402
|
-
return this.
|
|
471
|
+
getUserAsset(params) {
|
|
472
|
+
return this.postPrivate('sapi/v3/asset/getUserAsset', params);
|
|
403
473
|
}
|
|
404
|
-
|
|
405
|
-
return this.
|
|
474
|
+
submitUniversalTransfer(params) {
|
|
475
|
+
return this.postPrivate('sapi/v1/asset/transfer', params);
|
|
406
476
|
}
|
|
407
|
-
|
|
408
|
-
return this.
|
|
477
|
+
getUniversalTransferHistory(params) {
|
|
478
|
+
return this.getPrivate('sapi/v1/asset/transfer', params);
|
|
409
479
|
}
|
|
410
|
-
|
|
411
|
-
return this.
|
|
480
|
+
getDust() {
|
|
481
|
+
return this.postPrivate('sapi/v1/asset/dust-btc');
|
|
412
482
|
}
|
|
413
|
-
|
|
414
|
-
return this.
|
|
483
|
+
convertDustToBnb(params) {
|
|
484
|
+
return this.postPrivate('sapi/v1/asset/dust', params);
|
|
415
485
|
}
|
|
416
|
-
|
|
417
|
-
return this.
|
|
486
|
+
getDustLog(params) {
|
|
487
|
+
return this.getPrivate('sapi/v1/asset/dribblet', params);
|
|
418
488
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
return this.get('api/v3/ticker/24hr', params);
|
|
422
|
-
}
|
|
423
|
-
if (params && params['symbols'] && Array.isArray(params['symbols'])) {
|
|
424
|
-
const symbols = params.symbols;
|
|
425
|
-
const symbolsQueryParam = JSON.stringify(symbols);
|
|
426
|
-
return this.get('api/v3/ticker/24hr?symbols=' + symbolsQueryParam);
|
|
427
|
-
}
|
|
428
|
-
return this.get('api/v3/ticker/24hr');
|
|
489
|
+
getAssetDividendRecord(params) {
|
|
490
|
+
return this.getPrivate('sapi/v1/asset/assetDividend', params);
|
|
429
491
|
}
|
|
430
|
-
|
|
431
|
-
return this.
|
|
492
|
+
getTradeFee(params) {
|
|
493
|
+
return this.getPrivate('sapi/v1/asset/tradeFee', params);
|
|
432
494
|
}
|
|
433
|
-
|
|
434
|
-
return this.
|
|
495
|
+
getFundingAsset(params) {
|
|
496
|
+
return this.postPrivate('sapi/v1/asset/get-funding-asset', params);
|
|
435
497
|
}
|
|
436
|
-
|
|
437
|
-
return this.
|
|
498
|
+
getCloudMiningHistory(params) {
|
|
499
|
+
return this.getPrivate('sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage', params);
|
|
438
500
|
}
|
|
439
|
-
|
|
440
|
-
return this.
|
|
501
|
+
getDelegationHistory(params) {
|
|
502
|
+
return this.getPrivate('sapi/v1/asset/custody/transfer-history', params);
|
|
441
503
|
}
|
|
442
504
|
/**
|
|
443
505
|
*
|
|
444
|
-
*
|
|
506
|
+
* Futures Management Endpoints:
|
|
507
|
+
* https://binance-docs.github.io/apidocs/spot/en/#futures
|
|
508
|
+
*
|
|
509
|
+
* Note: to trade futures use the usdm-client or coinm-client.
|
|
510
|
+
* MainClient only has the futures endpoints listed in the "spot" docs category, primarily used for transfers.
|
|
445
511
|
*
|
|
446
512
|
**/
|
|
447
|
-
testNewOrder(params) {
|
|
448
|
-
this.validateOrderId(params, 'newClientOrderId');
|
|
449
|
-
return this.postPrivate('api/v3/order/test', params);
|
|
450
|
-
}
|
|
451
|
-
replaceOrder(params) {
|
|
452
|
-
return this.postPrivate('api/v3/order/cancelReplace', params);
|
|
453
|
-
}
|
|
454
|
-
submitNewOrder(params) {
|
|
455
|
-
this.validateOrderId(params, 'newClientOrderId');
|
|
456
|
-
return this.postPrivate('api/v3/order', params);
|
|
457
|
-
}
|
|
458
|
-
cancelOrder(params) {
|
|
459
|
-
return this.deletePrivate('api/v3/order', params);
|
|
460
|
-
}
|
|
461
|
-
cancelAllSymbolOrders(params) {
|
|
462
|
-
return this.deletePrivate('api/v3/openOrders', params);
|
|
463
|
-
}
|
|
464
|
-
getOrder(params) {
|
|
465
|
-
return this.getPrivate('api/v3/order', params);
|
|
466
|
-
}
|
|
467
|
-
getOpenOrders(params) {
|
|
468
|
-
return this.getPrivate('api/v3/openOrders', params);
|
|
469
|
-
}
|
|
470
|
-
getAllOrders(params) {
|
|
471
|
-
return this.getPrivate('api/v3/allOrders', params);
|
|
472
|
-
}
|
|
473
513
|
/**
|
|
474
|
-
*
|
|
514
|
+
* Execute transfer between spot account and futures account.
|
|
515
|
+
*
|
|
516
|
+
* Type:
|
|
517
|
+
* - 1: transfer from spot account to USDT-Ⓜ futures account.
|
|
518
|
+
* - 2: transfer from USDT-Ⓜ futures account to spot account.
|
|
519
|
+
* - 3: transfer from spot account to COIN-Ⓜ futures account.
|
|
520
|
+
* - 4: transfer from COIN-Ⓜ futures account to spot account.
|
|
475
521
|
*/
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
submitNewOrderList(params) {
|
|
483
|
-
this.validateOrderId(params, 'listClientOrderId');
|
|
484
|
-
this.validateOrderId(params, 'aboveClientOrderId');
|
|
485
|
-
this.validateOrderId(params, 'belowClientOrderId');
|
|
486
|
-
return this.postPrivate('api/v3/orderList/oco', params);
|
|
487
|
-
}
|
|
488
|
-
// TO CHECK!!
|
|
489
|
-
submitNewOrderListOTO(params) {
|
|
490
|
-
this.validateOrderId(params, 'listClientOrderId');
|
|
491
|
-
this.validateOrderId(params, 'workingClientOrderId');
|
|
492
|
-
this.validateOrderId(params, 'pendingClientOrderId');
|
|
493
|
-
return this.postPrivate('api/v3/orderList/oto', params);
|
|
522
|
+
/**
|
|
523
|
+
* Possibly @deprecated, found only in old docs only
|
|
524
|
+
* Use sapi/v1/asset/transfer instead
|
|
525
|
+
*/
|
|
526
|
+
submitNewFutureAccountTransfer(params) {
|
|
527
|
+
return this.postPrivate(`sapi/v1/futures/transfer`, params);
|
|
494
528
|
}
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
this.
|
|
501
|
-
return this.postPrivate('api/v3/orderList/otoco', params);
|
|
529
|
+
/**
|
|
530
|
+
* Possibly @deprecated, found only in old docs only
|
|
531
|
+
* Use sapi/v1/asset/transfer instead
|
|
532
|
+
*/
|
|
533
|
+
getFutureAccountTransferHistory(params) {
|
|
534
|
+
return this.getPrivate(`sapi/v1/futures/transfer`, params);
|
|
502
535
|
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
536
|
+
/**
|
|
537
|
+
* @deprecated as of 2023-09-25
|
|
538
|
+
*/
|
|
539
|
+
getCrossCollateralBorrowHistory(params) {
|
|
540
|
+
return this.getPrivate(`sapi/v1/futures/loan/borrow/history`, params);
|
|
506
541
|
}
|
|
507
|
-
|
|
508
|
-
|
|
542
|
+
/**
|
|
543
|
+
* @deprecated as of 2023-09-25
|
|
544
|
+
*/
|
|
545
|
+
getCrossCollateralRepaymentHistory(params) {
|
|
546
|
+
return this.getPrivate(`sapi/v1/futures/loan/repay/history`, params);
|
|
509
547
|
}
|
|
510
|
-
|
|
511
|
-
|
|
548
|
+
/**
|
|
549
|
+
* @deprecated as of 2023-09-25
|
|
550
|
+
*/
|
|
551
|
+
getCrossCollateralWalletV2() {
|
|
552
|
+
return this.getPrivate(`sapi/v2/futures/loan/wallet`);
|
|
512
553
|
}
|
|
513
554
|
/**
|
|
514
|
-
*
|
|
555
|
+
* @deprecated as of 2023-09-25
|
|
515
556
|
*/
|
|
516
|
-
|
|
517
|
-
return this.getPrivate(
|
|
557
|
+
getAdjustCrossCollateralLTVHistory(params) {
|
|
558
|
+
return this.getPrivate(`sapi/v1/futures/loan/adjustCollateral/history`, params);
|
|
518
559
|
}
|
|
519
560
|
/**
|
|
520
|
-
*
|
|
561
|
+
* @deprecated as of 2023-09-25
|
|
521
562
|
*/
|
|
522
|
-
|
|
523
|
-
this.
|
|
524
|
-
return this.postPrivate('api/v3/sor/order', params);
|
|
563
|
+
getCrossCollateralLiquidationHistory(params) {
|
|
564
|
+
return this.getPrivate(`sapi/v1/futures/loan/liquidationHistory`, params);
|
|
525
565
|
}
|
|
526
566
|
/**
|
|
527
|
-
*
|
|
528
|
-
* Creates and validates a new order but does not send it into the matching engine.
|
|
567
|
+
* @deprecated as of 2023-09-25
|
|
529
568
|
*/
|
|
530
|
-
|
|
531
|
-
this.
|
|
532
|
-
return this.postPrivate('api/v3/sor/order/test', params);
|
|
569
|
+
getCrossCollateralInterestHistory(params) {
|
|
570
|
+
return this.getPrivate(`sapi/v1/futures/loan/interestHistory`, params);
|
|
533
571
|
}
|
|
534
572
|
/**
|
|
535
573
|
*
|
|
574
|
+
* WALLET Endpoints - Account endpoints
|
|
536
575
|
*
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
*/
|
|
541
|
-
/**
|
|
542
|
-
* Get current account information
|
|
543
|
-
*/
|
|
544
|
-
getAccountInformation() {
|
|
545
|
-
return this.getPrivate('api/v3/account');
|
|
576
|
+
**/
|
|
577
|
+
getAccountInfo() {
|
|
578
|
+
return this.getPrivate('sapi/v1/account/info');
|
|
546
579
|
}
|
|
547
|
-
|
|
548
|
-
return this.getPrivate('
|
|
580
|
+
getDailyAccountSnapshot(params) {
|
|
581
|
+
return this.getPrivate('sapi/v1/accountSnapshot', params);
|
|
549
582
|
}
|
|
550
|
-
|
|
551
|
-
return this.
|
|
583
|
+
disableFastWithdrawSwitch() {
|
|
584
|
+
return this.postPrivate('sapi/v1/account/disableFastWithdrawSwitch');
|
|
552
585
|
}
|
|
553
|
-
|
|
554
|
-
return this.
|
|
586
|
+
enableFastWithdrawSwitch() {
|
|
587
|
+
return this.postPrivate('sapi/v1/account/enableFastWithdrawSwitch');
|
|
555
588
|
}
|
|
556
|
-
|
|
557
|
-
return this.getPrivate('
|
|
589
|
+
getAccountStatus() {
|
|
590
|
+
return this.getPrivate('sapi/v1/account/status');
|
|
558
591
|
}
|
|
559
|
-
|
|
560
|
-
return this.getPrivate('
|
|
592
|
+
getApiTradingStatus() {
|
|
593
|
+
return this.getPrivate('sapi/v1/account/apiTradingStatus');
|
|
594
|
+
}
|
|
595
|
+
getApiKeyPermissions() {
|
|
596
|
+
return this.getPrivate('sapi/v1/account/apiRestrictions');
|
|
561
597
|
}
|
|
562
598
|
/**
|
|
563
599
|
*
|
|
564
|
-
*
|
|
600
|
+
* WALLET Endpoints - Travel Rule endpoints
|
|
565
601
|
*
|
|
566
602
|
**/
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
603
|
+
// to be added
|
|
604
|
+
/**
|
|
605
|
+
*
|
|
606
|
+
* WALLET Endpoints - Other endpoints
|
|
607
|
+
*
|
|
608
|
+
**/
|
|
609
|
+
getSystemStatus() {
|
|
610
|
+
return this.get('sapi/v1/system/status');
|
|
572
611
|
}
|
|
573
|
-
|
|
574
|
-
return this.
|
|
612
|
+
getDelistSchedule() {
|
|
613
|
+
return this.getPrivate('sapi/v1/spot/delist-schedule');
|
|
575
614
|
}
|
|
576
|
-
|
|
577
|
-
|
|
615
|
+
/**
|
|
616
|
+
*
|
|
617
|
+
* SUB ACCOUNT Endpoints - Account management
|
|
618
|
+
*
|
|
619
|
+
**/
|
|
620
|
+
createVirtualSubAccount(params) {
|
|
621
|
+
return this.postPrivate('sapi/v1/sub-account/virtualSubAccount', params);
|
|
578
622
|
}
|
|
579
|
-
|
|
580
|
-
return this.
|
|
623
|
+
getSubAccountList(params) {
|
|
624
|
+
return this.getPrivate('sapi/v1/sub-account/list', params);
|
|
581
625
|
}
|
|
582
|
-
|
|
583
|
-
this.
|
|
584
|
-
return this.postPrivate('sapi/v1/margin/order', params);
|
|
626
|
+
subAccountEnableFutures(email) {
|
|
627
|
+
return this.postPrivate('sapi/v1/sub-account/futures/enable', { email });
|
|
585
628
|
}
|
|
586
|
-
|
|
587
|
-
return this.
|
|
629
|
+
subAccountEnableMargin(email) {
|
|
630
|
+
return this.postPrivate('sapi/v1/sub-account/margin/enable', { email });
|
|
588
631
|
}
|
|
589
|
-
|
|
590
|
-
return this.
|
|
632
|
+
enableOptionsForSubAccount(params) {
|
|
633
|
+
return this.postPrivate('sapi/v1/sub-account/eoptions/enable', params);
|
|
591
634
|
}
|
|
592
|
-
|
|
593
|
-
return this.postPrivate('sapi/v1/
|
|
635
|
+
subAccountEnableLeverageToken(params) {
|
|
636
|
+
return this.postPrivate('sapi/v1/sub-account/blvt/enable', params);
|
|
594
637
|
}
|
|
595
|
-
|
|
596
|
-
return this.getPrivate('sapi/v1/
|
|
638
|
+
getSubAccountStatusOnMarginOrFutures(params) {
|
|
639
|
+
return this.getPrivate('sapi/v1/sub-account/status', params);
|
|
597
640
|
}
|
|
598
|
-
|
|
599
|
-
return this.getPrivate('sapi/v1/
|
|
641
|
+
getSubAccountFuturesPositionRisk(email) {
|
|
642
|
+
return this.getPrivate('sapi/v1/sub-account/futures/positionRisk', {
|
|
643
|
+
email,
|
|
644
|
+
});
|
|
600
645
|
}
|
|
601
|
-
|
|
602
|
-
return this.getPrivate('sapi/
|
|
646
|
+
getSubAccountFuturesPositionRiskV2(params) {
|
|
647
|
+
return this.getPrivate('sapi/v2/sub-account/futures/positionRisk', params);
|
|
648
|
+
}
|
|
649
|
+
getSubAccountTransactionStatistics(params) {
|
|
650
|
+
return this.getPrivate('sapi/v1/sub-account/transaction-statistics', params);
|
|
603
651
|
}
|
|
604
652
|
/**
|
|
605
|
-
*
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
653
|
+
*
|
|
654
|
+
* SUB ACCOUNT Endpoints - API management
|
|
655
|
+
*
|
|
656
|
+
**/
|
|
657
|
+
getSubAccountIPRestriction(params) {
|
|
658
|
+
return this.getPrivate('sapi/v1/sub-account/subAccountApi/ipRestriction', params);
|
|
659
|
+
}
|
|
660
|
+
subAccountDeleteIPList(params) {
|
|
661
|
+
return this.deletePrivate('sapi/v1/sub-account/subAccountApi/ipRestriction/ipList', params);
|
|
662
|
+
}
|
|
663
|
+
subAccountAddIPRestriction(params) {
|
|
664
|
+
return this.postPrivate('sapi/v2/sub-account/subAccountApi/ipRestriction', params);
|
|
609
665
|
}
|
|
610
666
|
/**
|
|
611
|
-
* @deprecated
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
667
|
+
* @deprecated
|
|
668
|
+
* Use subAccountAddIPRestriction instead
|
|
669
|
+
**/
|
|
670
|
+
subAccountAddIPList(params) {
|
|
671
|
+
return this.postPrivate('sapi/v1/sub-account/subAccountApi/ipRestriction/ipList', params);
|
|
615
672
|
}
|
|
616
|
-
|
|
617
|
-
|
|
673
|
+
/**
|
|
674
|
+
* @deprecated
|
|
675
|
+
* Use subAccountAddIPRestriction instead, or subAccountDeleteIPList
|
|
676
|
+
**/
|
|
677
|
+
subAccountEnableOrDisableIPRestriction(params) {
|
|
678
|
+
return this.postPrivate('sapi/v1/sub-account/subAccountApi/ipRestriction', params);
|
|
618
679
|
}
|
|
619
|
-
|
|
620
|
-
|
|
680
|
+
/**
|
|
681
|
+
*
|
|
682
|
+
* SUB ACCOUNT Endpoints - Asset management
|
|
683
|
+
*
|
|
684
|
+
**/
|
|
685
|
+
subAccountFuturesTransfer(params) {
|
|
686
|
+
return this.postPrivate('sapi/v1/sub-account/futures/transfer', params);
|
|
621
687
|
}
|
|
622
|
-
|
|
623
|
-
return this.getPrivate('sapi/v1/
|
|
688
|
+
getSubAccountFuturesAccountDetail(email) {
|
|
689
|
+
return this.getPrivate('sapi/v1/sub-account/futures/account', { email });
|
|
624
690
|
}
|
|
625
|
-
|
|
626
|
-
return this.getPrivate('sapi/
|
|
691
|
+
getSubAccountDetailOnFuturesAccountV2(params) {
|
|
692
|
+
return this.getPrivate('sapi/v2/sub-account/futures/account', params);
|
|
627
693
|
}
|
|
628
|
-
|
|
629
|
-
this.
|
|
630
|
-
this.validateOrderId(params, 'limitClientOrderId');
|
|
631
|
-
this.validateOrderId(params, 'stopClientOrderId');
|
|
632
|
-
return this.postPrivate('sapi/v1/margin/order/oco', params);
|
|
694
|
+
getSubAccountDetailOnMarginAccount(email) {
|
|
695
|
+
return this.getPrivate('sapi/v1/sub-account/margin/account', { email });
|
|
633
696
|
}
|
|
634
|
-
|
|
635
|
-
this.
|
|
636
|
-
return this.deletePrivate('sapi/v1/margin/orderList', params);
|
|
697
|
+
getSubAccountDepositAddress(params) {
|
|
698
|
+
return this.getPrivate('sapi/v1/capital/deposit/subAddress', params);
|
|
637
699
|
}
|
|
638
|
-
|
|
639
|
-
return this.getPrivate('sapi/v1/
|
|
700
|
+
getSubAccountDepositHistory(params) {
|
|
701
|
+
return this.getPrivate('sapi/v1/capital/deposit/subHisrec', params);
|
|
640
702
|
}
|
|
641
|
-
|
|
642
|
-
return this.getPrivate('sapi/v1/
|
|
703
|
+
getSubAccountFuturesAccountSummary() {
|
|
704
|
+
return this.getPrivate('sapi/v1/sub-account/futures/accountSummary');
|
|
643
705
|
}
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
*/
|
|
647
|
-
queryMarginAccountOpenOCO(params) {
|
|
648
|
-
return this.getPrivate('sapi/v1/margin/openOrderList', params);
|
|
706
|
+
getSubAccountSummaryOnFuturesAccountV2(params) {
|
|
707
|
+
return this.getPrivate('sapi/v2/sub-account/futures/accountSummary', params);
|
|
649
708
|
}
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
*/
|
|
653
|
-
queryMarginAccountTradeList(params) {
|
|
654
|
-
return this.getPrivate('sapi/v1/margin/myTrades', params);
|
|
709
|
+
getSubAccountsSummaryOfMarginAccount() {
|
|
710
|
+
return this.getPrivate('sapi/v1/sub-account/margin/accountSummary');
|
|
655
711
|
}
|
|
656
|
-
|
|
657
|
-
return this.
|
|
712
|
+
subAccountMarginTransfer(params) {
|
|
713
|
+
return this.postPrivate('sapi/v1/sub-account/margin/transfer', params);
|
|
658
714
|
}
|
|
659
|
-
|
|
660
|
-
return this.getPrivate('sapi/
|
|
715
|
+
getSubAccountAssets(params) {
|
|
716
|
+
return this.getPrivate('sapi/v3/sub-account/assets', params);
|
|
661
717
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
*/
|
|
665
|
-
isolatedMarginAccountTransfer(params) {
|
|
666
|
-
return this.postPrivate('sapi/v1/margin/isolated/transfer', params);
|
|
718
|
+
getSubAccountAssetsMaster(params) {
|
|
719
|
+
return this.getPrivate('sapi/v4/sub-account/assets', params);
|
|
667
720
|
}
|
|
668
|
-
|
|
669
|
-
return this.getPrivate('sapi/v1/
|
|
721
|
+
getSubAccountFuturesAssetTransferHistory(params) {
|
|
722
|
+
return this.getPrivate('sapi/v1/sub-account/futures/internalTransfer', params);
|
|
670
723
|
}
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
*/
|
|
674
|
-
disableIsolatedMarginAccount(params) {
|
|
675
|
-
return this.deletePrivate('sapi/v1/margin/isolated/account', params);
|
|
724
|
+
getSubAccountSpotAssetTransferHistory(params) {
|
|
725
|
+
return this.getPrivate('sapi/v1/sub-account/sub/transfer/history', params);
|
|
676
726
|
}
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
*/
|
|
680
|
-
enableIsolatedMarginAccount(params) {
|
|
681
|
-
return this.postPrivate('sapi/v1/margin/isolated/account', params);
|
|
727
|
+
getSubAccountSpotAssetsSummary(params) {
|
|
728
|
+
return this.getPrivate('sapi/v1/sub-account/spotSummary', params);
|
|
682
729
|
}
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
return this.
|
|
730
|
+
getSubAccountUniversalTransferHistory(params) {
|
|
731
|
+
return this.getPrivate('sapi/v1/sub-account/universalTransfer', params);
|
|
732
|
+
}
|
|
733
|
+
subAccountFuturesAssetTransfer(params) {
|
|
734
|
+
return this.postPrivate('sapi/v1/sub-account/futures/internalTransfer', params);
|
|
735
|
+
}
|
|
736
|
+
subAccountTransferHistory(params) {
|
|
737
|
+
return this.getPrivate('sapi/v1/sub-account/transfer/subUserHistory', params);
|
|
738
|
+
}
|
|
739
|
+
subAccountTransferToMaster(params) {
|
|
740
|
+
return this.postPrivate('sapi/v1/sub-account/transfer/subToMaster', params);
|
|
741
|
+
}
|
|
742
|
+
subAccountTransferToSameMaster(params) {
|
|
743
|
+
return this.postPrivate('sapi/v1/sub-account/transfer/subToSub', params);
|
|
744
|
+
}
|
|
745
|
+
subAccountUniversalTransfer(params) {
|
|
746
|
+
return this.postPrivate('sapi/v1/sub-account/universalTransfer', params);
|
|
688
747
|
}
|
|
689
748
|
/**
|
|
690
|
-
*
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
749
|
+
*
|
|
750
|
+
* SUB ACCOUNT Endpoints - Managed Sub Account
|
|
751
|
+
*
|
|
752
|
+
**/
|
|
753
|
+
depositAssetsIntoManagedSubAccount(params) {
|
|
754
|
+
return this.postPrivate('sapi/v1/managed-subaccount/deposit', params);
|
|
755
|
+
}
|
|
756
|
+
getManagedSubAccountDepositAddress(params) {
|
|
757
|
+
return this.getPrivate('sapi/v1/managed-subaccount/deposit/address', params);
|
|
758
|
+
}
|
|
759
|
+
withdrawAssetsFromManagedSubAccount(params) {
|
|
760
|
+
return this.postPrivate('sapi/v1/managed-subaccount/withdraw', params);
|
|
761
|
+
}
|
|
762
|
+
getManagedSubAccountTransfersParent(params) {
|
|
763
|
+
return this.getPrivate('sapi/v1/managed-subaccount/queryTransLogForTradeParent', params);
|
|
764
|
+
}
|
|
765
|
+
getManagedSubAccountTransferLog(params) {
|
|
766
|
+
return this.getPrivate('sapi/v1/managed-subaccount/query-trans-log', params);
|
|
767
|
+
}
|
|
768
|
+
getManagedSubAccountTransfersInvestor(params) {
|
|
769
|
+
return this.getPrivate('sapi/v1/managed-subaccount/queryTransLogForInvestor', params);
|
|
770
|
+
}
|
|
771
|
+
getManagedSubAccounts(params) {
|
|
772
|
+
return this.getPrivate('sapi/v1/managed-subaccount/info', params);
|
|
773
|
+
}
|
|
774
|
+
getManagedSubAccountSnapshot(params) {
|
|
775
|
+
return this.getPrivate('sapi/v1/managed-subaccount/accountSnapshot', params);
|
|
776
|
+
}
|
|
777
|
+
getManagedSubAccountAssetDetails(email) {
|
|
778
|
+
return this.getPrivate('sapi/v1/managed-subaccount/asset', { email });
|
|
779
|
+
}
|
|
780
|
+
getManagedSubAccountMarginAssets(params) {
|
|
781
|
+
return this.getPrivate('sapi/v1/managed-subaccount/marginAsset', params);
|
|
782
|
+
}
|
|
783
|
+
getManagedSubAccountFuturesAssets(params) {
|
|
784
|
+
return this.getPrivate('sapi/v1/managed-subaccount/fetch-future-asset', params);
|
|
694
785
|
}
|
|
695
786
|
/**
|
|
696
|
-
*
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
787
|
+
*
|
|
788
|
+
* AUTO INVEST Endpoints - Market data
|
|
789
|
+
*
|
|
790
|
+
**/
|
|
791
|
+
getAutoInvestAssets() {
|
|
792
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/all/asset');
|
|
793
|
+
}
|
|
794
|
+
getAutoInvestSourceAssets(params) {
|
|
795
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/source-asset/list', params);
|
|
796
|
+
}
|
|
797
|
+
getAutoInvestTargetAssets(params) {
|
|
798
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/target-asset/list', params);
|
|
700
799
|
}
|
|
800
|
+
getAutoInvestTargetAssetsROI(params) {
|
|
801
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/target-asset/roi/list', params);
|
|
802
|
+
}
|
|
803
|
+
getAutoInvestIndex(params) {
|
|
804
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/index/info', params);
|
|
805
|
+
}
|
|
806
|
+
getAutoInvestPlans(params) {
|
|
807
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/plan/list', params);
|
|
808
|
+
}
|
|
809
|
+
/**
|
|
810
|
+
*
|
|
811
|
+
* AUTO INVEST Endpoints - Trade
|
|
812
|
+
*
|
|
813
|
+
**/
|
|
701
814
|
/**
|
|
702
|
-
*
|
|
815
|
+
* https://developers.binance.com/docs/auto_invest/trade/One-Time-Transaction
|
|
816
|
+
*
|
|
817
|
+
* @param params
|
|
818
|
+
* @returns
|
|
703
819
|
*/
|
|
704
|
-
|
|
705
|
-
|
|
820
|
+
submitAutoInvestOneTimeTransaction(params) {
|
|
821
|
+
const { details } = params, allParams = __rest(params, ["details"]);
|
|
822
|
+
const requestParameters = Object.assign({}, allParams);
|
|
823
|
+
for (let i = 0; i < details.length; i++) {
|
|
824
|
+
requestParameters[`details[${i}].targetAsset`] = details[i].targetAsset;
|
|
825
|
+
requestParameters[`details[${i}].percentage`] = details[i].percentage;
|
|
826
|
+
}
|
|
827
|
+
return this.postPrivate('sapi/v1/lending/auto-invest/one-off', requestParameters);
|
|
828
|
+
}
|
|
829
|
+
updateAutoInvestPlanStatus(params) {
|
|
830
|
+
return this.postPrivate('sapi/v1/lending/auto-invest/plan/edit-status', params);
|
|
706
831
|
}
|
|
707
832
|
/**
|
|
708
|
-
*
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
833
|
+
*
|
|
834
|
+
* @deprecated , use updateAutoInvestmentPlan instead
|
|
835
|
+
*
|
|
836
|
+
**/
|
|
837
|
+
updateAutoInvestmentPlanOld(params) {
|
|
838
|
+
return this.postPrivate('sapi/v1/lending/auto-invest/plan/edit', params);
|
|
839
|
+
}
|
|
840
|
+
updateAutoInvestmentPlan(params) {
|
|
841
|
+
const { details } = params, allParams = __rest(params, ["details"]);
|
|
842
|
+
const requestParameters = Object.assign({}, allParams);
|
|
843
|
+
for (let i = 0; i < details.length; i++) {
|
|
844
|
+
requestParameters[`details[${i}].targetAsset`] = details[i].targetAsset;
|
|
845
|
+
requestParameters[`details[${i}].percentage`] = details[i].percentage;
|
|
846
|
+
}
|
|
847
|
+
return this.postPrivate('sapi/v1/lending/auto-invest/plan/edit', requestParameters);
|
|
848
|
+
}
|
|
849
|
+
submitAutoInvestRedemption(params) {
|
|
850
|
+
return this.postPrivate('sapi/v1/lending/auto-invest/redeem', params);
|
|
851
|
+
}
|
|
852
|
+
getAutoInvestSubscriptionTransactions(params) {
|
|
853
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/history/list', params);
|
|
854
|
+
}
|
|
855
|
+
getOneTimeTransactionStatus(params) {
|
|
856
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/one-off/status', params);
|
|
712
857
|
}
|
|
713
858
|
/**
|
|
714
|
-
*
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
859
|
+
* @deprecated , use submitAutoInvestmentPlan instead
|
|
860
|
+
*
|
|
861
|
+
**/
|
|
862
|
+
submitAutoInvestmentPlanOld(params) {
|
|
863
|
+
return this.postPrivate('sapi/v1/lending/auto-invest/plan/add', params);
|
|
864
|
+
}
|
|
865
|
+
submitAutoInvestmentPlan(params) {
|
|
866
|
+
const { details } = params, allParams = __rest(params, ["details"]);
|
|
867
|
+
const requestParameters = Object.assign({}, allParams);
|
|
868
|
+
for (let i = 0; i < details.length; i++) {
|
|
869
|
+
requestParameters[`details[${i}].targetAsset`] = details[i].targetAsset;
|
|
870
|
+
requestParameters[`details[${i}].percentage`] = details[i].percentage;
|
|
871
|
+
}
|
|
872
|
+
return this.postPrivate('sapi/v1/lending/auto-invest/plan/add', requestParameters);
|
|
873
|
+
}
|
|
874
|
+
getAutoInvestRedemptionHistory(params) {
|
|
875
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/redeem/history', params);
|
|
876
|
+
}
|
|
877
|
+
getAutoInvestPlan(params) {
|
|
878
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/plan/id', params);
|
|
879
|
+
}
|
|
880
|
+
getAutoInvestUserIndex(params) {
|
|
881
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/index/user-summary', params);
|
|
882
|
+
}
|
|
883
|
+
getAutoInvestRebalanceHistory(params) {
|
|
884
|
+
return this.getPrivate('sapi/v1/lending/auto-invest/rebalance/history', params);
|
|
718
885
|
}
|
|
719
886
|
/**
|
|
720
|
-
*
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
887
|
+
*
|
|
888
|
+
* CONVERT Endpoints - Market Data
|
|
889
|
+
*
|
|
890
|
+
**/
|
|
891
|
+
getConvertPairs(params) {
|
|
892
|
+
return this.getPrivate('sapi/v1/convert/exchangeInfo', params);
|
|
893
|
+
}
|
|
894
|
+
getConvertAssetInfo() {
|
|
895
|
+
return this.getPrivate('sapi/v1/convert/assetInfo');
|
|
724
896
|
}
|
|
725
897
|
/**
|
|
726
|
-
*
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
898
|
+
*
|
|
899
|
+
* CONVERT Endpoints - Trade
|
|
900
|
+
*
|
|
901
|
+
**/
|
|
902
|
+
convertQuoteRequest(params) {
|
|
903
|
+
return this.postPrivate('sapi/v1/convert/getQuote', params);
|
|
730
904
|
}
|
|
731
|
-
|
|
732
|
-
return this.
|
|
905
|
+
acceptQuoteRequest(params) {
|
|
906
|
+
return this.postPrivate('sapi/v1/convert/acceptQuote', params);
|
|
733
907
|
}
|
|
734
|
-
|
|
735
|
-
return this.getPrivate('sapi/v1/
|
|
908
|
+
getConvertTradeHistory(params) {
|
|
909
|
+
return this.getPrivate('sapi/v1/convert/tradeFlow', params);
|
|
736
910
|
}
|
|
737
|
-
|
|
738
|
-
return this.getPrivate('sapi/v1/
|
|
911
|
+
getOrderStatus(params) {
|
|
912
|
+
return this.getPrivate('sapi/v1/convert/orderStatus', params);
|
|
739
913
|
}
|
|
740
|
-
|
|
741
|
-
return this.postPrivate('sapi/v1/
|
|
914
|
+
submitConvertLimitOrder(params) {
|
|
915
|
+
return this.postPrivate('sapi/v1/convert/limit/placeOrder', params);
|
|
742
916
|
}
|
|
743
|
-
|
|
744
|
-
return this.
|
|
917
|
+
cancelConvertLimitOrder(params) {
|
|
918
|
+
return this.postPrivate('sapi/v1/convert/limit/cancelOrder', params);
|
|
745
919
|
}
|
|
746
|
-
|
|
747
|
-
return this.getPrivate('sapi/v1/
|
|
920
|
+
getConvertLimitOpenOrders() {
|
|
921
|
+
return this.getPrivate('sapi/v1/convert/limit/queryOpenOrders');
|
|
748
922
|
}
|
|
749
|
-
|
|
750
|
-
|
|
923
|
+
/**
|
|
924
|
+
*
|
|
925
|
+
* STAKING Endpoints - Account
|
|
926
|
+
*
|
|
927
|
+
**/
|
|
928
|
+
/**
|
|
929
|
+
* @deprecated use getEthStakingAccountV2 instead
|
|
930
|
+
**/
|
|
931
|
+
getEthStakingAccount() {
|
|
932
|
+
return this.getPrivate('sapi/v1/eth-staking/account');
|
|
751
933
|
}
|
|
752
|
-
|
|
753
|
-
return this.getPrivate('sapi/
|
|
934
|
+
getEthStakingAccountV2() {
|
|
935
|
+
return this.getPrivate('sapi/v2/eth-staking/account');
|
|
754
936
|
}
|
|
755
|
-
|
|
756
|
-
return this.getPrivate('sapi/v1/
|
|
937
|
+
getEthStakingQuota() {
|
|
938
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/quota');
|
|
757
939
|
}
|
|
758
|
-
|
|
759
|
-
|
|
940
|
+
/**
|
|
941
|
+
*
|
|
942
|
+
* STAKING Endpoints - Staking
|
|
943
|
+
*
|
|
944
|
+
**/
|
|
945
|
+
/**
|
|
946
|
+
* @deprecated use subscribeEthStakingV2 instead
|
|
947
|
+
**/
|
|
948
|
+
subscribeEthStakingV1(params) {
|
|
949
|
+
return this.postPrivate('sapi/v1/eth-staking/eth/stake', params);
|
|
760
950
|
}
|
|
761
|
-
|
|
762
|
-
return this.
|
|
951
|
+
subscribeEthStakingV2(params) {
|
|
952
|
+
return this.postPrivate('sapi/v2/eth-staking/eth/stake', params);
|
|
953
|
+
}
|
|
954
|
+
redeemEth(params) {
|
|
955
|
+
return this.postPrivate('sapi/v1/eth-staking/eth/redeem', params);
|
|
956
|
+
}
|
|
957
|
+
wrapBeth(params) {
|
|
958
|
+
return this.postPrivate('sapi/v1/eth-staking/wbeth/wrap', params);
|
|
763
959
|
}
|
|
764
960
|
/**
|
|
765
961
|
*
|
|
766
|
-
*
|
|
962
|
+
* STAKING Endpoints - History
|
|
767
963
|
*
|
|
768
964
|
**/
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
return this.post('api/v3/userDataStream');
|
|
965
|
+
getEthStakingHistory(params) {
|
|
966
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/history/stakingHistory', params);
|
|
772
967
|
}
|
|
773
|
-
|
|
774
|
-
return this.
|
|
968
|
+
getEthRedemptionHistory(params) {
|
|
969
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/history/redemptionHistory', params);
|
|
775
970
|
}
|
|
776
|
-
|
|
777
|
-
return this.
|
|
971
|
+
getBethRewardsHistory(params) {
|
|
972
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/history/rewardsHistory', params);
|
|
778
973
|
}
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
974
|
+
getWbethRewardsHistory(params) {
|
|
975
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/history/wbethRewardsHistory', params);
|
|
976
|
+
}
|
|
977
|
+
getEthRateHistory(params) {
|
|
978
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/history/rateHistory', params);
|
|
979
|
+
}
|
|
980
|
+
getBethWrapHistory(params) {
|
|
981
|
+
return this.getPrivate('sapi/v1/eth-staking/wbeth/history/wrapHistory', params);
|
|
782
982
|
}
|
|
783
|
-
|
|
784
|
-
return this.
|
|
983
|
+
getBethUnwrapHistory(params) {
|
|
984
|
+
return this.getPrivate('sapi/v1/eth-staking/wbeth/history/unwrapHistory', params);
|
|
785
985
|
}
|
|
786
|
-
|
|
787
|
-
|
|
986
|
+
/**
|
|
987
|
+
* @deprecated as of 2024-01-19
|
|
988
|
+
*/
|
|
989
|
+
getStakingProducts(params) {
|
|
990
|
+
return this.getPrivate(`sapi/v1/staking/productList`, params);
|
|
788
991
|
}
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
992
|
+
/**
|
|
993
|
+
* @deprecated as of 2024-01-19
|
|
994
|
+
*/
|
|
995
|
+
getStakingProductPosition(params) {
|
|
996
|
+
return this.getPrivate('sapi/v1/staking/position', params);
|
|
792
997
|
}
|
|
793
|
-
|
|
794
|
-
|
|
998
|
+
/**
|
|
999
|
+
* @deprecated as of 2024-01-19
|
|
1000
|
+
*/
|
|
1001
|
+
getStakingHistory(params) {
|
|
1002
|
+
return this.getPrivate('sapi/v1/staking/stakingRecord', params);
|
|
795
1003
|
}
|
|
796
|
-
|
|
797
|
-
|
|
1004
|
+
/**
|
|
1005
|
+
* @deprecated as of 2024-01-19
|
|
1006
|
+
*/
|
|
1007
|
+
getPersonalLeftQuotaOfStakingProduct(params) {
|
|
1008
|
+
return this.getPrivate('sapi/v1/staking/personalLeftQuota', params);
|
|
798
1009
|
}
|
|
799
1010
|
/**
|
|
800
1011
|
*
|
|
801
|
-
*
|
|
1012
|
+
* COPY TRADING Endpoints - Future copy trading
|
|
802
1013
|
*
|
|
803
1014
|
**/
|
|
804
|
-
|
|
805
|
-
return this.getPrivate(
|
|
806
|
-
}
|
|
807
|
-
getSimpleEarnLockedProductList(params) {
|
|
808
|
-
return this.getPrivate(`/sapi/v1/simple-earn/locked/list`, params);
|
|
809
|
-
}
|
|
810
|
-
purchaseFlexibleProduct(params) {
|
|
811
|
-
return this.postPrivate(`/sapi/v1/simple-earn/flexible/subscribe`, params);
|
|
1015
|
+
getFuturesLeadTraderStatus() {
|
|
1016
|
+
return this.getPrivate('sapi/v1/copyTrading/futures/userStatus');
|
|
812
1017
|
}
|
|
813
|
-
|
|
814
|
-
return this.
|
|
1018
|
+
getFuturesLeadTradingSymbolWhitelist() {
|
|
1019
|
+
return this.getPrivate('sapi/v1/copyTrading/futures/leadSymbol');
|
|
815
1020
|
}
|
|
816
|
-
|
|
817
|
-
|
|
1021
|
+
/**
|
|
1022
|
+
*
|
|
1023
|
+
* MINING Endpoints - rest api
|
|
1024
|
+
*
|
|
1025
|
+
**/
|
|
1026
|
+
getMiningAlgos() {
|
|
1027
|
+
return this.get('sapi/v1/mining/pub/algoList');
|
|
818
1028
|
}
|
|
819
|
-
|
|
820
|
-
return this.
|
|
1029
|
+
getMiningCoins() {
|
|
1030
|
+
return this.get('sapi/v1/mining/pub/coinList');
|
|
821
1031
|
}
|
|
822
|
-
|
|
823
|
-
return this.getPrivate(
|
|
1032
|
+
getHashrateResales(params) {
|
|
1033
|
+
return this.getPrivate('sapi/v1/mining/hash-transfer/config/details/list', params);
|
|
824
1034
|
}
|
|
825
|
-
|
|
826
|
-
return this.getPrivate(
|
|
1035
|
+
getMiners(params) {
|
|
1036
|
+
return this.getPrivate('sapi/v1/mining/worker/list', params);
|
|
827
1037
|
}
|
|
828
|
-
|
|
829
|
-
return this.getPrivate(
|
|
1038
|
+
getMinerDetails(params) {
|
|
1039
|
+
return this.getPrivate('sapi/v1/mining/worker/detail', params);
|
|
830
1040
|
}
|
|
831
|
-
|
|
832
|
-
return this.getPrivate('sapi/v1/
|
|
1041
|
+
getExtraBonuses(params) {
|
|
1042
|
+
return this.getPrivate('sapi/v1/mining/payment/other', params);
|
|
833
1043
|
}
|
|
834
|
-
|
|
835
|
-
return this.getPrivate('sapi/v1/
|
|
1044
|
+
getMiningEarnings(params) {
|
|
1045
|
+
return this.getPrivate('sapi/v1/mining/payment/list', params);
|
|
836
1046
|
}
|
|
837
|
-
|
|
838
|
-
return this.
|
|
1047
|
+
cancelHashrateResaleConfig(params) {
|
|
1048
|
+
return this.postPrivate('sapi/v1/mining/hash-transfer/config/cancel', params);
|
|
839
1049
|
}
|
|
840
|
-
|
|
841
|
-
return this.getPrivate('sapi/v1/
|
|
1050
|
+
getHashrateResale(params) {
|
|
1051
|
+
return this.getPrivate('sapi/v1/mining/hash-transfer/profit/details', params);
|
|
842
1052
|
}
|
|
843
|
-
|
|
844
|
-
return this.getPrivate('sapi/v1/
|
|
1053
|
+
getMiningAccountEarnings(params) {
|
|
1054
|
+
return this.getPrivate('sapi/v1/mining/payment/uid', params);
|
|
845
1055
|
}
|
|
846
|
-
|
|
847
|
-
return this.getPrivate('sapi/v1/
|
|
1056
|
+
getMiningStatistics(params) {
|
|
1057
|
+
return this.getPrivate('sapi/v1/mining/statistics/user/status', params);
|
|
848
1058
|
}
|
|
849
|
-
|
|
850
|
-
return this.postPrivate('sapi/v1/
|
|
1059
|
+
submitHashrateResale(params) {
|
|
1060
|
+
return this.postPrivate('sapi/v1/mining/hash-transfer/config', params);
|
|
851
1061
|
}
|
|
852
|
-
|
|
853
|
-
return this.
|
|
1062
|
+
getMiningAccounts(params) {
|
|
1063
|
+
return this.getPrivate('sapi/v1/mining/statistics/user/list', params);
|
|
854
1064
|
}
|
|
855
|
-
|
|
856
|
-
|
|
1065
|
+
/**
|
|
1066
|
+
*
|
|
1067
|
+
* ALGO TRADING Endpoints - Future algo
|
|
1068
|
+
*
|
|
1069
|
+
**/
|
|
1070
|
+
submitVpNewOrder(params) {
|
|
1071
|
+
this.validateOrderId(params, 'clientAlgoId');
|
|
1072
|
+
return this.postPrivate('sapi/v1/algo/futures/newOrderVp', params);
|
|
857
1073
|
}
|
|
858
|
-
|
|
859
|
-
|
|
1074
|
+
submitTwapNewOrder(params) {
|
|
1075
|
+
this.validateOrderId(params, 'clientAlgoId');
|
|
1076
|
+
return this.postPrivate('sapi/v1/algo/futures/newOrderTwap', params);
|
|
860
1077
|
}
|
|
861
|
-
|
|
862
|
-
return this.
|
|
1078
|
+
cancelAlgoOrder(params) {
|
|
1079
|
+
return this.deletePrivate('sapi/v1/algo/futures/order', params);
|
|
863
1080
|
}
|
|
864
|
-
|
|
865
|
-
return this.getPrivate('sapi/v1/
|
|
1081
|
+
getAlgoSubOrders(params) {
|
|
1082
|
+
return this.getPrivate('sapi/v1/algo/futures/subOrders', params);
|
|
866
1083
|
}
|
|
867
|
-
|
|
868
|
-
return this.getPrivate('sapi/v1/
|
|
1084
|
+
getAlgoOpenOrders() {
|
|
1085
|
+
return this.getPrivate('sapi/v1/algo/futures/openOrders');
|
|
869
1086
|
}
|
|
870
|
-
|
|
871
|
-
return this.getPrivate('sapi/v1/
|
|
1087
|
+
getAlgoHistoricalOrders(params) {
|
|
1088
|
+
return this.getPrivate('sapi/v1/algo/futures/historicalOrders', params);
|
|
872
1089
|
}
|
|
873
1090
|
/**
|
|
874
1091
|
*
|
|
875
|
-
*
|
|
1092
|
+
* ALGO TRADING Endpoints - Spot algo
|
|
876
1093
|
*
|
|
877
1094
|
**/
|
|
878
|
-
|
|
879
|
-
|
|
1095
|
+
submitSpotAlgoTwapOrder(params) {
|
|
1096
|
+
this.validateOrderId(params, 'clientAlgoId');
|
|
1097
|
+
return this.postPrivate('sapi/v1/algo/spot/newOrderTwap', params);
|
|
880
1098
|
}
|
|
881
|
-
|
|
882
|
-
return this.
|
|
1099
|
+
cancelSpotAlgoOrder(params) {
|
|
1100
|
+
return this.deletePrivate('sapi/v1/algo/spot/order', params);
|
|
883
1101
|
}
|
|
884
|
-
|
|
885
|
-
return this.getPrivate('sapi/v1/
|
|
1102
|
+
getSpotAlgoSubOrders(params) {
|
|
1103
|
+
return this.getPrivate('sapi/v1/algo/spot/subOrders', params);
|
|
886
1104
|
}
|
|
887
|
-
|
|
888
|
-
return this.getPrivate('sapi/v1/
|
|
1105
|
+
getSpotAlgoOpenOrders() {
|
|
1106
|
+
return this.getPrivate('sapi/v1/algo/spot/openOrders');
|
|
889
1107
|
}
|
|
890
|
-
|
|
891
|
-
return this.
|
|
1108
|
+
getSpotAlgoHistoricalOrders(params) {
|
|
1109
|
+
return this.getPrivate('sapi/v1/algo/spot/historicalOrders', params);
|
|
892
1110
|
}
|
|
893
1111
|
/**
|
|
894
1112
|
*
|
|
895
|
-
*
|
|
1113
|
+
* CRYPTO LOAN Endpoints - Flexible rate - Market data
|
|
896
1114
|
*
|
|
897
1115
|
**/
|
|
898
|
-
|
|
899
|
-
return this.getPrivate('sapi/
|
|
900
|
-
}
|
|
901
|
-
getAutoInvestTargetAssetsROI(params) {
|
|
902
|
-
return this.getPrivate('sapi/v1/lending/auto-invest/target-asset/roi/list', params);
|
|
1116
|
+
getCryptoLoanFlexibleCollateralAssets(params) {
|
|
1117
|
+
return this.getPrivate('sapi/v2/loan/flexible/collateral/data', params);
|
|
903
1118
|
}
|
|
904
|
-
|
|
905
|
-
return this.getPrivate('sapi/
|
|
1119
|
+
getCryptoLoanFlexibleAssets(params) {
|
|
1120
|
+
return this.getPrivate('sapi/v2/loan/flexible/loanable/data', params);
|
|
906
1121
|
}
|
|
907
|
-
|
|
908
|
-
|
|
1122
|
+
/**
|
|
1123
|
+
*
|
|
1124
|
+
* CRYPTO LOAN Endpoints - Flexible rate - Trade
|
|
1125
|
+
*
|
|
1126
|
+
**/
|
|
1127
|
+
borrowCryptoLoanFlexible(params) {
|
|
1128
|
+
return this.postPrivate('sapi/v2/loan/flexible/borrow', params);
|
|
909
1129
|
}
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
const requestParameters = Object.assign({}, allParams);
|
|
913
|
-
for (let i = 0; i < details.length; i++) {
|
|
914
|
-
requestParameters[`details[${i}].targetAsset`] = details[i].targetAsset;
|
|
915
|
-
requestParameters[`details[${i}].percentage`] = details[i].percentage;
|
|
916
|
-
}
|
|
917
|
-
return this.postPrivate('sapi/v1/lending/auto-invest/plan/add', requestParameters);
|
|
1130
|
+
repayCryptoLoanFlexible(params) {
|
|
1131
|
+
return this.postPrivate('sapi/v2/loan/flexible/repay', params);
|
|
918
1132
|
}
|
|
919
|
-
|
|
920
|
-
return this.postPrivate('sapi/
|
|
1133
|
+
adjustCryptoLoanFlexibleLTV(params) {
|
|
1134
|
+
return this.postPrivate('sapi/v2/loan/flexible/adjust/ltv', params);
|
|
921
1135
|
}
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
return this.postPrivate('sapi/v1/lending/auto-invest/plan/edit', requestParameters);
|
|
1136
|
+
/**
|
|
1137
|
+
*
|
|
1138
|
+
* CRYPTO LOAN Endpoints - Flexible rate - User info
|
|
1139
|
+
*
|
|
1140
|
+
**/
|
|
1141
|
+
getCryptoLoanFlexibleLTVAdjustmentHistory(params) {
|
|
1142
|
+
return this.getPrivate('sapi/v2/loan/flexible/ltv/adjustment/history', params);
|
|
930
1143
|
}
|
|
931
|
-
|
|
932
|
-
return this.
|
|
1144
|
+
getLoanFlexibleBorrowHistory(params) {
|
|
1145
|
+
return this.getPrivate('sapi/v2/loan/flexible/borrow/history', params);
|
|
933
1146
|
}
|
|
934
|
-
|
|
935
|
-
return this.
|
|
1147
|
+
getCryptoLoanFlexibleOngoingOrders(params) {
|
|
1148
|
+
return this.getPrivate('sapi/v2/loan/flexible/ongoing/orders', params);
|
|
936
1149
|
}
|
|
937
|
-
|
|
938
|
-
return this.getPrivate('sapi/
|
|
1150
|
+
getLoanFlexibleRepaymentHistory(params) {
|
|
1151
|
+
return this.getPrivate('sapi/v2/loan/flexible/repay/history', params);
|
|
939
1152
|
}
|
|
940
|
-
|
|
941
|
-
|
|
1153
|
+
/**
|
|
1154
|
+
*
|
|
1155
|
+
* CRYPTO LOAN Endpoints - Stable rate - Market data
|
|
1156
|
+
*
|
|
1157
|
+
**/
|
|
1158
|
+
getCryptoLoanLoanableAssets(params) {
|
|
1159
|
+
return this.getPrivate('sapi/v1/loan/loanable/data', params);
|
|
942
1160
|
}
|
|
943
|
-
|
|
944
|
-
return this.getPrivate('sapi/v1/
|
|
1161
|
+
getCryptoLoanCollateralRepayRate(params) {
|
|
1162
|
+
return this.getPrivate('sapi/v1/loan/repay/collateral/rate', params);
|
|
945
1163
|
}
|
|
946
|
-
|
|
947
|
-
return this.getPrivate('sapi/v1/
|
|
1164
|
+
getCryptoLoanCollateralAssetsData(params) {
|
|
1165
|
+
return this.getPrivate('sapi/v1/loan/collateral/data', params);
|
|
948
1166
|
}
|
|
949
|
-
|
|
950
|
-
return this.getPrivate('sapi/v1/
|
|
1167
|
+
getCryptoLoansIncomeHistory(params) {
|
|
1168
|
+
return this.getPrivate('sapi/v1/loan/income', params);
|
|
951
1169
|
}
|
|
952
1170
|
/**
|
|
953
|
-
* https://developers.binance.com/docs/auto_invest/trade/One-Time-Transaction
|
|
954
1171
|
*
|
|
955
|
-
*
|
|
956
|
-
*
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
const requestParameters = Object.assign({}, allParams);
|
|
961
|
-
for (let i = 0; i < details.length; i++) {
|
|
962
|
-
requestParameters[`details[${i}].targetAsset`] = details[i].targetAsset;
|
|
963
|
-
requestParameters[`details[${i}].percentage`] = details[i].percentage;
|
|
964
|
-
}
|
|
965
|
-
return this.postPrivate('sapi/v1/lending/auto-invest/one-off', requestParameters);
|
|
966
|
-
}
|
|
967
|
-
getOneTimeTransactionStatus(params) {
|
|
968
|
-
return this.getPrivate('sapi/v1/lending/auto-invest/one-off/status', params);
|
|
1172
|
+
* CRYPTO LOAN Endpoints - Stable rate - Trade
|
|
1173
|
+
*
|
|
1174
|
+
**/
|
|
1175
|
+
borrowCryptoLoan(params) {
|
|
1176
|
+
return this.postPrivate('sapi/v1/loan/borrow', params);
|
|
969
1177
|
}
|
|
970
|
-
|
|
971
|
-
return this.postPrivate('sapi/v1/
|
|
1178
|
+
repayCryptoLoan(params) {
|
|
1179
|
+
return this.postPrivate('sapi/v1/loan/repay', params);
|
|
972
1180
|
}
|
|
973
|
-
|
|
974
|
-
return this.
|
|
1181
|
+
adjustCryptoLoanLTV(params) {
|
|
1182
|
+
return this.postPrivate('sapi/v1/loan/adjust/ltv', params);
|
|
975
1183
|
}
|
|
976
|
-
|
|
977
|
-
return this.
|
|
1184
|
+
customizeCryptoLoanMarginCall(params) {
|
|
1185
|
+
return this.postPrivate('sapi/v1/loan/customize/margin_call', params);
|
|
978
1186
|
}
|
|
979
1187
|
/**
|
|
980
1188
|
*
|
|
981
|
-
*
|
|
1189
|
+
* CRYPTO LOAN Endpoints - Stable rate - User info
|
|
982
1190
|
*
|
|
983
1191
|
**/
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
*/
|
|
987
|
-
getStakingProducts(params) {
|
|
988
|
-
return this.getPrivate(`sapi/v1/staking/productList`, params);
|
|
1192
|
+
getCryptoLoanOngoingOrders(params) {
|
|
1193
|
+
return this.getPrivate('sapi/v1/loan/ongoing/orders', params);
|
|
989
1194
|
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
*/
|
|
993
|
-
getStakingProductPosition(params) {
|
|
994
|
-
return this.getPrivate('sapi/v1/staking/position', params);
|
|
1195
|
+
getCryptoLoanBorrowHistory(params) {
|
|
1196
|
+
return this.getPrivate('sapi/v1/loan/borrow/history', params);
|
|
995
1197
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
return this.getPrivate('sapi/v1/
|
|
1198
|
+
getCryptoLoanLTVAdjustmentHistory(params) {
|
|
1199
|
+
return this.getPrivate('sapi/v1/loan/ltv/adjustment/history', params);
|
|
1200
|
+
}
|
|
1201
|
+
getCryptoLoanRepaymentHistory(params) {
|
|
1202
|
+
return this.getPrivate('sapi/v1/loan/repay/history', params);
|
|
1001
1203
|
}
|
|
1002
1204
|
/**
|
|
1003
|
-
*
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1205
|
+
*
|
|
1206
|
+
* SIMPLE EARN Endpoints - Account
|
|
1207
|
+
*
|
|
1208
|
+
**/
|
|
1209
|
+
getSimpleEarnAccount() {
|
|
1210
|
+
return this.getPrivate(`/sapi/v1/simple-earn/account`);
|
|
1007
1211
|
}
|
|
1008
|
-
|
|
1009
|
-
return this.
|
|
1212
|
+
getFlexibleSavingProducts(params) {
|
|
1213
|
+
return this.getPrivate(`/sapi/v1/simple-earn/flexible/list`, params);
|
|
1010
1214
|
}
|
|
1011
|
-
|
|
1012
|
-
return this.
|
|
1215
|
+
getSimpleEarnLockedProductList(params) {
|
|
1216
|
+
return this.getPrivate(`/sapi/v1/simple-earn/locked/list`, params);
|
|
1013
1217
|
}
|
|
1014
|
-
|
|
1015
|
-
return this.
|
|
1218
|
+
getFlexibleProductPosition(params) {
|
|
1219
|
+
return this.getPrivate(`/sapi/v1/simple-earn/flexible/position`, params);
|
|
1016
1220
|
}
|
|
1017
|
-
|
|
1018
|
-
return this.getPrivate(
|
|
1221
|
+
getLockedProductPosition(params) {
|
|
1222
|
+
return this.getPrivate(`/sapi/v1/simple-earn/locked/position`, params);
|
|
1019
1223
|
}
|
|
1020
|
-
|
|
1021
|
-
return this.getPrivate('sapi/v1/
|
|
1224
|
+
getFlexiblePersonalLeftQuota(params) {
|
|
1225
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/personalLeftQuota', params);
|
|
1022
1226
|
}
|
|
1023
|
-
|
|
1024
|
-
return this.getPrivate('sapi/v1/
|
|
1227
|
+
getLockedPersonalLeftQuota(params) {
|
|
1228
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/personalLeftQuota', params);
|
|
1025
1229
|
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1230
|
+
/**
|
|
1231
|
+
*
|
|
1232
|
+
* SIMPLE EARN Endpoints - Earn
|
|
1233
|
+
*
|
|
1234
|
+
**/
|
|
1235
|
+
purchaseFlexibleProduct(params) {
|
|
1236
|
+
return this.postPrivate(`/sapi/v1/simple-earn/flexible/subscribe`, params);
|
|
1028
1237
|
}
|
|
1029
|
-
|
|
1030
|
-
return this.
|
|
1238
|
+
subscribeSimpleEarnLockedProduct(params) {
|
|
1239
|
+
return this.postPrivate(`/sapi/v1/simple-earn/locked/subscribe`, params);
|
|
1031
1240
|
}
|
|
1032
|
-
|
|
1033
|
-
return this.
|
|
1241
|
+
redeemFlexibleProduct(params) {
|
|
1242
|
+
return this.postPrivate(`/sapi/v1/simple-earn/flexible/redeem`, params);
|
|
1034
1243
|
}
|
|
1035
|
-
|
|
1036
|
-
return this.
|
|
1244
|
+
redeemLockedProduct(params) {
|
|
1245
|
+
return this.postPrivate(`/sapi/v1/simple-earn/locked/redeem`, params);
|
|
1037
1246
|
}
|
|
1038
|
-
|
|
1039
|
-
return this.postPrivate('sapi/v1/
|
|
1247
|
+
setFlexibleAutoSubscribe(params) {
|
|
1248
|
+
return this.postPrivate('sapi/v1/simple-earn/flexible/setAutoSubscribe', params);
|
|
1040
1249
|
}
|
|
1041
|
-
|
|
1042
|
-
return this.
|
|
1250
|
+
setLockedAutoSubscribe(params) {
|
|
1251
|
+
return this.postPrivate('sapi/v1/simple-earn/locked/setAutoSubscribe', params);
|
|
1043
1252
|
}
|
|
1044
|
-
|
|
1045
|
-
return this.getPrivate('sapi/v1/
|
|
1253
|
+
getFlexibleSubscriptionPreview(params) {
|
|
1254
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/subscriptionPreview', params);
|
|
1046
1255
|
}
|
|
1047
|
-
|
|
1048
|
-
return this.getPrivate('sapi/v1/
|
|
1256
|
+
getLockedSubscriptionPreview(params) {
|
|
1257
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/subscriptionPreview', params);
|
|
1258
|
+
}
|
|
1259
|
+
setLockedProductRedeemOption(params) {
|
|
1260
|
+
return this.postPrivate('sapi/v1/simple-earn/locked/setRedeemOption', params);
|
|
1049
1261
|
}
|
|
1050
1262
|
/**
|
|
1051
1263
|
*
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1264
|
+
* SIMPLE EARN Endpoints - History
|
|
1265
|
+
*
|
|
1054
1266
|
**/
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
*/
|
|
1058
|
-
getLeftDailyPurchaseQuotaFlexibleProduct(params) {
|
|
1059
|
-
return this.getPrivate(`sapi/v1/lending/daily/userLeftQuota`, params);
|
|
1060
|
-
}
|
|
1061
|
-
/**
|
|
1062
|
-
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1063
|
-
*/
|
|
1064
|
-
getLeftDailyRedemptionQuotaFlexibleProduct(params) {
|
|
1065
|
-
return this.getPrivate(`sapi/v1/lending/daily/userRedemptionQuota`, params);
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1069
|
-
*/
|
|
1070
|
-
purchaseFixedAndActivityProject(params) {
|
|
1071
|
-
return this.postPrivate(`sapi/v1/lending/customizedFixed/purchase`, params);
|
|
1267
|
+
getFlexibleSubscriptionRecord(params) {
|
|
1268
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/subscriptionRecord', params);
|
|
1072
1269
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
*/
|
|
1076
|
-
getFixedAndActivityProjects(params) {
|
|
1077
|
-
return this.getPrivate(`sapi/v1/lending/project/list`, params);
|
|
1270
|
+
getLockedSubscriptionRecord(params) {
|
|
1271
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/history/subscriptionRecord', params);
|
|
1078
1272
|
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
*/
|
|
1082
|
-
getFixedAndActivityProductPosition(params) {
|
|
1083
|
-
return this.getPrivate(`sapi/v1/lending/project/position/list`, params);
|
|
1273
|
+
getFlexibleRedemptionRecord(params) {
|
|
1274
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/redemptionRecord', params);
|
|
1084
1275
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
*/
|
|
1088
|
-
getLendingAccount() {
|
|
1089
|
-
return this.getPrivate(`sapi/v1/lending/union/account`);
|
|
1276
|
+
getLockedRedemptionRecord(params) {
|
|
1277
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/history/redemptionRecord', params);
|
|
1090
1278
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
*/
|
|
1094
|
-
getPurchaseRecord(params) {
|
|
1095
|
-
return this.getPrivate(`sapi/v1/lending/union/purchaseRecord`, params);
|
|
1279
|
+
getFlexibleRewardsHistory(params) {
|
|
1280
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/rewardsRecord', params);
|
|
1096
1281
|
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
*/
|
|
1100
|
-
getRedemptionRecord(params) {
|
|
1101
|
-
return this.getPrivate(`sapi/v1/lending/union/redemptionRecord`, params);
|
|
1282
|
+
getLockedRewardsHistory(params) {
|
|
1283
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/history/rewardsRecord', params);
|
|
1102
1284
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
*/
|
|
1106
|
-
getInterestHistory(params) {
|
|
1107
|
-
return this.getPrivate(`sapi/v1/lending/union/interestHistory`, params);
|
|
1285
|
+
getCollateralRecord(params) {
|
|
1286
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/collateralRecord', params);
|
|
1108
1287
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
*/
|
|
1112
|
-
changeFixedAndActivityPositionToDailyPosition(params) {
|
|
1113
|
-
return this.postPrivate(`sapi/v1/lending/positionChanged`, params);
|
|
1288
|
+
getRateHistory(params) {
|
|
1289
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/rateHistory', params);
|
|
1114
1290
|
}
|
|
1115
1291
|
/**
|
|
1116
1292
|
*
|
|
1117
|
-
*
|
|
1293
|
+
* VIP LOAN Endpoints - Market Data
|
|
1118
1294
|
*
|
|
1119
1295
|
**/
|
|
1120
|
-
|
|
1121
|
-
return this.
|
|
1122
|
-
}
|
|
1123
|
-
getMiningCoins() {
|
|
1124
|
-
return this.get('sapi/v1/mining/pub/coinList');
|
|
1125
|
-
}
|
|
1126
|
-
getMinerDetails(params) {
|
|
1127
|
-
return this.getPrivate('sapi/v1/mining/worker/detail', params);
|
|
1128
|
-
}
|
|
1129
|
-
getMiners(params) {
|
|
1130
|
-
return this.getPrivate('sapi/v1/mining/worker/list', params);
|
|
1296
|
+
getVipBorrowInterestRate(params) {
|
|
1297
|
+
return this.getPrivate('sapi/v1/loan/vip/request/interestRate', params);
|
|
1131
1298
|
}
|
|
1132
|
-
|
|
1133
|
-
return this.getPrivate('sapi/v1/
|
|
1299
|
+
getVipLoanableAssets(params) {
|
|
1300
|
+
return this.getPrivate('sapi/v1/loan/vip/loanable/data', params);
|
|
1134
1301
|
}
|
|
1135
|
-
|
|
1136
|
-
return this.getPrivate('sapi/v1/
|
|
1302
|
+
getVipCollateralAssets(params) {
|
|
1303
|
+
return this.getPrivate('sapi/v1/loan/vip/collateral/data', params);
|
|
1137
1304
|
}
|
|
1138
|
-
|
|
1139
|
-
|
|
1305
|
+
/**
|
|
1306
|
+
*
|
|
1307
|
+
* VIP LOAN Endpoints - User Info
|
|
1308
|
+
*
|
|
1309
|
+
**/
|
|
1310
|
+
getVipLoanOpenOrders(params) {
|
|
1311
|
+
return this.getPrivate('sapi/v1/loan/vip/ongoing/orders', params);
|
|
1140
1312
|
}
|
|
1141
|
-
|
|
1142
|
-
return this.getPrivate('sapi/v1/
|
|
1313
|
+
getVipLoanRepaymentHistory(params) {
|
|
1314
|
+
return this.getPrivate('sapi/v1/loan/vip/repay/history', params);
|
|
1143
1315
|
}
|
|
1144
|
-
|
|
1145
|
-
return this.
|
|
1316
|
+
checkVipCollateralAccount(params) {
|
|
1317
|
+
return this.getPrivate('sapi/v1/loan/vip/collateral/account', params);
|
|
1146
1318
|
}
|
|
1147
|
-
|
|
1148
|
-
return this.
|
|
1319
|
+
getVipApplicationStatus(params) {
|
|
1320
|
+
return this.getPrivate('sapi/v1/loan/vip/request/data', params);
|
|
1149
1321
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1322
|
+
/**
|
|
1323
|
+
*
|
|
1324
|
+
* VIP LOAN Endpoints - Trade
|
|
1325
|
+
*
|
|
1326
|
+
**/
|
|
1327
|
+
renewVipLoan(params) {
|
|
1328
|
+
return this.postPrivate('sapi/v1/loan/vip/renew', params);
|
|
1152
1329
|
}
|
|
1153
|
-
|
|
1154
|
-
return this.
|
|
1330
|
+
repayVipLoan(params) {
|
|
1331
|
+
return this.postPrivate('sapi/v1/loan/vip/repay', params);
|
|
1155
1332
|
}
|
|
1156
|
-
|
|
1157
|
-
return this.
|
|
1333
|
+
borrowVipLoan(params) {
|
|
1334
|
+
return this.postPrivate('sapi/v1/loan/vip/borrow', params);
|
|
1158
1335
|
}
|
|
1159
1336
|
/**
|
|
1160
1337
|
*
|
|
1161
|
-
*
|
|
1162
|
-
* https://binance-docs.github.io/apidocs/spot/en/#futures
|
|
1163
|
-
*
|
|
1164
|
-
* Note: to trade futures use the usdm-client or coinm-client.
|
|
1165
|
-
* MainClient only has the futures endpoints listed in the "spot" docs category, primarily used for transfers.
|
|
1338
|
+
* DUAL INVESTMENT Endpoints - Market Data
|
|
1166
1339
|
*
|
|
1167
1340
|
**/
|
|
1341
|
+
getDualInvestmentProducts(params) {
|
|
1342
|
+
return this.getPrivate('sapi/v1/dci/product/list', params);
|
|
1343
|
+
}
|
|
1168
1344
|
/**
|
|
1169
|
-
* Execute transfer between spot account and futures account.
|
|
1170
1345
|
*
|
|
1171
|
-
*
|
|
1172
|
-
*
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
*/
|
|
1177
|
-
submitNewFutureAccountTransfer(params) {
|
|
1178
|
-
return this.postPrivate(`sapi/v1/futures/transfer`, params);
|
|
1346
|
+
* DUAL INVESTMENT Endpoints - Trade
|
|
1347
|
+
*
|
|
1348
|
+
**/
|
|
1349
|
+
subscribeDualInvestmentProduct(params) {
|
|
1350
|
+
return this.postPrivate('sapi/v1/dci/product/subscribe', params);
|
|
1179
1351
|
}
|
|
1180
|
-
|
|
1181
|
-
return this.getPrivate(
|
|
1352
|
+
getDualInvestmentPositions(params) {
|
|
1353
|
+
return this.getPrivate('sapi/v1/dci/product/positions', params);
|
|
1182
1354
|
}
|
|
1183
|
-
|
|
1184
|
-
return this.getPrivate('sapi/v1/
|
|
1355
|
+
getDualInvestmentAccounts() {
|
|
1356
|
+
return this.getPrivate('sapi/v1/dci/product/accounts');
|
|
1185
1357
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
*/
|
|
1189
|
-
getCrossCollateralBorrowHistory(params) {
|
|
1190
|
-
return this.getPrivate(`sapi/v1/futures/loan/borrow/history`, params);
|
|
1358
|
+
updateAutoCompoundStatus(params) {
|
|
1359
|
+
return this.postPrivate('sapi/v1/dci/product/auto_compound/edit-status', params);
|
|
1191
1360
|
}
|
|
1192
1361
|
/**
|
|
1193
|
-
*
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1362
|
+
*
|
|
1363
|
+
* GIFT CARD Endpoints - Market Data
|
|
1364
|
+
*
|
|
1365
|
+
**/
|
|
1366
|
+
createGiftCard(params) {
|
|
1367
|
+
return this.postPrivate('sapi/v1/giftcard/createCode', params);
|
|
1197
1368
|
}
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
*/
|
|
1201
|
-
getCrossCollateralWalletV2() {
|
|
1202
|
-
return this.getPrivate(`sapi/v2/futures/loan/wallet`);
|
|
1369
|
+
createDualTokenGiftCard(params) {
|
|
1370
|
+
return this.postPrivate('sapi/v1/giftcard/buyCode', params);
|
|
1203
1371
|
}
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
*/
|
|
1207
|
-
getAdjustCrossCollateralLTVHistory(params) {
|
|
1208
|
-
return this.getPrivate(`sapi/v1/futures/loan/adjustCollateral/history`, params);
|
|
1372
|
+
redeemGiftCard(params) {
|
|
1373
|
+
return this.postPrivate('sapi/v1/giftcard/redeemCode', params);
|
|
1209
1374
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
*/
|
|
1213
|
-
getCrossCollateralLiquidationHistory(params) {
|
|
1214
|
-
return this.getPrivate(`sapi/v1/futures/loan/liquidationHistory`, params);
|
|
1375
|
+
verifyGiftCard(params) {
|
|
1376
|
+
return this.getPrivate('sapi/v1/giftcard/verify', params);
|
|
1215
1377
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
return this.getPrivate(
|
|
1378
|
+
getTokenLimit(params) {
|
|
1379
|
+
return this.getPrivate('sapi/v1/giftcard/buyCode/token-limit', params);
|
|
1380
|
+
}
|
|
1381
|
+
getRsaPublicKey() {
|
|
1382
|
+
return this.getPrivate('sapi/v1/giftcard/cryptography/rsa-public-key');
|
|
1221
1383
|
}
|
|
1222
1384
|
/**
|
|
1223
1385
|
*
|
|
1224
|
-
*
|
|
1386
|
+
* NFT Endpoints - REST api
|
|
1225
1387
|
*
|
|
1226
1388
|
**/
|
|
1227
|
-
|
|
1228
|
-
this.
|
|
1229
|
-
return this.postPrivate('sapi/v1/algo/futures/newOrderVp', params);
|
|
1230
|
-
}
|
|
1231
|
-
submitTwapNewOrder(params) {
|
|
1232
|
-
this.validateOrderId(params, 'clientAlgoId');
|
|
1233
|
-
return this.postPrivate('sapi/v1/algo/futures/newOrderTwap', params);
|
|
1389
|
+
getNftTransactionHistory(params) {
|
|
1390
|
+
return this.getPrivate('sapi/v1/nft/history/transactions', params);
|
|
1234
1391
|
}
|
|
1235
|
-
|
|
1236
|
-
return this.
|
|
1392
|
+
getNftDepositHistory(params) {
|
|
1393
|
+
return this.getPrivate('sapi/v1/nft/history/deposit', params);
|
|
1237
1394
|
}
|
|
1238
|
-
|
|
1239
|
-
return this.getPrivate('sapi/v1/
|
|
1395
|
+
getNftWithdrawHistory(params) {
|
|
1396
|
+
return this.getPrivate('sapi/v1/nft/history/withdraw', params);
|
|
1240
1397
|
}
|
|
1241
|
-
|
|
1242
|
-
return this.getPrivate('sapi/v1/
|
|
1398
|
+
getNftAsset(params) {
|
|
1399
|
+
return this.getPrivate('sapi/v1/nft/user/getAsset', params);
|
|
1243
1400
|
}
|
|
1244
|
-
|
|
1245
|
-
|
|
1401
|
+
/**
|
|
1402
|
+
*
|
|
1403
|
+
* C2C Endpoints
|
|
1404
|
+
*
|
|
1405
|
+
**/
|
|
1406
|
+
getC2CTradeHistory(params) {
|
|
1407
|
+
return this.getPrivate('sapi/v1/c2c/orderMatch/listUserOrderHistory', params);
|
|
1246
1408
|
}
|
|
1247
1409
|
/**
|
|
1248
1410
|
*
|
|
1249
|
-
*
|
|
1411
|
+
* FIAT Endpoints - REST api
|
|
1250
1412
|
*
|
|
1251
1413
|
**/
|
|
1252
|
-
|
|
1253
|
-
this.
|
|
1254
|
-
return this.postPrivate('sapi/v1/algo/spot/newOrderTwap', params);
|
|
1414
|
+
getFiatOrderHistory(params) {
|
|
1415
|
+
return this.getPrivate('sapi/v1/fiat/orders', params);
|
|
1255
1416
|
}
|
|
1256
|
-
|
|
1257
|
-
return this.
|
|
1417
|
+
getFiatPaymentsHistory(params) {
|
|
1418
|
+
return this.getPrivate('sapi/v1/fiat/payments', params);
|
|
1258
1419
|
}
|
|
1259
|
-
|
|
1260
|
-
|
|
1420
|
+
/**
|
|
1421
|
+
*
|
|
1422
|
+
* Rebate Endpoints
|
|
1423
|
+
*
|
|
1424
|
+
**/
|
|
1425
|
+
getSpotRebateHistoryRecords(params) {
|
|
1426
|
+
return this.getPrivate('sapi/v1/rebate/taxQuery', params);
|
|
1261
1427
|
}
|
|
1262
|
-
|
|
1263
|
-
|
|
1428
|
+
/**
|
|
1429
|
+
*
|
|
1430
|
+
* DERIVATIVES - Portfolio Margin Pro - Market Data
|
|
1431
|
+
* This is in mainclient because it shares the same base url
|
|
1432
|
+
*
|
|
1433
|
+
**/
|
|
1434
|
+
getPortfolioMarginIndexPrice(params) {
|
|
1435
|
+
return this.get('sapi/v1/portfolio/asset-index-price', params);
|
|
1264
1436
|
}
|
|
1265
|
-
|
|
1266
|
-
return this.getPrivate('sapi/v1/
|
|
1437
|
+
getPortfolioMarginAssetLeverage() {
|
|
1438
|
+
return this.getPrivate('sapi/v1/portfolio/margin-asset-leverage');
|
|
1267
1439
|
}
|
|
1268
1440
|
/**
|
|
1269
1441
|
*
|
|
1270
|
-
* Portfolio Margin Pro
|
|
1442
|
+
* DERIVATIVES - Portfolio Margin Pro - Account
|
|
1443
|
+
* This is in mainclient because it shares the same base url
|
|
1271
1444
|
*
|
|
1272
1445
|
**/
|
|
1273
|
-
getPortfolioMarginProAccountInfo() {
|
|
1274
|
-
return this.getPrivate('sapi/v1/portfolio/account');
|
|
1275
|
-
}
|
|
1276
1446
|
getPortfolioMarginProCollateralRate() {
|
|
1277
1447
|
return this.get('sapi/v1/portfolio/collateralRate');
|
|
1278
1448
|
}
|
|
1279
|
-
|
|
1280
|
-
return this.getPrivate('sapi/v1/portfolio/
|
|
1281
|
-
}
|
|
1282
|
-
repayPortfolioMarginProBankruptcyLoan(params) {
|
|
1283
|
-
return this.postPrivate('sapi/v1/portfolio/repay', params);
|
|
1284
|
-
}
|
|
1285
|
-
getPortfolioMarginProInterestHistory(params) {
|
|
1286
|
-
return this.getPrivate('sapi/v1/portfolio/interest-history', params);
|
|
1449
|
+
getPortfolioMarginProAccountInfo() {
|
|
1450
|
+
return this.getPrivate('sapi/v1/portfolio/account');
|
|
1287
1451
|
}
|
|
1288
|
-
|
|
1289
|
-
return this.
|
|
1452
|
+
bnbTransfer(params) {
|
|
1453
|
+
return this.postPrivate('sapi/v1/portfolio/bnb-transfer', params);
|
|
1290
1454
|
}
|
|
1291
1455
|
submitPortfolioMarginProFullTransfer() {
|
|
1292
1456
|
return this.postPrivate('sapi/v1/portfolio/auto-collection');
|
|
@@ -1294,8 +1458,14 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1294
1458
|
submitPortfolioMarginProSpecificTransfer(params) {
|
|
1295
1459
|
return this.postPrivate('sapi/v1/portfolio/asset-collection', params);
|
|
1296
1460
|
}
|
|
1297
|
-
|
|
1298
|
-
return this.postPrivate('sapi/v1/portfolio/
|
|
1461
|
+
repayPortfolioMarginProBankruptcyLoan(params) {
|
|
1462
|
+
return this.postPrivate('sapi/v1/portfolio/repay', params);
|
|
1463
|
+
}
|
|
1464
|
+
getPortfolioMarginProBankruptcyLoanAmount() {
|
|
1465
|
+
return this.getPrivate('sapi/v1/portfolio/pmLoan');
|
|
1466
|
+
}
|
|
1467
|
+
repayFuturesNegativeBalance() {
|
|
1468
|
+
return this.postPrivate('sapi/v1/portfolio/repay-futures-negative-balance');
|
|
1299
1469
|
}
|
|
1300
1470
|
updateAutoRepayFuturesStatus(params) {
|
|
1301
1471
|
return this.postPrivate('sapi/v1/portfolio/repay-futures-switch', params);
|
|
@@ -1303,16 +1473,22 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1303
1473
|
getAutoRepayFuturesStatus() {
|
|
1304
1474
|
return this.getPrivate('sapi/v1/portfolio/repay-futures-switch');
|
|
1305
1475
|
}
|
|
1306
|
-
|
|
1307
|
-
return this.
|
|
1476
|
+
getPortfolioMarginProInterestHistory(params) {
|
|
1477
|
+
return this.getPrivate('sapi/v1/portfolio/interest-history', params);
|
|
1308
1478
|
}
|
|
1309
|
-
|
|
1310
|
-
|
|
1479
|
+
/**
|
|
1480
|
+
*
|
|
1481
|
+
* DERIVATIVES - Futures Data - Market
|
|
1482
|
+
* This is in mainclient because it shares the same base url
|
|
1483
|
+
*
|
|
1484
|
+
**/
|
|
1485
|
+
getFuturesTickLevelOrderbookDataLink(params) {
|
|
1486
|
+
return this.getPrivate('sapi/v1/futures/histDataLink', params);
|
|
1311
1487
|
}
|
|
1312
1488
|
/**
|
|
1313
1489
|
*
|
|
1314
1490
|
* BLVT Endpoints
|
|
1315
|
-
*
|
|
1491
|
+
* BLVT category is possibly @deprecated, found only in old docs
|
|
1316
1492
|
**/
|
|
1317
1493
|
getBlvtInfo(params) {
|
|
1318
1494
|
return this.get('sapi/v1/blvt/tokenInfo', params);
|
|
@@ -1334,225 +1510,238 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1334
1510
|
}
|
|
1335
1511
|
/**
|
|
1336
1512
|
*
|
|
1337
|
-
*
|
|
1338
|
-
*
|
|
1339
|
-
**/
|
|
1340
|
-
getFiatOrderHistory(params) {
|
|
1341
|
-
return this.getPrivate('sapi/v1/fiat/orders', params);
|
|
1342
|
-
}
|
|
1343
|
-
getFiatPaymentsHistory(params) {
|
|
1344
|
-
return this.getPrivate('sapi/v1/fiat/payments', params);
|
|
1345
|
-
}
|
|
1346
|
-
/**
|
|
1347
|
-
*
|
|
1348
|
-
* C2C Endpoints
|
|
1349
|
-
*
|
|
1513
|
+
* Pay endpoints
|
|
1514
|
+
* Found only in old docs, possibly @deprecated
|
|
1350
1515
|
**/
|
|
1351
|
-
|
|
1352
|
-
return this.getPrivate('sapi/v1/
|
|
1516
|
+
getPayTransactions(params) {
|
|
1517
|
+
return this.getPrivate('sapi/v1/pay/transactions', params);
|
|
1353
1518
|
}
|
|
1354
1519
|
/**
|
|
1355
1520
|
*
|
|
1356
|
-
*
|
|
1357
|
-
*
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
return this.
|
|
1361
|
-
}
|
|
1362
|
-
repayVipLoan(params) {
|
|
1363
|
-
return this.postPrivate('sapi/v1/loan/vip/repay', params);
|
|
1364
|
-
}
|
|
1365
|
-
getVipLoanRepaymentHistory(params) {
|
|
1366
|
-
return this.getPrivate('sapi/v1/loan/vip/repay/history', params);
|
|
1367
|
-
}
|
|
1368
|
-
renewVipLoan(params) {
|
|
1369
|
-
return this.postPrivate('sapi/v1/loan/vip/renew', params);
|
|
1370
|
-
}
|
|
1371
|
-
checkVipCollateralAccount(params) {
|
|
1372
|
-
return this.getPrivate('sapi/v1/loan/vip/collateral/account', params);
|
|
1373
|
-
}
|
|
1374
|
-
borrowVipLoan(params) {
|
|
1375
|
-
return this.postPrivate('sapi/v1/loan/vip/borrow', params);
|
|
1376
|
-
}
|
|
1377
|
-
getVipLoanableAssets(params) {
|
|
1378
|
-
return this.getPrivate('sapi/v1/loan/vip/loanable/data', params);
|
|
1379
|
-
}
|
|
1380
|
-
getVipCollateralAssets(params) {
|
|
1381
|
-
return this.getPrivate('sapi/v1/loan/vip/collateral/data', params);
|
|
1382
|
-
}
|
|
1383
|
-
getVipApplicationStatus(params) {
|
|
1384
|
-
return this.getPrivate('sapi/v1/loan/vip/request/data', params);
|
|
1521
|
+
* EXCHANGE LINK - Account Endpoints
|
|
1522
|
+
* https://developers.binance.com/docs/binance_link
|
|
1523
|
+
*/
|
|
1524
|
+
createBrokerSubAccount(params) {
|
|
1525
|
+
return this.postPrivate('sapi/v1/broker/subAccount', params);
|
|
1385
1526
|
}
|
|
1386
|
-
|
|
1387
|
-
return this.getPrivate('sapi/v1/
|
|
1527
|
+
getBrokerSubAccount(params) {
|
|
1528
|
+
return this.getPrivate('sapi/v1/broker/subAccount', params);
|
|
1388
1529
|
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
* Crypto Loans Endpoints
|
|
1392
|
-
*
|
|
1393
|
-
**/
|
|
1394
|
-
getCryptoLoansIncomeHistory(params) {
|
|
1395
|
-
return this.getPrivate('sapi/v1/loan/income', params);
|
|
1530
|
+
enableMarginBrokerSubAccount(params) {
|
|
1531
|
+
return this.postPrivate('sapi/v1/broker/subAccount/futures', params);
|
|
1396
1532
|
}
|
|
1397
|
-
|
|
1398
|
-
return this.postPrivate('sapi/v1/
|
|
1533
|
+
createApiKeyBrokerSubAccount(params) {
|
|
1534
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi', params);
|
|
1399
1535
|
}
|
|
1400
|
-
|
|
1401
|
-
return this.
|
|
1536
|
+
changePermissionApiKeyBrokerSubAccount(params) {
|
|
1537
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/permission', params);
|
|
1402
1538
|
}
|
|
1403
|
-
|
|
1404
|
-
return this.
|
|
1539
|
+
changeComissionBrokerSubAccount(params) {
|
|
1540
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/permission', params);
|
|
1405
1541
|
}
|
|
1406
|
-
|
|
1407
|
-
return this.postPrivate('sapi/v1/
|
|
1542
|
+
enableUniversalTransferApiKeyBrokerSubAccount(params) {
|
|
1543
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/permission/universalTransfer', params);
|
|
1408
1544
|
}
|
|
1409
|
-
|
|
1410
|
-
return this.
|
|
1545
|
+
updateIpRestrictionForSubAccountApiKey(params) {
|
|
1546
|
+
return this.postPrivate('sapi/v2/broker/subAccountApi/ipRestriction', params);
|
|
1411
1547
|
}
|
|
1412
|
-
|
|
1413
|
-
return this.
|
|
1548
|
+
deleteIPRestrictionForSubAccountApiKey(params) {
|
|
1549
|
+
return this.deletePrivate('sapi/v1/broker/subAccountApi/ipRestriction/ipList', params);
|
|
1414
1550
|
}
|
|
1415
|
-
|
|
1416
|
-
return this.
|
|
1551
|
+
deleteApiKeyBrokerSubAccount(params) {
|
|
1552
|
+
return this.deletePrivate('sapi/v1/broker/subAccountApi', params);
|
|
1417
1553
|
}
|
|
1418
|
-
|
|
1419
|
-
return this.getPrivate('sapi/v1/
|
|
1554
|
+
getSubAccountBrokerIpRestriction(params) {
|
|
1555
|
+
return this.getPrivate('sapi/v1/broker/subAccountApi/ipRestriction', params);
|
|
1420
1556
|
}
|
|
1421
|
-
|
|
1422
|
-
return this.getPrivate('sapi/v1/
|
|
1557
|
+
getApiKeyBrokerSubAccount(params) {
|
|
1558
|
+
return this.getPrivate('sapi/v1/broker/subAccountApi', params);
|
|
1423
1559
|
}
|
|
1424
|
-
|
|
1425
|
-
return this.getPrivate('sapi/v1/
|
|
1560
|
+
getBrokerInfo() {
|
|
1561
|
+
return this.getPrivate('sapi/v1/broker/info');
|
|
1426
1562
|
}
|
|
1427
|
-
|
|
1428
|
-
return this.postPrivate('sapi/v1/
|
|
1563
|
+
updateSubAccountBNBBurn(params) {
|
|
1564
|
+
return this.postPrivate('sapi/v1/broker/subAccount/bnbBurn/spot', params);
|
|
1429
1565
|
}
|
|
1430
|
-
|
|
1431
|
-
return this.postPrivate('sapi/
|
|
1566
|
+
updateSubAccountMarginInterestBNBBurn(params) {
|
|
1567
|
+
return this.postPrivate('sapi/v1/broker/subAccount/bnbBurn/marginInterest', params);
|
|
1432
1568
|
}
|
|
1433
|
-
|
|
1434
|
-
return this.getPrivate('sapi/
|
|
1569
|
+
getSubAccountBNBBurnStatus(params) {
|
|
1570
|
+
return this.getPrivate('sapi/v1/broker/subAccount/bnbBurn/status', params);
|
|
1435
1571
|
}
|
|
1436
|
-
|
|
1437
|
-
|
|
1572
|
+
/**
|
|
1573
|
+
*
|
|
1574
|
+
* EXCHANGE LINK - Account Endpoints
|
|
1575
|
+
* https://developers.binance.com/docs/binance_link
|
|
1576
|
+
*/
|
|
1577
|
+
transferBrokerSubAccount(params) {
|
|
1578
|
+
return this.postPrivate('sapi/v1/broker/transfer', params);
|
|
1438
1579
|
}
|
|
1439
|
-
|
|
1440
|
-
return this.
|
|
1580
|
+
getBrokerSubAccountHistory(params) {
|
|
1581
|
+
return this.getPrivate('sapi/v1/broker/transfer', params);
|
|
1441
1582
|
}
|
|
1442
|
-
|
|
1443
|
-
return this.
|
|
1583
|
+
submitBrokerSubFuturesTransfer(params) {
|
|
1584
|
+
return this.postPrivate('sapi/v1/broker/transfer/futures', params);
|
|
1444
1585
|
}
|
|
1445
|
-
|
|
1446
|
-
return this.
|
|
1586
|
+
getSubAccountFuturesTransferHistory(params) {
|
|
1587
|
+
return this.getPrivate('sapi/v1/broker/transfer/futures', params);
|
|
1447
1588
|
}
|
|
1448
|
-
|
|
1449
|
-
return this.getPrivate('sapi/
|
|
1589
|
+
getBrokerSubDepositHistory(params) {
|
|
1590
|
+
return this.getPrivate('sapi/v1/broker/subAccount/depositHist', params);
|
|
1450
1591
|
}
|
|
1451
|
-
|
|
1452
|
-
return this.getPrivate('sapi/
|
|
1592
|
+
getBrokerSubAccountSpotAssets(params) {
|
|
1593
|
+
return this.getPrivate('sapi/v1/broker/subAccount/spotSummary', params);
|
|
1453
1594
|
}
|
|
1454
|
-
|
|
1455
|
-
return this.getPrivate('sapi/
|
|
1595
|
+
getSubAccountMarginAssetInfo(params) {
|
|
1596
|
+
return this.getPrivate('sapi/v1/broker/subAccount/marginSummary', params);
|
|
1456
1597
|
}
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
* Copy trading endpoints
|
|
1460
|
-
*
|
|
1461
|
-
**/
|
|
1462
|
-
getFuturesLeadTraderStatus() {
|
|
1463
|
-
return this.getPrivate('sapi/v1/copyTrading/futures/userStatus');
|
|
1598
|
+
querySubAccountFuturesAssetInfo(params) {
|
|
1599
|
+
return this.getPrivate('sapi/v3/broker/subAccount/futuresSummary', params);
|
|
1464
1600
|
}
|
|
1465
|
-
|
|
1466
|
-
return this.
|
|
1601
|
+
universalTransferBroker(params) {
|
|
1602
|
+
return this.postPrivate('sapi/v1/broker/universalTransfer', params);
|
|
1467
1603
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
* Pay endpoints
|
|
1471
|
-
*
|
|
1472
|
-
**/
|
|
1473
|
-
getPayTransactions(params) {
|
|
1474
|
-
return this.getPrivate('sapi/v1/pay/transactions', params);
|
|
1604
|
+
getUniversalTransferBroker(params) {
|
|
1605
|
+
return this.getPrivate('sapi/v1/broker/universalTransfer', params);
|
|
1475
1606
|
}
|
|
1476
1607
|
/**
|
|
1477
1608
|
*
|
|
1478
|
-
*
|
|
1479
|
-
*
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
return this.
|
|
1609
|
+
* EXCHANGE LINK - Fee Endpoints
|
|
1610
|
+
* https://developers.binance.com/docs/binance_link
|
|
1611
|
+
*/
|
|
1612
|
+
updateBrokerSubAccountCommission(params) {
|
|
1613
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/commission', params);
|
|
1483
1614
|
}
|
|
1484
|
-
|
|
1485
|
-
return this.
|
|
1615
|
+
updateBrokerSubAccountFuturesCommission(params) {
|
|
1616
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/commission/futures', params);
|
|
1486
1617
|
}
|
|
1487
|
-
|
|
1488
|
-
return this.
|
|
1618
|
+
getBrokerSubAccountFuturesCommission(params) {
|
|
1619
|
+
return this.getPrivate('sapi/v1/broker/subAccountApi/commission/futures', params);
|
|
1489
1620
|
}
|
|
1490
|
-
|
|
1491
|
-
return this.postPrivate('sapi/v1/
|
|
1621
|
+
updateBrokerSubAccountCoinFuturesCommission(params) {
|
|
1622
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/commission/coinFutures', params);
|
|
1492
1623
|
}
|
|
1493
|
-
|
|
1494
|
-
return this.getPrivate('sapi/v1/
|
|
1624
|
+
getBrokerSubAccountCoinFuturesCommission(params) {
|
|
1625
|
+
return this.getPrivate('sapi/v1/broker/subAccountApi/commission/coinFutures', params);
|
|
1495
1626
|
}
|
|
1496
|
-
|
|
1497
|
-
return this.
|
|
1627
|
+
getBrokerSpotCommissionRebate(params) {
|
|
1628
|
+
return this.getPrivate('sapi/v1/broker/rebate/recentRecord', params);
|
|
1498
1629
|
}
|
|
1499
|
-
|
|
1500
|
-
return this.
|
|
1630
|
+
getBrokerFuturesCommissionRebate(params) {
|
|
1631
|
+
return this.getPrivate('sapi/v1/broker/rebate/futures/recentRecord', params);
|
|
1501
1632
|
}
|
|
1502
|
-
|
|
1503
|
-
|
|
1633
|
+
/**
|
|
1634
|
+
*
|
|
1635
|
+
* @deprecated
|
|
1636
|
+
*/
|
|
1637
|
+
// USD & Coin-M can be found under API getIncome() (find "API rebate" in results)
|
|
1638
|
+
getBrokerSpotRebateHistory(days, customerId) {
|
|
1639
|
+
if (days === 7) {
|
|
1640
|
+
return this.getPrivate('sapi/v1/apiReferral/rebate/recentRecord', {
|
|
1641
|
+
customerId,
|
|
1642
|
+
});
|
|
1643
|
+
}
|
|
1644
|
+
if (days === 30) {
|
|
1645
|
+
return this.getPrivate('sapi/v1/apiReferral/rebate/historicalRecord', {
|
|
1646
|
+
customerId,
|
|
1647
|
+
});
|
|
1648
|
+
}
|
|
1504
1649
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1650
|
+
/**
|
|
1651
|
+
* Broker Endpoints - only on old docs
|
|
1652
|
+
* @deprecated, found only in old docs
|
|
1653
|
+
* Use EXCHANGE LINK endpoints instead - https://developers.binance.com/docs/binance_link
|
|
1654
|
+
*/
|
|
1655
|
+
/**
|
|
1656
|
+
* @deprecated, found only in old docs
|
|
1657
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1658
|
+
**/
|
|
1659
|
+
getBrokerIfNewSpotUser() {
|
|
1660
|
+
return this.getPrivate('sapi/v1/apiReferral/ifNewUser');
|
|
1507
1661
|
}
|
|
1508
1662
|
/**
|
|
1509
|
-
*
|
|
1510
|
-
*
|
|
1511
|
-
*
|
|
1663
|
+
* @deprecated, found only in old docs
|
|
1664
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1512
1665
|
**/
|
|
1513
|
-
|
|
1514
|
-
return this.getPrivate('sapi/v1/
|
|
1666
|
+
getBrokerSubAccountDepositHistory(params) {
|
|
1667
|
+
return this.getPrivate('sapi/v1/bv1/apiReferral/ifNewUser', params);
|
|
1515
1668
|
}
|
|
1516
1669
|
/**
|
|
1517
|
-
*
|
|
1518
|
-
*
|
|
1519
|
-
*
|
|
1670
|
+
* @deprecated, found only in old docs
|
|
1671
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1520
1672
|
**/
|
|
1521
|
-
|
|
1522
|
-
|
|
1673
|
+
getBrokerUserCustomisedId(market) {
|
|
1674
|
+
const prefix = market === 'spot' ? 'sapi' : 'fapi';
|
|
1675
|
+
return this.getPrivate(prefix + '/v1/apiReferral/userCustomization');
|
|
1523
1676
|
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1677
|
+
/**
|
|
1678
|
+
* @deprecated, found only in old docs
|
|
1679
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1680
|
+
**/
|
|
1681
|
+
enableFuturesBrokerSubAccount(params) {
|
|
1682
|
+
return this.postPrivate('sapi/v1/broker/subAccount', params);
|
|
1526
1683
|
}
|
|
1527
|
-
|
|
1528
|
-
|
|
1684
|
+
/**
|
|
1685
|
+
* @deprecated, found only in old docs
|
|
1686
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1687
|
+
**/
|
|
1688
|
+
enableMarginApiKeyBrokerSubAccount(params) {
|
|
1689
|
+
return this.postPrivate('sapi/v1/broker/subAccount/margin', params);
|
|
1529
1690
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1691
|
+
/**
|
|
1692
|
+
* Validate syntax meets requirements set by binance. Log warning if not.
|
|
1693
|
+
*/
|
|
1694
|
+
validateOrderId(params, orderIdProperty) {
|
|
1695
|
+
const apiCategory = 'spot';
|
|
1696
|
+
if (!params[orderIdProperty]) {
|
|
1697
|
+
params[orderIdProperty] = (0, requestUtils_1.generateNewOrderId)(apiCategory);
|
|
1698
|
+
return;
|
|
1699
|
+
}
|
|
1700
|
+
const expectedOrderIdPrefix = `x-${(0, requestUtils_1.getOrderIdPrefix)(apiCategory)}`;
|
|
1701
|
+
if (!params[orderIdProperty].startsWith(expectedOrderIdPrefix)) {
|
|
1702
|
+
(0, requestUtils_1.logInvalidOrderId)(orderIdProperty, expectedOrderIdPrefix, params);
|
|
1703
|
+
}
|
|
1532
1704
|
}
|
|
1533
1705
|
/**
|
|
1534
1706
|
*
|
|
1535
|
-
*
|
|
1707
|
+
* User Data Stream Endpoints
|
|
1536
1708
|
*
|
|
1537
1709
|
**/
|
|
1538
|
-
|
|
1539
|
-
|
|
1710
|
+
// spot
|
|
1711
|
+
getSpotUserDataListenKey() {
|
|
1712
|
+
return this.post('api/v3/userDataStream');
|
|
1540
1713
|
}
|
|
1541
|
-
|
|
1542
|
-
return this.
|
|
1714
|
+
keepAliveSpotUserDataListenKey(listenKey) {
|
|
1715
|
+
return this.put(`api/v3/userDataStream?listenKey=${listenKey}`);
|
|
1543
1716
|
}
|
|
1544
|
-
|
|
1545
|
-
return this.
|
|
1717
|
+
closeSpotUserDataListenKey(listenKey) {
|
|
1718
|
+
return this.delete(`api/v3/userDataStream?listenKey=${listenKey}`);
|
|
1546
1719
|
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1720
|
+
// margin
|
|
1721
|
+
getMarginUserDataListenKey() {
|
|
1722
|
+
return this.post('sapi/v1/userDataStream');
|
|
1549
1723
|
}
|
|
1550
|
-
|
|
1551
|
-
return this.
|
|
1724
|
+
keepAliveMarginUserDataListenKey(listenKey) {
|
|
1725
|
+
return this.put(`sapi/v1/userDataStream?listenKey=${listenKey}`);
|
|
1552
1726
|
}
|
|
1553
|
-
|
|
1554
|
-
return this.
|
|
1727
|
+
closeMarginUserDataListenKey(listenKey) {
|
|
1728
|
+
return this.delete(`sapi/v1/userDataStream?listenKey=${listenKey}`);
|
|
1729
|
+
}
|
|
1730
|
+
// isolated margin
|
|
1731
|
+
getIsolatedMarginUserDataListenKey(params) {
|
|
1732
|
+
return this.post(`sapi/v1/userDataStream/isolated?${(0, requestUtils_1.serialiseParams)(params)}`);
|
|
1733
|
+
}
|
|
1734
|
+
keepAliveIsolatedMarginUserDataListenKey(params) {
|
|
1735
|
+
return this.put(`sapi/v1/userDataStream/isolated?${(0, requestUtils_1.serialiseParams)(params)}`);
|
|
1736
|
+
}
|
|
1737
|
+
closeIsolatedMarginUserDataListenKey(params) {
|
|
1738
|
+
return this.delete(`sapi/v1/userDataStream/isolated?${(0, requestUtils_1.serialiseParams)(params)}`);
|
|
1555
1739
|
}
|
|
1740
|
+
/**
|
|
1741
|
+
*
|
|
1742
|
+
* DEPRECATED ENDPOINTS
|
|
1743
|
+
*
|
|
1744
|
+
**/
|
|
1556
1745
|
/**
|
|
1557
1746
|
*
|
|
1558
1747
|
* BSwap Endpoints
|
|
@@ -1583,18 +1772,92 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1583
1772
|
return this.getPrivate('sapi/v1/bswap/liquidityOps', params);
|
|
1584
1773
|
}
|
|
1585
1774
|
/**
|
|
1586
|
-
*
|
|
1775
|
+
*
|
|
1776
|
+
* Savings Endpoints
|
|
1777
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1778
|
+
**/
|
|
1779
|
+
/**
|
|
1780
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1587
1781
|
*/
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1782
|
+
getLeftDailyPurchaseQuotaFlexibleProduct(params) {
|
|
1783
|
+
return this.getPrivate(`sapi/v1/lending/daily/userLeftQuota`, params);
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1787
|
+
*/
|
|
1788
|
+
getLeftDailyRedemptionQuotaFlexibleProduct(params) {
|
|
1789
|
+
return this.getPrivate(`sapi/v1/lending/daily/userRedemptionQuota`, params);
|
|
1790
|
+
}
|
|
1791
|
+
/**
|
|
1792
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1793
|
+
*/
|
|
1794
|
+
purchaseFixedAndActivityProject(params) {
|
|
1795
|
+
return this.postPrivate(`sapi/v1/lending/customizedFixed/purchase`, params);
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1799
|
+
*/
|
|
1800
|
+
getFixedAndActivityProjects(params) {
|
|
1801
|
+
return this.getPrivate(`sapi/v1/lending/project/list`, params);
|
|
1802
|
+
}
|
|
1803
|
+
/**
|
|
1804
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1805
|
+
*/
|
|
1806
|
+
getFixedAndActivityProductPosition(params) {
|
|
1807
|
+
return this.getPrivate(`sapi/v1/lending/project/position/list`, params);
|
|
1808
|
+
}
|
|
1809
|
+
/**
|
|
1810
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1811
|
+
*/
|
|
1812
|
+
getLendingAccount() {
|
|
1813
|
+
return this.getPrivate(`sapi/v1/lending/union/account`);
|
|
1814
|
+
}
|
|
1815
|
+
/**
|
|
1816
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1817
|
+
*/
|
|
1818
|
+
getPurchaseRecord(params) {
|
|
1819
|
+
return this.getPrivate(`sapi/v1/lending/union/purchaseRecord`, params);
|
|
1820
|
+
}
|
|
1821
|
+
/**
|
|
1822
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1823
|
+
*/
|
|
1824
|
+
getRedemptionRecord(params) {
|
|
1825
|
+
return this.getPrivate(`sapi/v1/lending/union/redemptionRecord`, params);
|
|
1826
|
+
}
|
|
1827
|
+
/**
|
|
1828
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1829
|
+
*/
|
|
1830
|
+
getInterestHistory(params) {
|
|
1831
|
+
return this.getPrivate(`sapi/v1/lending/union/interestHistory`, params);
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1835
|
+
*/
|
|
1836
|
+
changeFixedAndActivityPositionToDailyPosition(params) {
|
|
1837
|
+
return this.postPrivate(`sapi/v1/lending/positionChanged`, params);
|
|
1838
|
+
}
|
|
1839
|
+
/**
|
|
1840
|
+
*
|
|
1841
|
+
* Wallet Endpoints
|
|
1842
|
+
* @deprecated
|
|
1843
|
+
**/
|
|
1844
|
+
/**
|
|
1845
|
+
* @deprecated
|
|
1846
|
+
*/
|
|
1847
|
+
enableConvertSubAccount(params) {
|
|
1848
|
+
return this.postPrivate('sapi/v1/broker/subAccount/convert', params);
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* @deprecated
|
|
1852
|
+
*/
|
|
1853
|
+
convertBUSD(params) {
|
|
1854
|
+
return this.postPrivate('sapi/v1/asset/convert-transfer', params);
|
|
1855
|
+
}
|
|
1856
|
+
/**
|
|
1857
|
+
* @deprecated
|
|
1858
|
+
*/
|
|
1859
|
+
getConvertBUSDHistory(params) {
|
|
1860
|
+
return this.getPrivate('sapi/v1/asset/convert-transfer/queryByPage', params);
|
|
1598
1861
|
}
|
|
1599
1862
|
}
|
|
1600
1863
|
exports.MainClient = MainClient;
|