binance 2.12.3 → 2.13.0
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 +80 -37
- package/lib/coinm-client.js +103 -59
- package/lib/coinm-client.js.map +1 -1
- package/lib/main-client.d.ts +939 -686
- package/lib/main-client.js +1288 -1067
- package/lib/main-client.js.map +1 -1
- package/lib/types/futures.d.ts +23 -0
- package/lib/types/spot.d.ts +9 -3
- package/lib/usdm-client.d.ts +96 -49
- package/lib/usdm-client.js +140 -89
- package/lib/usdm-client.js.map +1 -1
- package/package.json +1 -1
package/lib/main-client.js
CHANGED
|
@@ -44,1258 +44,1428 @@ 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
|
-
|
|
603
|
+
// to be added
|
|
604
|
+
/**
|
|
605
|
+
*
|
|
606
|
+
* WALLET Endpoints - Other endpoints
|
|
607
|
+
*
|
|
608
|
+
**/
|
|
609
|
+
getSystemStatus() {
|
|
610
|
+
return this.get('sapi/v1/system/status');
|
|
569
611
|
}
|
|
570
|
-
|
|
571
|
-
return this.getPrivate('sapi/v1/
|
|
612
|
+
getDelistSchedule() {
|
|
613
|
+
return this.getPrivate('sapi/v1/spot/delist-schedule');
|
|
572
614
|
}
|
|
573
|
-
|
|
574
|
-
|
|
615
|
+
/**
|
|
616
|
+
*
|
|
617
|
+
* SUB ACCOUNT Endpoints - Account management
|
|
618
|
+
*
|
|
619
|
+
**/
|
|
620
|
+
createVirtualSubAccount(params) {
|
|
621
|
+
return this.postPrivate('sapi/v1/sub-account/virtualSubAccount', params);
|
|
575
622
|
}
|
|
576
|
-
|
|
577
|
-
return this.
|
|
623
|
+
getSubAccountList(params) {
|
|
624
|
+
return this.getPrivate('sapi/v1/sub-account/list', params);
|
|
578
625
|
}
|
|
579
|
-
|
|
580
|
-
return this.
|
|
626
|
+
subAccountEnableFutures(email) {
|
|
627
|
+
return this.postPrivate('sapi/v1/sub-account/futures/enable', { email });
|
|
581
628
|
}
|
|
582
|
-
|
|
583
|
-
this.
|
|
584
|
-
return this.postPrivate('sapi/v1/margin/order', params);
|
|
629
|
+
subAccountEnableMargin(email) {
|
|
630
|
+
return this.postPrivate('sapi/v1/sub-account/margin/enable', { email });
|
|
585
631
|
}
|
|
586
|
-
|
|
587
|
-
return this.
|
|
632
|
+
enableOptionsForSubAccount(params) {
|
|
633
|
+
return this.postPrivate('sapi/v1/sub-account/eoptions/enable', params);
|
|
588
634
|
}
|
|
589
|
-
|
|
590
|
-
return this.
|
|
635
|
+
subAccountEnableLeverageToken(params) {
|
|
636
|
+
return this.postPrivate('sapi/v1/sub-account/blvt/enable', params);
|
|
591
637
|
}
|
|
592
|
-
|
|
593
|
-
return this.
|
|
638
|
+
getSubAccountStatusOnMarginOrFutures(params) {
|
|
639
|
+
return this.getPrivate('sapi/v1/sub-account/status', params);
|
|
594
640
|
}
|
|
595
|
-
|
|
596
|
-
return this.getPrivate('sapi/v1/
|
|
641
|
+
getSubAccountFuturesPositionRisk(email) {
|
|
642
|
+
return this.getPrivate('sapi/v1/sub-account/futures/positionRisk', {
|
|
643
|
+
email,
|
|
644
|
+
});
|
|
597
645
|
}
|
|
598
|
-
|
|
599
|
-
return this.getPrivate('sapi/
|
|
646
|
+
getSubAccountFuturesPositionRiskV2(params) {
|
|
647
|
+
return this.getPrivate('sapi/v2/sub-account/futures/positionRisk', params);
|
|
600
648
|
}
|
|
601
|
-
|
|
602
|
-
return this.getPrivate('sapi/v1/
|
|
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);
|
|
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);
|
|
700
808
|
}
|
|
701
809
|
/**
|
|
702
|
-
*
|
|
810
|
+
*
|
|
811
|
+
* AUTO INVEST Endpoints - Trade
|
|
812
|
+
*
|
|
813
|
+
**/
|
|
814
|
+
/**
|
|
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
|
-
return this.post('sapi/v1/userDataStream');
|
|
974
|
+
getWbethRewardsHistory(params) {
|
|
975
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/history/wbethRewardsHistory', params);
|
|
782
976
|
}
|
|
783
|
-
|
|
784
|
-
return this.
|
|
977
|
+
getEthRateHistory(params) {
|
|
978
|
+
return this.getPrivate('sapi/v1/eth-staking/eth/history/rateHistory', params);
|
|
785
979
|
}
|
|
786
|
-
|
|
787
|
-
return this.
|
|
980
|
+
getBethWrapHistory(params) {
|
|
981
|
+
return this.getPrivate('sapi/v1/eth-staking/wbeth/history/wrapHistory', params);
|
|
788
982
|
}
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
return this.post(`sapi/v1/userDataStream/isolated?${(0, requestUtils_1.serialiseParams)(params)}`);
|
|
983
|
+
getBethUnwrapHistory(params) {
|
|
984
|
+
return this.getPrivate('sapi/v1/eth-staking/wbeth/history/unwrapHistory', params);
|
|
792
985
|
}
|
|
793
|
-
|
|
794
|
-
|
|
986
|
+
/**
|
|
987
|
+
* @deprecated as of 2024-01-19
|
|
988
|
+
*/
|
|
989
|
+
getStakingProducts(params) {
|
|
990
|
+
return this.getPrivate(`sapi/v1/staking/productList`, params);
|
|
991
|
+
}
|
|
992
|
+
/**
|
|
993
|
+
* @deprecated as of 2024-01-19
|
|
994
|
+
*/
|
|
995
|
+
getStakingProductPosition(params) {
|
|
996
|
+
return this.getPrivate('sapi/v1/staking/position', params);
|
|
997
|
+
}
|
|
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);
|
|
903
|
-
}
|
|
904
|
-
getAutoInvestAssets() {
|
|
905
|
-
return this.getPrivate('sapi/v1/lending/auto-invest/all/asset');
|
|
906
|
-
}
|
|
907
|
-
getAutoInvestSourceAssets(params) {
|
|
908
|
-
return this.getPrivate('sapi/v1/lending/auto-invest/source-asset/list', params);
|
|
909
|
-
}
|
|
910
|
-
submitAutoInvestmentPlan(params) {
|
|
911
|
-
const { details } = params, allParams = __rest(params, ["details"]);
|
|
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);
|
|
918
|
-
}
|
|
919
|
-
submitAutoInvestmentPlanOld(params) {
|
|
920
|
-
return this.postPrivate('sapi/v1/lending/auto-invest/plan/add', params);
|
|
921
|
-
}
|
|
922
|
-
updateAutoInvestmentPlan(params) {
|
|
923
|
-
const { details } = params, allParams = __rest(params, ["details"]);
|
|
924
|
-
const requestParameters = Object.assign({}, allParams);
|
|
925
|
-
for (let i = 0; i < details.length; i++) {
|
|
926
|
-
requestParameters[`details[${i}].targetAsset`] = details[i].targetAsset;
|
|
927
|
-
requestParameters[`details[${i}].percentage`] = details[i].percentage;
|
|
928
|
-
}
|
|
929
|
-
return this.postPrivate('sapi/v1/lending/auto-invest/plan/edit', requestParameters);
|
|
930
|
-
}
|
|
931
|
-
updateAutoInvestmentPlanOld(params) {
|
|
932
|
-
return this.postPrivate('sapi/v1/lending/auto-invest/plan/edit', params);
|
|
933
|
-
}
|
|
934
|
-
updateAutoInvestPlanStatus(params) {
|
|
935
|
-
return this.postPrivate('sapi/v1/lending/auto-invest/plan/edit-status', params);
|
|
936
|
-
}
|
|
937
|
-
getAutoInvestPlans(params) {
|
|
938
|
-
return this.getPrivate('sapi/v1/lending/auto-invest/plan/list', params);
|
|
1116
|
+
getCryptoLoanFlexibleCollateralAssets(params) {
|
|
1117
|
+
return this.getPrivate('sapi/v2/loan/flexible/collateral/data', params);
|
|
939
1118
|
}
|
|
940
|
-
|
|
941
|
-
return this.getPrivate('sapi/
|
|
1119
|
+
getCryptoLoanFlexibleAssets(params) {
|
|
1120
|
+
return this.getPrivate('sapi/v2/loan/flexible/loanable/data', params);
|
|
942
1121
|
}
|
|
943
|
-
|
|
944
|
-
|
|
1122
|
+
/**
|
|
1123
|
+
*
|
|
1124
|
+
* CRYPTO LOAN Endpoints - Flexible rate - Trade
|
|
1125
|
+
*
|
|
1126
|
+
**/
|
|
1127
|
+
borrowCryptoLoanFlexible(params) {
|
|
1128
|
+
return this.postPrivate('sapi/v2/loan/flexible/borrow', params);
|
|
945
1129
|
}
|
|
946
|
-
|
|
947
|
-
return this.
|
|
1130
|
+
repayCryptoLoanFlexible(params) {
|
|
1131
|
+
return this.postPrivate('sapi/v2/loan/flexible/repay', params);
|
|
948
1132
|
}
|
|
949
|
-
|
|
950
|
-
return this.
|
|
1133
|
+
adjustCryptoLoanFlexibleLTV(params) {
|
|
1134
|
+
return this.postPrivate('sapi/v2/loan/flexible/adjust/ltv', params);
|
|
951
1135
|
}
|
|
952
1136
|
/**
|
|
953
|
-
* https://developers.binance.com/docs/auto_invest/trade/One-Time-Transaction
|
|
954
1137
|
*
|
|
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);
|
|
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);
|
|
969
1143
|
}
|
|
970
|
-
|
|
971
|
-
return this.
|
|
1144
|
+
getLoanFlexibleBorrowHistory(params) {
|
|
1145
|
+
return this.getPrivate('sapi/v2/loan/flexible/borrow/history', params);
|
|
972
1146
|
}
|
|
973
|
-
|
|
974
|
-
return this.getPrivate('sapi/
|
|
1147
|
+
getCryptoLoanFlexibleOngoingOrders(params) {
|
|
1148
|
+
return this.getPrivate('sapi/v2/loan/flexible/ongoing/orders', params);
|
|
975
1149
|
}
|
|
976
|
-
|
|
977
|
-
return this.getPrivate('sapi/
|
|
1150
|
+
getLoanFlexibleRepaymentHistory(params) {
|
|
1151
|
+
return this.getPrivate('sapi/v2/loan/flexible/repay/history', params);
|
|
978
1152
|
}
|
|
979
1153
|
/**
|
|
980
1154
|
*
|
|
981
|
-
*
|
|
1155
|
+
* CRYPTO LOAN Endpoints - Stable rate - Market data
|
|
982
1156
|
*
|
|
983
1157
|
**/
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
*/
|
|
987
|
-
getStakingProducts(params) {
|
|
988
|
-
return this.getPrivate(`sapi/v1/staking/productList`, params);
|
|
1158
|
+
getCryptoLoanLoanableAssets(params) {
|
|
1159
|
+
return this.getPrivate('sapi/v1/loan/loanable/data', params);
|
|
989
1160
|
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
*/
|
|
993
|
-
getStakingProductPosition(params) {
|
|
994
|
-
return this.getPrivate('sapi/v1/staking/position', params);
|
|
1161
|
+
getCryptoLoanCollateralRepayRate(params) {
|
|
1162
|
+
return this.getPrivate('sapi/v1/loan/repay/collateral/rate', params);
|
|
995
1163
|
}
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
return this.getPrivate('sapi/v1/
|
|
1164
|
+
getCryptoLoanCollateralAssetsData(params) {
|
|
1165
|
+
return this.getPrivate('sapi/v1/loan/collateral/data', params);
|
|
1166
|
+
}
|
|
1167
|
+
getCryptoLoansIncomeHistory(params) {
|
|
1168
|
+
return this.getPrivate('sapi/v1/loan/income', params);
|
|
1001
1169
|
}
|
|
1002
1170
|
/**
|
|
1003
|
-
*
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1171
|
+
*
|
|
1172
|
+
* CRYPTO LOAN Endpoints - Stable rate - Trade
|
|
1173
|
+
*
|
|
1174
|
+
**/
|
|
1175
|
+
borrowCryptoLoan(params) {
|
|
1176
|
+
return this.postPrivate('sapi/v1/loan/borrow', params);
|
|
1007
1177
|
}
|
|
1008
|
-
|
|
1009
|
-
return this.postPrivate('sapi/v1/
|
|
1178
|
+
repayCryptoLoan(params) {
|
|
1179
|
+
return this.postPrivate('sapi/v1/loan/repay', params);
|
|
1010
1180
|
}
|
|
1011
|
-
|
|
1012
|
-
return this.postPrivate('sapi/
|
|
1181
|
+
adjustCryptoLoanLTV(params) {
|
|
1182
|
+
return this.postPrivate('sapi/v1/loan/adjust/ltv', params);
|
|
1013
1183
|
}
|
|
1014
|
-
|
|
1015
|
-
return this.postPrivate('sapi/v1/
|
|
1184
|
+
customizeCryptoLoanMarginCall(params) {
|
|
1185
|
+
return this.postPrivate('sapi/v1/loan/customize/margin_call', params);
|
|
1016
1186
|
}
|
|
1017
|
-
|
|
1018
|
-
|
|
1187
|
+
/**
|
|
1188
|
+
*
|
|
1189
|
+
* CRYPTO LOAN Endpoints - Stable rate - User info
|
|
1190
|
+
*
|
|
1191
|
+
**/
|
|
1192
|
+
getCryptoLoanOngoingOrders(params) {
|
|
1193
|
+
return this.getPrivate('sapi/v1/loan/ongoing/orders', params);
|
|
1019
1194
|
}
|
|
1020
|
-
|
|
1021
|
-
return this.getPrivate('sapi/v1/
|
|
1195
|
+
getCryptoLoanBorrowHistory(params) {
|
|
1196
|
+
return this.getPrivate('sapi/v1/loan/borrow/history', params);
|
|
1022
1197
|
}
|
|
1023
|
-
|
|
1024
|
-
return this.getPrivate('sapi/v1/
|
|
1198
|
+
getCryptoLoanLTVAdjustmentHistory(params) {
|
|
1199
|
+
return this.getPrivate('sapi/v1/loan/ltv/adjustment/history', params);
|
|
1025
1200
|
}
|
|
1026
|
-
|
|
1027
|
-
return this.getPrivate('sapi/v1/
|
|
1201
|
+
getCryptoLoanRepaymentHistory(params) {
|
|
1202
|
+
return this.getPrivate('sapi/v1/loan/repay/history', params);
|
|
1028
1203
|
}
|
|
1029
|
-
|
|
1030
|
-
|
|
1204
|
+
/**
|
|
1205
|
+
*
|
|
1206
|
+
* SIMPLE EARN Endpoints - Account
|
|
1207
|
+
*
|
|
1208
|
+
**/
|
|
1209
|
+
getSimpleEarnAccount() {
|
|
1210
|
+
return this.getPrivate(`/sapi/v1/simple-earn/account`);
|
|
1031
1211
|
}
|
|
1032
|
-
|
|
1033
|
-
return this.getPrivate(
|
|
1212
|
+
getFlexibleSavingProducts(params) {
|
|
1213
|
+
return this.getPrivate(`/sapi/v1/simple-earn/flexible/list`, params);
|
|
1034
1214
|
}
|
|
1035
|
-
|
|
1036
|
-
return this.getPrivate(
|
|
1215
|
+
getSimpleEarnLockedProductList(params) {
|
|
1216
|
+
return this.getPrivate(`/sapi/v1/simple-earn/locked/list`, params);
|
|
1037
1217
|
}
|
|
1038
|
-
|
|
1039
|
-
return this.
|
|
1218
|
+
getFlexibleProductPosition(params) {
|
|
1219
|
+
return this.getPrivate(`/sapi/v1/simple-earn/flexible/position`, params);
|
|
1040
1220
|
}
|
|
1041
|
-
|
|
1042
|
-
return this.getPrivate(
|
|
1221
|
+
getLockedProductPosition(params) {
|
|
1222
|
+
return this.getPrivate(`/sapi/v1/simple-earn/locked/position`, params);
|
|
1043
1223
|
}
|
|
1044
|
-
|
|
1045
|
-
return this.getPrivate('sapi/v1/
|
|
1224
|
+
getFlexiblePersonalLeftQuota(params) {
|
|
1225
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/personalLeftQuota', params);
|
|
1046
1226
|
}
|
|
1047
|
-
|
|
1048
|
-
return this.getPrivate('sapi/v1/
|
|
1227
|
+
getLockedPersonalLeftQuota(params) {
|
|
1228
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/personalLeftQuota', params);
|
|
1049
1229
|
}
|
|
1050
1230
|
/**
|
|
1051
1231
|
*
|
|
1052
|
-
*
|
|
1053
|
-
*
|
|
1232
|
+
* SIMPLE EARN Endpoints - Earn
|
|
1233
|
+
*
|
|
1054
1234
|
**/
|
|
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);
|
|
1235
|
+
purchaseFlexibleProduct(params) {
|
|
1236
|
+
return this.postPrivate(`/sapi/v1/simple-earn/flexible/subscribe`, params);
|
|
1066
1237
|
}
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
*/
|
|
1070
|
-
purchaseFixedAndActivityProject(params) {
|
|
1071
|
-
return this.postPrivate(`sapi/v1/lending/customizedFixed/purchase`, params);
|
|
1238
|
+
subscribeSimpleEarnLockedProduct(params) {
|
|
1239
|
+
return this.postPrivate(`/sapi/v1/simple-earn/locked/subscribe`, params);
|
|
1072
1240
|
}
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
*/
|
|
1076
|
-
getFixedAndActivityProjects(params) {
|
|
1077
|
-
return this.getPrivate(`sapi/v1/lending/project/list`, params);
|
|
1241
|
+
redeemFlexibleProduct(params) {
|
|
1242
|
+
return this.postPrivate(`/sapi/v1/simple-earn/flexible/redeem`, params);
|
|
1078
1243
|
}
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
*/
|
|
1082
|
-
getFixedAndActivityProductPosition(params) {
|
|
1083
|
-
return this.getPrivate(`sapi/v1/lending/project/position/list`, params);
|
|
1244
|
+
redeemLockedProduct(params) {
|
|
1245
|
+
return this.postPrivate(`/sapi/v1/simple-earn/locked/redeem`, params);
|
|
1084
1246
|
}
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
*/
|
|
1088
|
-
getLendingAccount() {
|
|
1089
|
-
return this.getPrivate(`sapi/v1/lending/union/account`);
|
|
1247
|
+
setFlexibleAutoSubscribe(params) {
|
|
1248
|
+
return this.postPrivate('sapi/v1/simple-earn/flexible/setAutoSubscribe', params);
|
|
1090
1249
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
*/
|
|
1094
|
-
getPurchaseRecord(params) {
|
|
1095
|
-
return this.getPrivate(`sapi/v1/lending/union/purchaseRecord`, params);
|
|
1250
|
+
setLockedAutoSubscribe(params) {
|
|
1251
|
+
return this.postPrivate('sapi/v1/simple-earn/locked/setAutoSubscribe', params);
|
|
1096
1252
|
}
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
*/
|
|
1100
|
-
getRedemptionRecord(params) {
|
|
1101
|
-
return this.getPrivate(`sapi/v1/lending/union/redemptionRecord`, params);
|
|
1253
|
+
getFlexibleSubscriptionPreview(params) {
|
|
1254
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/subscriptionPreview', params);
|
|
1102
1255
|
}
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
*/
|
|
1106
|
-
getInterestHistory(params) {
|
|
1107
|
-
return this.getPrivate(`sapi/v1/lending/union/interestHistory`, params);
|
|
1256
|
+
getLockedSubscriptionPreview(params) {
|
|
1257
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/subscriptionPreview', params);
|
|
1108
1258
|
}
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
*/
|
|
1112
|
-
changeFixedAndActivityPositionToDailyPosition(params) {
|
|
1113
|
-
return this.postPrivate(`sapi/v1/lending/positionChanged`, params);
|
|
1259
|
+
setLockedProductRedeemOption(params) {
|
|
1260
|
+
return this.postPrivate('sapi/v1/simple-earn/locked/setRedeemOption', params);
|
|
1114
1261
|
}
|
|
1115
1262
|
/**
|
|
1116
1263
|
*
|
|
1117
|
-
*
|
|
1264
|
+
* SIMPLE EARN Endpoints - History
|
|
1118
1265
|
*
|
|
1119
1266
|
**/
|
|
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);
|
|
1267
|
+
getFlexibleSubscriptionRecord(params) {
|
|
1268
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/subscriptionRecord', params);
|
|
1128
1269
|
}
|
|
1129
|
-
|
|
1130
|
-
return this.getPrivate('sapi/v1/
|
|
1270
|
+
getLockedSubscriptionRecord(params) {
|
|
1271
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/history/subscriptionRecord', params);
|
|
1131
1272
|
}
|
|
1132
|
-
|
|
1133
|
-
return this.getPrivate('sapi/v1/
|
|
1273
|
+
getFlexibleRedemptionRecord(params) {
|
|
1274
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/redemptionRecord', params);
|
|
1134
1275
|
}
|
|
1135
|
-
|
|
1136
|
-
return this.getPrivate('sapi/v1/
|
|
1276
|
+
getLockedRedemptionRecord(params) {
|
|
1277
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/history/redemptionRecord', params);
|
|
1137
1278
|
}
|
|
1138
|
-
|
|
1139
|
-
return this.getPrivate('sapi/v1/
|
|
1279
|
+
getFlexibleRewardsHistory(params) {
|
|
1280
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/rewardsRecord', params);
|
|
1140
1281
|
}
|
|
1141
|
-
|
|
1142
|
-
return this.getPrivate('sapi/v1/
|
|
1282
|
+
getLockedRewardsHistory(params) {
|
|
1283
|
+
return this.getPrivate('sapi/v1/simple-earn/locked/history/rewardsRecord', params);
|
|
1143
1284
|
}
|
|
1144
|
-
|
|
1145
|
-
return this.
|
|
1285
|
+
getCollateralRecord(params) {
|
|
1286
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/collateralRecord', params);
|
|
1146
1287
|
}
|
|
1147
|
-
|
|
1148
|
-
return this.
|
|
1288
|
+
getRateHistory(params) {
|
|
1289
|
+
return this.getPrivate('sapi/v1/simple-earn/flexible/history/rateHistory', params);
|
|
1149
1290
|
}
|
|
1150
|
-
|
|
1151
|
-
|
|
1291
|
+
/**
|
|
1292
|
+
*
|
|
1293
|
+
* VIP LOAN Endpoints - Market Data
|
|
1294
|
+
*
|
|
1295
|
+
**/
|
|
1296
|
+
getVipBorrowInterestRate(params) {
|
|
1297
|
+
return this.getPrivate('sapi/v1/loan/vip/request/interestRate', params);
|
|
1152
1298
|
}
|
|
1153
|
-
|
|
1154
|
-
return this.getPrivate('sapi/v1/
|
|
1299
|
+
getVipLoanableAssets(params) {
|
|
1300
|
+
return this.getPrivate('sapi/v1/loan/vip/loanable/data', params);
|
|
1155
1301
|
}
|
|
1156
|
-
|
|
1157
|
-
return this.getPrivate('sapi/v1/
|
|
1302
|
+
getVipCollateralAssets(params) {
|
|
1303
|
+
return this.getPrivate('sapi/v1/loan/vip/collateral/data', params);
|
|
1158
1304
|
}
|
|
1159
1305
|
/**
|
|
1160
1306
|
*
|
|
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.
|
|
1307
|
+
* VIP LOAN Endpoints - User Info
|
|
1166
1308
|
*
|
|
1167
1309
|
**/
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
*
|
|
1171
|
-
* Type:
|
|
1172
|
-
* - 1: transfer from spot account to USDT-Ⓜ futures account.
|
|
1173
|
-
* - 2: transfer from USDT-Ⓜ futures account to spot account.
|
|
1174
|
-
* - 3: transfer from spot account to COIN-Ⓜ futures account.
|
|
1175
|
-
* - 4: transfer from COIN-Ⓜ futures account to spot account.
|
|
1176
|
-
*/
|
|
1177
|
-
submitNewFutureAccountTransfer(params) {
|
|
1178
|
-
return this.postPrivate(`sapi/v1/futures/transfer`, params);
|
|
1310
|
+
getVipLoanOpenOrders(params) {
|
|
1311
|
+
return this.getPrivate('sapi/v1/loan/vip/ongoing/orders', params);
|
|
1179
1312
|
}
|
|
1180
|
-
|
|
1181
|
-
return this.getPrivate(
|
|
1313
|
+
getVipLoanRepaymentHistory(params) {
|
|
1314
|
+
return this.getPrivate('sapi/v1/loan/vip/repay/history', params);
|
|
1182
1315
|
}
|
|
1183
|
-
|
|
1184
|
-
return this.getPrivate('sapi/v1/
|
|
1316
|
+
checkVipCollateralAccount(params) {
|
|
1317
|
+
return this.getPrivate('sapi/v1/loan/vip/collateral/account', params);
|
|
1185
1318
|
}
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
*/
|
|
1189
|
-
getCrossCollateralBorrowHistory(params) {
|
|
1190
|
-
return this.getPrivate(`sapi/v1/futures/loan/borrow/history`, params);
|
|
1319
|
+
getVipApplicationStatus(params) {
|
|
1320
|
+
return this.getPrivate('sapi/v1/loan/vip/request/data', params);
|
|
1191
1321
|
}
|
|
1192
1322
|
/**
|
|
1193
|
-
*
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1323
|
+
*
|
|
1324
|
+
* VIP LOAN Endpoints - Trade
|
|
1325
|
+
*
|
|
1326
|
+
**/
|
|
1327
|
+
renewVipLoan(params) {
|
|
1328
|
+
return this.postPrivate('sapi/v1/loan/vip/renew', params);
|
|
1329
|
+
}
|
|
1330
|
+
repayVipLoan(params) {
|
|
1331
|
+
return this.postPrivate('sapi/v1/loan/vip/repay', params);
|
|
1332
|
+
}
|
|
1333
|
+
borrowVipLoan(params) {
|
|
1334
|
+
return this.postPrivate('sapi/v1/loan/vip/borrow', params);
|
|
1197
1335
|
}
|
|
1198
1336
|
/**
|
|
1199
|
-
*
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1337
|
+
*
|
|
1338
|
+
* DUAL INVESTMENT Endpoints - Market Data
|
|
1339
|
+
*
|
|
1340
|
+
**/
|
|
1341
|
+
getDualInvestmentProducts(params) {
|
|
1342
|
+
return this.getPrivate('sapi/v1/dci/product/list', params);
|
|
1203
1343
|
}
|
|
1204
1344
|
/**
|
|
1205
|
-
*
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1345
|
+
*
|
|
1346
|
+
* DUAL INVESTMENT Endpoints - Trade
|
|
1347
|
+
*
|
|
1348
|
+
**/
|
|
1349
|
+
subscribeDualInvestmentProduct(params) {
|
|
1350
|
+
return this.postPrivate('sapi/v1/dci/product/subscribe', params);
|
|
1351
|
+
}
|
|
1352
|
+
getDualInvestmentPositions(params) {
|
|
1353
|
+
return this.getPrivate('sapi/v1/dci/product/positions', params);
|
|
1209
1354
|
}
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
*/
|
|
1213
|
-
getCrossCollateralLiquidationHistory(params) {
|
|
1214
|
-
return this.getPrivate(`sapi/v1/futures/loan/liquidationHistory`, params);
|
|
1355
|
+
getDualInvestmentAccounts() {
|
|
1356
|
+
return this.getPrivate('sapi/v1/dci/product/accounts');
|
|
1215
1357
|
}
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
*/
|
|
1219
|
-
getCrossCollateralInterestHistory(params) {
|
|
1220
|
-
return this.getPrivate(`sapi/v1/futures/loan/interestHistory`, params);
|
|
1358
|
+
updateAutoCompoundStatus(params) {
|
|
1359
|
+
return this.postPrivate('sapi/v1/dci/product/auto_compound/edit-status', params);
|
|
1221
1360
|
}
|
|
1222
1361
|
/**
|
|
1223
1362
|
*
|
|
1224
|
-
*
|
|
1363
|
+
* GIFT CARD Endpoints - Market Data
|
|
1225
1364
|
*
|
|
1226
1365
|
**/
|
|
1227
|
-
|
|
1228
|
-
this.
|
|
1229
|
-
return this.postPrivate('sapi/v1/algo/futures/newOrderVp', params);
|
|
1366
|
+
createGiftCard(params) {
|
|
1367
|
+
return this.postPrivate('sapi/v1/giftcard/createCode', params);
|
|
1230
1368
|
}
|
|
1231
|
-
|
|
1232
|
-
this.
|
|
1233
|
-
return this.postPrivate('sapi/v1/algo/futures/newOrderTwap', params);
|
|
1369
|
+
createDualTokenGiftCard(params) {
|
|
1370
|
+
return this.postPrivate('sapi/v1/giftcard/buyCode', params);
|
|
1234
1371
|
}
|
|
1235
|
-
|
|
1236
|
-
return this.
|
|
1372
|
+
redeemGiftCard(params) {
|
|
1373
|
+
return this.postPrivate('sapi/v1/giftcard/redeemCode', params);
|
|
1237
1374
|
}
|
|
1238
|
-
|
|
1239
|
-
return this.getPrivate('sapi/v1/
|
|
1375
|
+
verifyGiftCard(params) {
|
|
1376
|
+
return this.getPrivate('sapi/v1/giftcard/verify', params);
|
|
1240
1377
|
}
|
|
1241
|
-
|
|
1242
|
-
return this.getPrivate('sapi/v1/
|
|
1378
|
+
getTokenLimit(params) {
|
|
1379
|
+
return this.getPrivate('sapi/v1/giftcard/buyCode/token-limit', params);
|
|
1243
1380
|
}
|
|
1244
|
-
|
|
1245
|
-
return this.getPrivate('sapi/v1/
|
|
1381
|
+
getRsaPublicKey() {
|
|
1382
|
+
return this.getPrivate('sapi/v1/giftcard/cryptography/rsa-public-key');
|
|
1246
1383
|
}
|
|
1247
1384
|
/**
|
|
1248
1385
|
*
|
|
1249
|
-
*
|
|
1386
|
+
* NFT Endpoints - REST api
|
|
1250
1387
|
*
|
|
1251
1388
|
**/
|
|
1252
|
-
|
|
1253
|
-
this.
|
|
1254
|
-
return this.postPrivate('sapi/v1/algo/spot/newOrderTwap', params);
|
|
1255
|
-
}
|
|
1256
|
-
cancelSpotAlgoOrder(params) {
|
|
1257
|
-
return this.deletePrivate('sapi/v1/algo/spot/order', params);
|
|
1389
|
+
getNftTransactionHistory(params) {
|
|
1390
|
+
return this.getPrivate('sapi/v1/nft/history/transactions', params);
|
|
1258
1391
|
}
|
|
1259
|
-
|
|
1260
|
-
return this.getPrivate('sapi/v1/
|
|
1392
|
+
getNftDepositHistory(params) {
|
|
1393
|
+
return this.getPrivate('sapi/v1/nft/history/deposit', params);
|
|
1261
1394
|
}
|
|
1262
|
-
|
|
1263
|
-
return this.getPrivate('sapi/v1/
|
|
1395
|
+
getNftWithdrawHistory(params) {
|
|
1396
|
+
return this.getPrivate('sapi/v1/nft/history/withdraw', params);
|
|
1264
1397
|
}
|
|
1265
|
-
|
|
1266
|
-
return this.getPrivate('sapi/v1/
|
|
1398
|
+
getNftAsset(params) {
|
|
1399
|
+
return this.getPrivate('sapi/v1/nft/user/getAsset', params);
|
|
1267
1400
|
}
|
|
1268
1401
|
/**
|
|
1269
1402
|
*
|
|
1270
|
-
*
|
|
1403
|
+
* C2C Endpoints
|
|
1271
1404
|
*
|
|
1272
1405
|
**/
|
|
1273
|
-
|
|
1274
|
-
return this.getPrivate('sapi/v1/
|
|
1275
|
-
}
|
|
1276
|
-
getPortfolioMarginProCollateralRate() {
|
|
1277
|
-
return this.get('sapi/v1/portfolio/collateralRate');
|
|
1406
|
+
getC2CTradeHistory(params) {
|
|
1407
|
+
return this.getPrivate('sapi/v1/c2c/orderMatch/listUserOrderHistory', params);
|
|
1278
1408
|
}
|
|
1279
|
-
|
|
1280
|
-
|
|
1409
|
+
/**
|
|
1410
|
+
*
|
|
1411
|
+
* FIAT Endpoints - REST api
|
|
1412
|
+
*
|
|
1413
|
+
**/
|
|
1414
|
+
getFiatOrderHistory(params) {
|
|
1415
|
+
return this.getPrivate('sapi/v1/fiat/orders', params);
|
|
1281
1416
|
}
|
|
1282
|
-
|
|
1283
|
-
return this.
|
|
1417
|
+
getFiatPaymentsHistory(params) {
|
|
1418
|
+
return this.getPrivate('sapi/v1/fiat/payments', params);
|
|
1284
1419
|
}
|
|
1285
|
-
|
|
1286
|
-
|
|
1420
|
+
/**
|
|
1421
|
+
*
|
|
1422
|
+
* Rebate Endpoints
|
|
1423
|
+
*
|
|
1424
|
+
**/
|
|
1425
|
+
getSpotRebateHistoryRecords(params) {
|
|
1426
|
+
return this.getPrivate('sapi/v1/rebate/taxQuery', params);
|
|
1287
1427
|
}
|
|
1428
|
+
/**
|
|
1429
|
+
*
|
|
1430
|
+
* DERIVATIVES - Portfolio Margin Pro - Market Data
|
|
1431
|
+
* This is in mainclient because it shares the same base url
|
|
1432
|
+
*
|
|
1433
|
+
**/
|
|
1288
1434
|
getPortfolioMarginIndexPrice(params) {
|
|
1289
1435
|
return this.get('sapi/v1/portfolio/asset-index-price', params);
|
|
1290
1436
|
}
|
|
1437
|
+
getPortfolioMarginAssetLeverage() {
|
|
1438
|
+
return this.getPrivate('sapi/v1/portfolio/margin-asset-leverage');
|
|
1439
|
+
}
|
|
1440
|
+
/**
|
|
1441
|
+
*
|
|
1442
|
+
* DERIVATIVES - Portfolio Margin Pro - Account
|
|
1443
|
+
* This is in mainclient because it shares the same base url
|
|
1444
|
+
*
|
|
1445
|
+
**/
|
|
1446
|
+
getPortfolioMarginProCollateralRate() {
|
|
1447
|
+
return this.get('sapi/v1/portfolio/collateralRate');
|
|
1448
|
+
}
|
|
1449
|
+
getPortfolioMarginProAccountInfo() {
|
|
1450
|
+
return this.getPrivate('sapi/v1/portfolio/account');
|
|
1451
|
+
}
|
|
1452
|
+
bnbTransfer(params) {
|
|
1453
|
+
return this.postPrivate('sapi/v1/portfolio/bnb-transfer', params);
|
|
1454
|
+
}
|
|
1291
1455
|
submitPortfolioMarginProFullTransfer() {
|
|
1292
1456
|
return this.postPrivate('sapi/v1/portfolio/auto-collection');
|
|
1293
1457
|
}
|
|
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,196 @@ 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
|
-
*
|
|
1350
|
-
**/
|
|
1351
|
-
getC2CTradeHistory(params) {
|
|
1352
|
-
return this.getPrivate('sapi/v1/c2c/orderMatch/listUserOrderHistory', params);
|
|
1353
|
-
}
|
|
1354
|
-
/**
|
|
1355
|
-
*
|
|
1356
|
-
* VIP Loans Endpoints
|
|
1357
|
-
*
|
|
1513
|
+
* Pay endpoints
|
|
1514
|
+
* Found only in old docs, possibly @deprecated
|
|
1358
1515
|
**/
|
|
1359
|
-
|
|
1360
|
-
return this.getPrivate('sapi/v1/
|
|
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);
|
|
1385
|
-
}
|
|
1386
|
-
getVipBorrowInterestRate(params) {
|
|
1387
|
-
return this.getPrivate('sapi/v1/loan/vip/request/interestRate', params);
|
|
1516
|
+
getPayTransactions(params) {
|
|
1517
|
+
return this.getPrivate('sapi/v1/pay/transactions', params);
|
|
1388
1518
|
}
|
|
1389
1519
|
/**
|
|
1390
1520
|
*
|
|
1391
|
-
*
|
|
1392
|
-
*
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
return this.
|
|
1396
|
-
}
|
|
1397
|
-
borrowCryptoLoan(params) {
|
|
1398
|
-
return this.postPrivate('sapi/v1/loan/borrow', params);
|
|
1399
|
-
}
|
|
1400
|
-
getCryptoLoanBorrowHistory(params) {
|
|
1401
|
-
return this.getPrivate('sapi/v1/loan/borrow/history', params);
|
|
1402
|
-
}
|
|
1403
|
-
getCryptoLoanOngoingOrders(params) {
|
|
1404
|
-
return this.getPrivate('sapi/v1/loan/ongoing/orders', params);
|
|
1405
|
-
}
|
|
1406
|
-
repayCryptoLoan(params) {
|
|
1407
|
-
return this.postPrivate('sapi/v1/loan/repay', params);
|
|
1408
|
-
}
|
|
1409
|
-
getCryptoLoanRepaymentHistory(params) {
|
|
1410
|
-
return this.getPrivate('sapi/v1/loan/repay/history', params);
|
|
1411
|
-
}
|
|
1412
|
-
adjustCryptoLoanLTV(params) {
|
|
1413
|
-
return this.postPrivate('sapi/v1/loan/adjust/ltv', params);
|
|
1414
|
-
}
|
|
1415
|
-
getCryptoLoanLTVAdjustmentHistory(params) {
|
|
1416
|
-
return this.getPrivate('sapi/v1/loan/ltv/adjustment/history', params);
|
|
1417
|
-
}
|
|
1418
|
-
getCryptoLoanLoanableAssets(params) {
|
|
1419
|
-
return this.getPrivate('sapi/v1/loan/loanable/data', params);
|
|
1420
|
-
}
|
|
1421
|
-
getCryptoLoanCollateralAssetsData(params) {
|
|
1422
|
-
return this.getPrivate('sapi/v1/loan/collateral/data', params);
|
|
1423
|
-
}
|
|
1424
|
-
getCryptoLoanCollateralRepayRate(params) {
|
|
1425
|
-
return this.getPrivate('sapi/v1/loan/repay/collateral/rate', params);
|
|
1426
|
-
}
|
|
1427
|
-
customizeCryptoLoanMarginCall(params) {
|
|
1428
|
-
return this.postPrivate('sapi/v1/loan/customize/margin_call', params);
|
|
1429
|
-
}
|
|
1430
|
-
borrowCryptoLoanFlexible(params) {
|
|
1431
|
-
return this.postPrivate('sapi/v2/loan/flexible/borrow', params);
|
|
1432
|
-
}
|
|
1433
|
-
getCryptoLoanFlexibleOngoingOrders(params) {
|
|
1434
|
-
return this.getPrivate('sapi/v2/loan/flexible/ongoing/orders', params);
|
|
1435
|
-
}
|
|
1436
|
-
getLoanFlexibleBorrowHistory(params) {
|
|
1437
|
-
return this.getPrivate('sapi/v2/loan/flexible/borrow/history', 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);
|
|
1438
1526
|
}
|
|
1439
|
-
|
|
1440
|
-
return this.
|
|
1527
|
+
getBrokerSubAccount(params) {
|
|
1528
|
+
return this.getPrivate('sapi/v1/broker/subAccount', params);
|
|
1441
1529
|
}
|
|
1442
|
-
|
|
1443
|
-
return this.
|
|
1530
|
+
enableMarginBrokerSubAccount(params) {
|
|
1531
|
+
return this.postPrivate('sapi/v1/broker/subAccount/futures', params);
|
|
1444
1532
|
}
|
|
1445
|
-
|
|
1446
|
-
return this.postPrivate('sapi/
|
|
1533
|
+
createApiKeyBrokerSubAccount(params) {
|
|
1534
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi', params);
|
|
1447
1535
|
}
|
|
1448
|
-
|
|
1449
|
-
return this.
|
|
1536
|
+
changePermissionApiKeyBrokerSubAccount(params) {
|
|
1537
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/permission', params);
|
|
1450
1538
|
}
|
|
1451
|
-
|
|
1452
|
-
return this.
|
|
1539
|
+
changeComissionBrokerSubAccount(params) {
|
|
1540
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/permission', params);
|
|
1453
1541
|
}
|
|
1454
|
-
|
|
1455
|
-
return this.
|
|
1542
|
+
enableUniversalTransferApiKeyBrokerSubAccount(params) {
|
|
1543
|
+
return this.postPrivate('sapi/v1/broker/subAccountApi/permission/universalTransfer', params);
|
|
1456
1544
|
}
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
* Copy trading endpoints
|
|
1460
|
-
*
|
|
1461
|
-
**/
|
|
1462
|
-
getFuturesLeadTraderStatus() {
|
|
1463
|
-
return this.getPrivate('sapi/v1/copyTrading/futures/userStatus');
|
|
1545
|
+
updateIpRestrictionForSubAccountApiKey(params) {
|
|
1546
|
+
return this.postPrivate('sapi/v2/broker/subAccountApi/ipRestriction', params);
|
|
1464
1547
|
}
|
|
1465
|
-
|
|
1466
|
-
return this.
|
|
1548
|
+
deleteIPRestrictionForSubAccountApiKey(params) {
|
|
1549
|
+
return this.deletePrivate('sapi/v1/broker/subAccountApi/ipRestriction/ipList', params);
|
|
1467
1550
|
}
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
* Pay endpoints
|
|
1471
|
-
*
|
|
1472
|
-
**/
|
|
1473
|
-
getPayTransactions(params) {
|
|
1474
|
-
return this.getPrivate('sapi/v1/pay/transactions', params);
|
|
1551
|
+
deleteApiKeyBrokerSubAccount(params) {
|
|
1552
|
+
return this.deletePrivate('sapi/v1/broker/subAccountApi', params);
|
|
1475
1553
|
}
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
* Convert endpoints
|
|
1479
|
-
*
|
|
1480
|
-
**/
|
|
1481
|
-
getConvertPairs(params) {
|
|
1482
|
-
return this.getPrivate('sapi/v1/convert/exchangeInfo', params);
|
|
1554
|
+
getSubAccountBrokerIpRestriction(params) {
|
|
1555
|
+
return this.getPrivate('sapi/v1/broker/subAccountApi/ipRestriction', params);
|
|
1483
1556
|
}
|
|
1484
|
-
|
|
1485
|
-
return this.getPrivate('sapi/v1/
|
|
1557
|
+
getApiKeyBrokerSubAccount(params) {
|
|
1558
|
+
return this.getPrivate('sapi/v1/broker/subAccountApi', params);
|
|
1486
1559
|
}
|
|
1487
|
-
|
|
1488
|
-
return this.
|
|
1560
|
+
getBrokerInfo() {
|
|
1561
|
+
return this.getPrivate('sapi/v1/broker/info');
|
|
1489
1562
|
}
|
|
1490
|
-
|
|
1491
|
-
|
|
1563
|
+
/**
|
|
1564
|
+
*
|
|
1565
|
+
* EXCHANGE LINK - Account Endpoints
|
|
1566
|
+
* https://developers.binance.com/docs/binance_link
|
|
1567
|
+
*/
|
|
1568
|
+
transferBrokerSubAccount(params) {
|
|
1569
|
+
return this.postPrivate('sapi/v1/broker/transfer', params);
|
|
1492
1570
|
}
|
|
1493
|
-
|
|
1494
|
-
return this.getPrivate('sapi/v1/
|
|
1571
|
+
getBrokerSubAccountHistory(params) {
|
|
1572
|
+
return this.getPrivate('sapi/v1/broker/transfer', params);
|
|
1495
1573
|
}
|
|
1496
|
-
|
|
1497
|
-
return this.postPrivate('sapi/v1/
|
|
1574
|
+
submitBrokerSubFuturesTransfer(params) {
|
|
1575
|
+
return this.postPrivate('sapi/v1/broker/transfer/futures', params);
|
|
1498
1576
|
}
|
|
1499
|
-
|
|
1500
|
-
return this.
|
|
1577
|
+
getSubAccountFuturesTransferHistory(params) {
|
|
1578
|
+
return this.getPrivate('sapi/v1/broker/transfer/futures', params);
|
|
1501
1579
|
}
|
|
1502
|
-
|
|
1503
|
-
return this.
|
|
1580
|
+
universalTransferBroker(params) {
|
|
1581
|
+
return this.postPrivate('sapi/v1/broker/universalTransfer', params);
|
|
1504
1582
|
}
|
|
1505
|
-
|
|
1506
|
-
return this.getPrivate('sapi/v1/
|
|
1583
|
+
getUniversalTransferBroker(params) {
|
|
1584
|
+
return this.getPrivate('sapi/v1/broker/universalTransfer', params);
|
|
1507
1585
|
}
|
|
1508
1586
|
/**
|
|
1509
1587
|
*
|
|
1510
|
-
*
|
|
1588
|
+
* EXCHANGE LINK - Fee Endpoints
|
|
1589
|
+
* https://developers.binance.com/docs/binance_link
|
|
1590
|
+
*/
|
|
1591
|
+
/**
|
|
1511
1592
|
*
|
|
1593
|
+
* @deprecated
|
|
1594
|
+
*/
|
|
1595
|
+
// USD & Coin-M can be found under API getIncome() (find "API rebate" in results)
|
|
1596
|
+
getBrokerSpotRebateHistory(days, customerId) {
|
|
1597
|
+
if (days === 7) {
|
|
1598
|
+
return this.getPrivate('sapi/v1/apiReferral/rebate/recentRecord', {
|
|
1599
|
+
customerId,
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
if (days === 30) {
|
|
1603
|
+
return this.getPrivate('sapi/v1/apiReferral/rebate/historicalRecord', {
|
|
1604
|
+
customerId,
|
|
1605
|
+
});
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* Broker Endpoints - only on old docs
|
|
1610
|
+
* @deprecated, found only in old docs
|
|
1611
|
+
* Use EXCHANGE LINK endpoints instead - https://developers.binance.com/docs/binance_link
|
|
1612
|
+
*/
|
|
1613
|
+
/**
|
|
1614
|
+
* @deprecated, found only in old docs
|
|
1615
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1512
1616
|
**/
|
|
1513
|
-
|
|
1514
|
-
return this.getPrivate('sapi/v1/
|
|
1617
|
+
getBrokerIfNewSpotUser() {
|
|
1618
|
+
return this.getPrivate('sapi/v1/apiReferral/ifNewUser');
|
|
1515
1619
|
}
|
|
1516
1620
|
/**
|
|
1517
|
-
*
|
|
1518
|
-
*
|
|
1519
|
-
*
|
|
1621
|
+
* @deprecated, found only in old docs
|
|
1622
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1520
1623
|
**/
|
|
1521
|
-
|
|
1522
|
-
return this.getPrivate('sapi/v1/
|
|
1624
|
+
getBrokerSubAccountDepositHistory(params) {
|
|
1625
|
+
return this.getPrivate('sapi/v1/bv1/apiReferral/ifNewUser', params);
|
|
1523
1626
|
}
|
|
1524
|
-
|
|
1525
|
-
|
|
1627
|
+
/**
|
|
1628
|
+
* @deprecated, found only in old docs
|
|
1629
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1630
|
+
**/
|
|
1631
|
+
getBrokerUserCustomisedId(market) {
|
|
1632
|
+
const prefix = market === 'spot' ? 'sapi' : 'fapi';
|
|
1633
|
+
return this.getPrivate(prefix + '/v1/apiReferral/userCustomization');
|
|
1526
1634
|
}
|
|
1527
|
-
|
|
1528
|
-
|
|
1635
|
+
/**
|
|
1636
|
+
* @deprecated, found only in old docs
|
|
1637
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1638
|
+
**/
|
|
1639
|
+
enableFuturesBrokerSubAccount(params) {
|
|
1640
|
+
return this.postPrivate('sapi/v1/broker/subAccount', params);
|
|
1529
1641
|
}
|
|
1530
|
-
|
|
1531
|
-
|
|
1642
|
+
/**
|
|
1643
|
+
* @deprecated, found only in old docs
|
|
1644
|
+
* Use EXCHANGE LINK endpoints instead
|
|
1645
|
+
**/
|
|
1646
|
+
enableMarginApiKeyBrokerSubAccount(params) {
|
|
1647
|
+
return this.postPrivate('sapi/v1/broker/subAccount/margin', params);
|
|
1648
|
+
}
|
|
1649
|
+
/**
|
|
1650
|
+
* Validate syntax meets requirements set by binance. Log warning if not.
|
|
1651
|
+
*/
|
|
1652
|
+
validateOrderId(params, orderIdProperty) {
|
|
1653
|
+
const apiCategory = 'spot';
|
|
1654
|
+
if (!params[orderIdProperty]) {
|
|
1655
|
+
params[orderIdProperty] = (0, requestUtils_1.generateNewOrderId)(apiCategory);
|
|
1656
|
+
return;
|
|
1657
|
+
}
|
|
1658
|
+
const expectedOrderIdPrefix = `x-${(0, requestUtils_1.getOrderIdPrefix)(apiCategory)}`;
|
|
1659
|
+
if (!params[orderIdProperty].startsWith(expectedOrderIdPrefix)) {
|
|
1660
|
+
(0, requestUtils_1.logInvalidOrderId)(orderIdProperty, expectedOrderIdPrefix, params);
|
|
1661
|
+
}
|
|
1532
1662
|
}
|
|
1533
1663
|
/**
|
|
1534
1664
|
*
|
|
1535
|
-
*
|
|
1665
|
+
* User Data Stream Endpoints
|
|
1536
1666
|
*
|
|
1537
1667
|
**/
|
|
1538
|
-
|
|
1539
|
-
|
|
1668
|
+
// spot
|
|
1669
|
+
getSpotUserDataListenKey() {
|
|
1670
|
+
return this.post('api/v3/userDataStream');
|
|
1540
1671
|
}
|
|
1541
|
-
|
|
1542
|
-
return this.
|
|
1672
|
+
keepAliveSpotUserDataListenKey(listenKey) {
|
|
1673
|
+
return this.put(`api/v3/userDataStream?listenKey=${listenKey}`);
|
|
1543
1674
|
}
|
|
1544
|
-
|
|
1545
|
-
return this.
|
|
1675
|
+
closeSpotUserDataListenKey(listenKey) {
|
|
1676
|
+
return this.delete(`api/v3/userDataStream?listenKey=${listenKey}`);
|
|
1546
1677
|
}
|
|
1547
|
-
|
|
1548
|
-
|
|
1678
|
+
// margin
|
|
1679
|
+
getMarginUserDataListenKey() {
|
|
1680
|
+
return this.post('sapi/v1/userDataStream');
|
|
1549
1681
|
}
|
|
1550
|
-
|
|
1551
|
-
return this.
|
|
1682
|
+
keepAliveMarginUserDataListenKey(listenKey) {
|
|
1683
|
+
return this.put(`sapi/v1/userDataStream?listenKey=${listenKey}`);
|
|
1552
1684
|
}
|
|
1553
|
-
|
|
1554
|
-
return this.
|
|
1685
|
+
closeMarginUserDataListenKey(listenKey) {
|
|
1686
|
+
return this.delete(`sapi/v1/userDataStream?listenKey=${listenKey}`);
|
|
1687
|
+
}
|
|
1688
|
+
// isolated margin
|
|
1689
|
+
getIsolatedMarginUserDataListenKey(params) {
|
|
1690
|
+
return this.post(`sapi/v1/userDataStream/isolated?${(0, requestUtils_1.serialiseParams)(params)}`);
|
|
1691
|
+
}
|
|
1692
|
+
keepAliveIsolatedMarginUserDataListenKey(params) {
|
|
1693
|
+
return this.put(`sapi/v1/userDataStream/isolated?${(0, requestUtils_1.serialiseParams)(params)}`);
|
|
1694
|
+
}
|
|
1695
|
+
closeIsolatedMarginUserDataListenKey(params) {
|
|
1696
|
+
return this.delete(`sapi/v1/userDataStream/isolated?${(0, requestUtils_1.serialiseParams)(params)}`);
|
|
1555
1697
|
}
|
|
1698
|
+
/**
|
|
1699
|
+
*
|
|
1700
|
+
* DEPRECATED ENDPOINTS
|
|
1701
|
+
*
|
|
1702
|
+
**/
|
|
1556
1703
|
/**
|
|
1557
1704
|
*
|
|
1558
1705
|
* BSwap Endpoints
|
|
@@ -1583,18 +1730,92 @@ class MainClient extends BaseRestClient_1.default {
|
|
|
1583
1730
|
return this.getPrivate('sapi/v1/bswap/liquidityOps', params);
|
|
1584
1731
|
}
|
|
1585
1732
|
/**
|
|
1586
|
-
*
|
|
1733
|
+
*
|
|
1734
|
+
* Savings Endpoints
|
|
1735
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1736
|
+
**/
|
|
1737
|
+
/**
|
|
1738
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1587
1739
|
*/
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1740
|
+
getLeftDailyPurchaseQuotaFlexibleProduct(params) {
|
|
1741
|
+
return this.getPrivate(`sapi/v1/lending/daily/userLeftQuota`, params);
|
|
1742
|
+
}
|
|
1743
|
+
/**
|
|
1744
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1745
|
+
*/
|
|
1746
|
+
getLeftDailyRedemptionQuotaFlexibleProduct(params) {
|
|
1747
|
+
return this.getPrivate(`sapi/v1/lending/daily/userRedemptionQuota`, params);
|
|
1748
|
+
}
|
|
1749
|
+
/**
|
|
1750
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1751
|
+
*/
|
|
1752
|
+
purchaseFixedAndActivityProject(params) {
|
|
1753
|
+
return this.postPrivate(`sapi/v1/lending/customizedFixed/purchase`, params);
|
|
1754
|
+
}
|
|
1755
|
+
/**
|
|
1756
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1757
|
+
*/
|
|
1758
|
+
getFixedAndActivityProjects(params) {
|
|
1759
|
+
return this.getPrivate(`sapi/v1/lending/project/list`, params);
|
|
1760
|
+
}
|
|
1761
|
+
/**
|
|
1762
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1763
|
+
*/
|
|
1764
|
+
getFixedAndActivityProductPosition(params) {
|
|
1765
|
+
return this.getPrivate(`sapi/v1/lending/project/position/list`, params);
|
|
1766
|
+
}
|
|
1767
|
+
/**
|
|
1768
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1769
|
+
*/
|
|
1770
|
+
getLendingAccount() {
|
|
1771
|
+
return this.getPrivate(`sapi/v1/lending/union/account`);
|
|
1772
|
+
}
|
|
1773
|
+
/**
|
|
1774
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1775
|
+
*/
|
|
1776
|
+
getPurchaseRecord(params) {
|
|
1777
|
+
return this.getPrivate(`sapi/v1/lending/union/purchaseRecord`, params);
|
|
1778
|
+
}
|
|
1779
|
+
/**
|
|
1780
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1781
|
+
*/
|
|
1782
|
+
getRedemptionRecord(params) {
|
|
1783
|
+
return this.getPrivate(`sapi/v1/lending/union/redemptionRecord`, params);
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1787
|
+
*/
|
|
1788
|
+
getInterestHistory(params) {
|
|
1789
|
+
return this.getPrivate(`sapi/v1/lending/union/interestHistory`, params);
|
|
1790
|
+
}
|
|
1791
|
+
/**
|
|
1792
|
+
* @deprecated as of 2023-06-22, now Simple Earn
|
|
1793
|
+
*/
|
|
1794
|
+
changeFixedAndActivityPositionToDailyPosition(params) {
|
|
1795
|
+
return this.postPrivate(`sapi/v1/lending/positionChanged`, params);
|
|
1796
|
+
}
|
|
1797
|
+
/**
|
|
1798
|
+
*
|
|
1799
|
+
* Wallet Endpoints
|
|
1800
|
+
* @deprecated
|
|
1801
|
+
**/
|
|
1802
|
+
/**
|
|
1803
|
+
* @deprecated
|
|
1804
|
+
*/
|
|
1805
|
+
enableConvertSubAccount(params) {
|
|
1806
|
+
return this.postPrivate('sapi/v1/broker/subAccount/convert', params);
|
|
1807
|
+
}
|
|
1808
|
+
/**
|
|
1809
|
+
* @deprecated
|
|
1810
|
+
*/
|
|
1811
|
+
convertBUSD(params) {
|
|
1812
|
+
return this.postPrivate('sapi/v1/asset/convert-transfer', params);
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* @deprecated
|
|
1816
|
+
*/
|
|
1817
|
+
getConvertBUSDHistory(params) {
|
|
1818
|
+
return this.getPrivate('sapi/v1/asset/convert-transfer/queryByPage', params);
|
|
1598
1819
|
}
|
|
1599
1820
|
}
|
|
1600
1821
|
exports.MainClient = MainClient;
|