bitget-api 2.1.0 → 2.2.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/broker-client.d.ts +1 -1
- package/lib/futures-client.d.ts +1 -1
- package/lib/futures-client.js.map +1 -1
- package/lib/index.d.ts +5 -5
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/rest-client-v2.d.ts +2 -2
- package/lib/rest-client-v2.js +231 -231
- package/lib/rest-client-v2.js.map +1 -1
- package/lib/spot-client.d.ts +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/index.js +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/request/index.d.ts +5 -5
- package/lib/types/request/index.js +5 -5
- package/lib/types/request/index.js.map +1 -1
- package/lib/types/response/index.d.ts +1 -1
- package/lib/types/response/index.js +1 -1
- package/lib/types/response/index.js.map +1 -1
- package/lib/types/shared.d.ts +1 -1
- package/lib/types/websockets/events.d.ts +11 -11
- package/lib/util/BaseRestClient.js.map +1 -1
- package/lib/util/BaseWSClient.d.ts +2 -4
- package/lib/util/BaseWSClient.js +10 -9
- package/lib/util/BaseWSClient.js.map +1 -1
- package/lib/util/WsStore.js.map +1 -1
- package/lib/util/browser-support.js +1 -0
- package/lib/util/browser-support.js.map +1 -1
- package/lib/util/index.d.ts +2 -2
- package/lib/util/index.js +2 -2
- package/lib/util/index.js.map +1 -1
- package/lib/util/logger.js +1 -0
- package/lib/util/logger.js.map +1 -1
- package/lib/util/node-support.js +1 -0
- package/lib/util/node-support.js.map +1 -1
- package/lib/util/requestUtils.d.ts +1 -1
- package/lib/util/type-guards.js +1 -1
- package/lib/util/websocket-util.js +5 -3
- package/lib/util/websocket-util.js.map +1 -1
- package/lib/websocket-client-v2.js +2 -2
- package/lib/websocket-client-v2.js.map +1 -1
- package/lib/websocket-client.js +11 -10
- package/lib/websocket-client.js.map +1 -1
- package/package.json +7 -1
package/lib/rest-client-v2.js
CHANGED
|
@@ -57,7 +57,7 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
57
57
|
};
|
|
58
58
|
console.log('Time synchronization results:');
|
|
59
59
|
console.log(result);
|
|
60
|
-
console.log(`Your approximate latency to exchange server:
|
|
60
|
+
console.log(`Your approximate latency to exchange server:
|
|
61
61
|
One way: ${estimatedOneWayLatency}ms.
|
|
62
62
|
Round trip: ${roundTripTime}ms.
|
|
63
63
|
`);
|
|
@@ -96,7 +96,7 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
96
96
|
*
|
|
97
97
|
*/
|
|
98
98
|
getAnnouncements(params) {
|
|
99
|
-
return this.get(
|
|
99
|
+
return this.get('/api/v2/public/annoucements', params);
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
*
|
|
@@ -104,10 +104,10 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
104
104
|
*
|
|
105
105
|
*/
|
|
106
106
|
getServerTime() {
|
|
107
|
-
return this.get(
|
|
107
|
+
return this.get('/api/v2/public/time');
|
|
108
108
|
}
|
|
109
109
|
getTradeRate(params) {
|
|
110
|
-
return this.getPrivate(
|
|
110
|
+
return this.getPrivate('/api/v2/common/trade-rate', params);
|
|
111
111
|
}
|
|
112
112
|
/**
|
|
113
113
|
*
|
|
@@ -115,16 +115,16 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
115
115
|
*
|
|
116
116
|
*/
|
|
117
117
|
getSpotTransactionRecords(params) {
|
|
118
|
-
return this.getPrivate(
|
|
118
|
+
return this.getPrivate('/api/v2/tax/spot-record', params);
|
|
119
119
|
}
|
|
120
120
|
getFuturesTransactionRecords(params) {
|
|
121
|
-
return this.getPrivate(
|
|
121
|
+
return this.getPrivate('/api/v2/tax/future-record', params);
|
|
122
122
|
}
|
|
123
123
|
getMarginTransactionRecords(params) {
|
|
124
|
-
return this.getPrivate(
|
|
124
|
+
return this.getPrivate('/api/v2/tax/margin-record', params);
|
|
125
125
|
}
|
|
126
126
|
getP2PTransactionRecords(params) {
|
|
127
|
-
return this.getPrivate(
|
|
127
|
+
return this.getPrivate('/api/v2/tax/p2p-record', params);
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
130
130
|
*
|
|
@@ -132,16 +132,16 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
132
132
|
*
|
|
133
133
|
*/
|
|
134
134
|
getP2PMerchantList(params) {
|
|
135
|
-
return this.getPrivate(
|
|
135
|
+
return this.getPrivate('/api/v2/p2p/merchantList', params);
|
|
136
136
|
}
|
|
137
137
|
getP2PMerchantInfo() {
|
|
138
|
-
return this.getPrivate(
|
|
138
|
+
return this.getPrivate('/api/v2/p2p/merchantInfo');
|
|
139
139
|
}
|
|
140
140
|
getP2PMerchantOrders(params) {
|
|
141
|
-
return this.getPrivate(
|
|
141
|
+
return this.getPrivate('/api/v2/p2p/orderList', params);
|
|
142
142
|
}
|
|
143
143
|
getP2PMerchantAdvertisementList(params) {
|
|
144
|
-
return this.getPrivate(
|
|
144
|
+
return this.getPrivate('/api/v2/p2p/advList', params);
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
147
|
*
|
|
@@ -149,37 +149,37 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
149
149
|
*
|
|
150
150
|
*/
|
|
151
151
|
getSpotWhaleNetFlowData(params) {
|
|
152
|
-
return this.getPrivate(
|
|
152
|
+
return this.getPrivate('/api/v2/spot/market/whale-net-flow', params);
|
|
153
153
|
}
|
|
154
154
|
getFuturesActiveTakerBuySellVolumeData(params) {
|
|
155
|
-
return this.get(
|
|
155
|
+
return this.get('/api/v2/mix/market/taker-buy-sell', params);
|
|
156
156
|
}
|
|
157
157
|
getFuturesActiveLongShortPositionData(params) {
|
|
158
|
-
return this.get(
|
|
158
|
+
return this.get('/api/v2/mix/market/position-long-short', params);
|
|
159
159
|
}
|
|
160
160
|
getFuturesLongShortRatio(params) {
|
|
161
|
-
return this.get(
|
|
161
|
+
return this.get('/api/v2/mix/market/long-short-ratio', params);
|
|
162
162
|
}
|
|
163
163
|
getMarginLoanGrowthRate(params) {
|
|
164
|
-
return this.get(
|
|
164
|
+
return this.get('/api/v2/mix/market/loan-growth', params);
|
|
165
165
|
}
|
|
166
166
|
getIsolatedMarginBorrowingRatio(params) {
|
|
167
|
-
return this.get(
|
|
167
|
+
return this.get('/api/v2/mix/market/isolated-borrow-rate', params);
|
|
168
168
|
}
|
|
169
169
|
getFuturesActiveBuySellVolumeData(params) {
|
|
170
|
-
return this.get(
|
|
170
|
+
return this.get('/api/v2/mix/market/long-short', params);
|
|
171
171
|
}
|
|
172
172
|
getSpotFundFlow(params) {
|
|
173
|
-
return this.get(
|
|
173
|
+
return this.get('/api/v2/spot/market/fund-flow', params);
|
|
174
174
|
}
|
|
175
175
|
getTradeDataSupportSymbols() {
|
|
176
|
-
return this.get(
|
|
176
|
+
return this.get('/api/v2/spot/market/support-symbols');
|
|
177
177
|
}
|
|
178
178
|
getSpotFundNetFlowData(params) {
|
|
179
|
-
return this.get(
|
|
179
|
+
return this.get('/api/v2/spot/market/fund-net-flow', params);
|
|
180
180
|
}
|
|
181
181
|
getFuturesActiveLongShortAccountData(params) {
|
|
182
|
-
return this.get(
|
|
182
|
+
return this.get('/api/v2/mix/market/account-long-short', params);
|
|
183
183
|
}
|
|
184
184
|
/**
|
|
185
185
|
*
|
|
@@ -187,16 +187,16 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
187
187
|
*
|
|
188
188
|
*/
|
|
189
189
|
createVirtualSubaccount(params) {
|
|
190
|
-
return this.postPrivate(
|
|
190
|
+
return this.postPrivate('/api/v2/user/create-virtual-subaccount', params);
|
|
191
191
|
}
|
|
192
192
|
modifyVirtualSubaccount(params) {
|
|
193
|
-
return this.postPrivate(
|
|
193
|
+
return this.postPrivate('/api/v2/user/modify-virtual-subaccount', params);
|
|
194
194
|
}
|
|
195
195
|
batchCreateVirtualSubaccountAndAPIKey(params) {
|
|
196
196
|
return this.postPrivate('/api/v2/user/batch-create-subaccount-and-apikey', params);
|
|
197
197
|
}
|
|
198
198
|
getVirtualSubaccounts(params) {
|
|
199
|
-
return this.getPrivate(
|
|
199
|
+
return this.getPrivate('/api/v2/user/virtual-subaccount-list', params);
|
|
200
200
|
}
|
|
201
201
|
createVirtualSubaccountAPIKey(params) {
|
|
202
202
|
return this.postPrivate('/api/v2/user/create-virtual-subaccount-apikey', params);
|
|
@@ -213,14 +213,14 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
213
213
|
*
|
|
214
214
|
*/
|
|
215
215
|
getFundingAssets(params) {
|
|
216
|
-
return this.getPrivate(
|
|
216
|
+
return this.getPrivate('/api/v2/account/funding-assets', params);
|
|
217
217
|
}
|
|
218
218
|
getBotAccount(params) {
|
|
219
|
-
return this.getPrivate(
|
|
219
|
+
return this.getPrivate('/api/v2/account/bot-assets', params);
|
|
220
220
|
}
|
|
221
221
|
/** Get assets overview */
|
|
222
222
|
getBalances() {
|
|
223
|
-
return this.getPrivate(
|
|
223
|
+
return this.getPrivate('/api/v2/account/all-account-balance');
|
|
224
224
|
}
|
|
225
225
|
/**
|
|
226
226
|
*
|
|
@@ -228,16 +228,16 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
228
228
|
*
|
|
229
229
|
*/
|
|
230
230
|
getConvertCoins() {
|
|
231
|
-
return this.getPrivate(
|
|
231
|
+
return this.getPrivate('/api/v2/convert/currencies');
|
|
232
232
|
}
|
|
233
233
|
getConvertQuotedPrice(params) {
|
|
234
|
-
return this.getPrivate(
|
|
234
|
+
return this.getPrivate('/api/v2/convert/quoted-price', params);
|
|
235
235
|
}
|
|
236
236
|
convert(params) {
|
|
237
|
-
return this.postPrivate(
|
|
237
|
+
return this.postPrivate('/api/v2/convert/trade', params);
|
|
238
238
|
}
|
|
239
239
|
getConvertHistory(params) {
|
|
240
|
-
return this.getPrivate(
|
|
240
|
+
return this.getPrivate('/api/v2/convert/convert-record', params);
|
|
241
241
|
}
|
|
242
242
|
/**
|
|
243
243
|
*
|
|
@@ -245,13 +245,13 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
245
245
|
*
|
|
246
246
|
*/
|
|
247
247
|
getConvertBGBCoins() {
|
|
248
|
-
return this.getPrivate(
|
|
248
|
+
return this.getPrivate('/api/v2/convert/bgb-convert-coin-list');
|
|
249
249
|
}
|
|
250
250
|
convertBGB(params) {
|
|
251
|
-
return this.postPrivate(
|
|
251
|
+
return this.postPrivate('/api/v2/convert/bgb-convert', params);
|
|
252
252
|
}
|
|
253
253
|
getConvertBGBHistory(params) {
|
|
254
|
-
return this.getPrivate(
|
|
254
|
+
return this.getPrivate('/api/v2/convert/bgb-convert-records', params);
|
|
255
255
|
}
|
|
256
256
|
/**
|
|
257
257
|
*
|
|
@@ -266,34 +266,34 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
266
266
|
*
|
|
267
267
|
*/
|
|
268
268
|
getSpotCoinInfo(params) {
|
|
269
|
-
return this.getPrivate(
|
|
269
|
+
return this.getPrivate('/api/v2/spot/public/coins', params);
|
|
270
270
|
}
|
|
271
271
|
getSpotSymbolInfo(params) {
|
|
272
|
-
return this.getPrivate(
|
|
272
|
+
return this.getPrivate('/api/v2/spot/public/symbols', params);
|
|
273
273
|
}
|
|
274
274
|
getSpotVIPFeeRate() {
|
|
275
|
-
return this.getPrivate(
|
|
275
|
+
return this.getPrivate('/api/v2/spot/market/vip-fee-rate');
|
|
276
276
|
}
|
|
277
277
|
getSpotTicker(params) {
|
|
278
|
-
return this.getPrivate(
|
|
278
|
+
return this.getPrivate('/api/v2/spot/market/tickers', params);
|
|
279
279
|
}
|
|
280
280
|
getSpotMergeDepth(params) {
|
|
281
|
-
return this.getPrivate(
|
|
281
|
+
return this.getPrivate('/api/v2/spot/market/merge-depth', params);
|
|
282
282
|
}
|
|
283
283
|
getSpotOrderBookDepth(params) {
|
|
284
|
-
return this.getPrivate(
|
|
284
|
+
return this.getPrivate('/api/v2/spot/market/orderbook', params);
|
|
285
285
|
}
|
|
286
286
|
getSpotCandles(params) {
|
|
287
|
-
return this.getPrivate(
|
|
287
|
+
return this.getPrivate('/api/v2/spot/market/candles', params);
|
|
288
288
|
}
|
|
289
289
|
getSpotHistoricCandles(params) {
|
|
290
|
-
return this.getPrivate(
|
|
290
|
+
return this.getPrivate('/api/v2/spot/market/history-candles', params);
|
|
291
291
|
}
|
|
292
292
|
getSpotRecentTrades(params) {
|
|
293
|
-
return this.getPrivate(
|
|
293
|
+
return this.getPrivate('/api/v2/spot/market/fills', params);
|
|
294
294
|
}
|
|
295
295
|
getSpotHistoricTrades(params) {
|
|
296
|
-
return this.getPrivate(
|
|
296
|
+
return this.getPrivate('/api/v2/spot/market/fills-history', params);
|
|
297
297
|
}
|
|
298
298
|
/**
|
|
299
299
|
*
|
|
@@ -301,37 +301,37 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
301
301
|
*
|
|
302
302
|
*/
|
|
303
303
|
spotSubmitOrder(params) {
|
|
304
|
-
return this.postPrivate(
|
|
304
|
+
return this.postPrivate('/api/v2/spot/trade/place-order', params);
|
|
305
305
|
}
|
|
306
306
|
spotCancelandSubmitOrder(params) {
|
|
307
|
-
return this.postPrivate(
|
|
307
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-replace-order', params);
|
|
308
308
|
}
|
|
309
309
|
spotBatchCancelandSubmitOrder(params) {
|
|
310
|
-
return this.postPrivate(
|
|
310
|
+
return this.postPrivate('/api/v2/spot/trade/batch-cancel-replace-order', params);
|
|
311
311
|
}
|
|
312
312
|
spotCancelOrder(params) {
|
|
313
|
-
return this.postPrivate(
|
|
313
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-order', params);
|
|
314
314
|
}
|
|
315
315
|
spotBatchSubmitOrders(params) {
|
|
316
|
-
return this.postPrivate(
|
|
316
|
+
return this.postPrivate('/api/v2/spot/trade/batch-orders', params);
|
|
317
317
|
}
|
|
318
318
|
spotBatchCancelOrders(params) {
|
|
319
|
-
return this.postPrivate(
|
|
319
|
+
return this.postPrivate('/api/v2/spot/trade/batch-cancel-order', params);
|
|
320
320
|
}
|
|
321
321
|
spotCancelSymbolOrder(params) {
|
|
322
|
-
return this.postPrivate(
|
|
322
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-symbol-order', params);
|
|
323
323
|
}
|
|
324
324
|
getSpotOrder(params) {
|
|
325
|
-
return this.getPrivate(
|
|
325
|
+
return this.getPrivate('/api/v2/spot/trade/orderInfo', params);
|
|
326
326
|
}
|
|
327
327
|
getSpotOpenOrders(params) {
|
|
328
|
-
return this.getPrivate(
|
|
328
|
+
return this.getPrivate('/api/v2/spot/trade/unfilled-orders', params);
|
|
329
329
|
}
|
|
330
330
|
getSpotHistoricOrders(params) {
|
|
331
|
-
return this.getPrivate(
|
|
331
|
+
return this.getPrivate('/api/v2/spot/trade/history-orders', params);
|
|
332
332
|
}
|
|
333
333
|
getSpotFills(params) {
|
|
334
|
-
return this.getPrivate(
|
|
334
|
+
return this.getPrivate('/api/v2/spot/trade/fills', params);
|
|
335
335
|
}
|
|
336
336
|
/**
|
|
337
337
|
*
|
|
@@ -339,22 +339,22 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
339
339
|
*
|
|
340
340
|
*/
|
|
341
341
|
spotSubmitPlanOrder(params) {
|
|
342
|
-
return this.postPrivate(
|
|
342
|
+
return this.postPrivate('/api/v2/spot/trade/place-plan-order', params);
|
|
343
343
|
}
|
|
344
344
|
spotModifyPlanOrder(params) {
|
|
345
|
-
return this.postPrivate(
|
|
345
|
+
return this.postPrivate('/api/v2/spot/trade/modify-plan-order', params);
|
|
346
346
|
}
|
|
347
347
|
spotCancelPlanOrder(params) {
|
|
348
|
-
return this.postPrivate(
|
|
348
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-plan-order', params);
|
|
349
349
|
}
|
|
350
350
|
getSpotCurrentPlanOrders(params) {
|
|
351
|
-
return this.getPrivate(
|
|
351
|
+
return this.getPrivate('/api/v2/spot/trade/current-plan-order', params);
|
|
352
352
|
}
|
|
353
353
|
getSpotPlanSubOrder(params) {
|
|
354
|
-
return this.getPrivate(
|
|
354
|
+
return this.getPrivate('/api/v2/spot/trade/plan-sub-order', params);
|
|
355
355
|
}
|
|
356
356
|
getSpotHistoricPlanOrders(params) {
|
|
357
|
-
return this.getPrivate(
|
|
357
|
+
return this.getPrivate('/api/v2/spot/trade/history-plan-order', params);
|
|
358
358
|
}
|
|
359
359
|
spotCancelPlanOrders(params) {
|
|
360
360
|
return this.postPrivate('/api/v2/spot/trade/batch-cancel-plan-order', params);
|
|
@@ -365,61 +365,61 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
365
365
|
*
|
|
366
366
|
*/
|
|
367
367
|
getSpotAccount() {
|
|
368
|
-
return this.getPrivate(
|
|
368
|
+
return this.getPrivate('/api/v2/spot/account/info');
|
|
369
369
|
}
|
|
370
370
|
getSpotAccountAssets(params) {
|
|
371
|
-
return this.getPrivate(
|
|
371
|
+
return this.getPrivate('/api/v2/spot/account/assets', params);
|
|
372
372
|
}
|
|
373
373
|
getSpotSubAccountAssets() {
|
|
374
|
-
return this.getPrivate(
|
|
374
|
+
return this.getPrivate('/api/v2/spot/account/subaccount-assets');
|
|
375
375
|
}
|
|
376
376
|
spotModifyDepositAccount(params) {
|
|
377
|
-
return this.postPrivate(
|
|
377
|
+
return this.postPrivate('/api/v2/spot/wallet/modify-deposit-account', params);
|
|
378
378
|
}
|
|
379
379
|
getSpotAccountBills(params) {
|
|
380
|
-
return this.getPrivate(
|
|
380
|
+
return this.getPrivate('/api/v2/spot/account/bills', params);
|
|
381
381
|
}
|
|
382
382
|
spotTransfer(params) {
|
|
383
|
-
return this.postPrivate(
|
|
383
|
+
return this.postPrivate('/api/v2/spot/wallet/transfer', params);
|
|
384
384
|
}
|
|
385
385
|
getSpotTransferableCoins(params) {
|
|
386
|
-
return this.getPrivate(
|
|
386
|
+
return this.getPrivate('/api/v2/spot/wallet/transfer-coin-info', params);
|
|
387
387
|
}
|
|
388
388
|
spotSubTransfer(params) {
|
|
389
|
-
return this.postPrivate(
|
|
389
|
+
return this.postPrivate('/api/v2/spot/wallet/subaccount-transfer', params);
|
|
390
390
|
}
|
|
391
391
|
spotWithdraw(params) {
|
|
392
|
-
return this.postPrivate(
|
|
392
|
+
return this.postPrivate('/api/v2/spot/wallet/withdrawal', params);
|
|
393
393
|
}
|
|
394
394
|
getSpotMainSubTransferRecord(params) {
|
|
395
|
-
return this.getPrivate(
|
|
395
|
+
return this.getPrivate('/api/v2/spot/account/sub-main-trans-record', params);
|
|
396
396
|
}
|
|
397
397
|
getSpotTransferHistory(params) {
|
|
398
|
-
return this.getPrivate(
|
|
398
|
+
return this.getPrivate('/api/v2/spot/account/transferRecords', params);
|
|
399
399
|
}
|
|
400
400
|
spotSwitchBGBDeduct(params) {
|
|
401
|
-
return this.postPrivate(
|
|
401
|
+
return this.postPrivate('/api/v2/spot/account/switch-deduct', params);
|
|
402
402
|
}
|
|
403
403
|
getSpotDepositAddress(params) {
|
|
404
|
-
return this.getPrivate(
|
|
404
|
+
return this.getPrivate('/api/v2/spot/wallet/deposit-address', params);
|
|
405
405
|
}
|
|
406
406
|
getSpotSubDepositAddress(params) {
|
|
407
|
-
return this.getPrivate(
|
|
407
|
+
return this.getPrivate('/api/v2/spot/wallet/subaccount-deposit-address', params);
|
|
408
408
|
}
|
|
409
409
|
getSpotBGBDeductInfo() {
|
|
410
|
-
return this.getPrivate(
|
|
410
|
+
return this.getPrivate('/api/v2/spot/account/deduct-info');
|
|
411
411
|
}
|
|
412
412
|
spotCancelWithdrawal(params) {
|
|
413
|
-
return this.postPrivate(
|
|
413
|
+
return this.postPrivate('/api/v2/spot/wallet/cancel-withdrawal', params);
|
|
414
414
|
}
|
|
415
415
|
getSubAccountDepositRecords(params) {
|
|
416
|
-
return this.getPrivate(
|
|
416
|
+
return this.getPrivate('/api/v2/spot/wallet/subaccount-deposit-records', params);
|
|
417
417
|
}
|
|
418
418
|
getSpotDepositHistory(params) {
|
|
419
|
-
return this.getPrivate(
|
|
419
|
+
return this.getPrivate('/api/v2/spot/wallet/deposit-records', params);
|
|
420
420
|
}
|
|
421
421
|
getSpotWithdrawalHistory(params) {
|
|
422
|
-
return this.getPrivate(
|
|
422
|
+
return this.getPrivate('/api/v2/spot/wallet/withdrawal-records', params);
|
|
423
423
|
}
|
|
424
424
|
/**
|
|
425
425
|
*
|
|
@@ -434,61 +434,61 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
434
434
|
*
|
|
435
435
|
*/
|
|
436
436
|
getFuturesVIPFeeRate() {
|
|
437
|
-
return this.get(
|
|
437
|
+
return this.get('/api/v2/mix/market/vip-fee-rate');
|
|
438
438
|
}
|
|
439
439
|
getFuturesInterestRateHistory(params) {
|
|
440
|
-
return this.get(
|
|
440
|
+
return this.get('/api/v2/mix/market/union-interest-rate-history', params);
|
|
441
441
|
}
|
|
442
442
|
getFuturesTicker(params) {
|
|
443
|
-
return this.get(
|
|
443
|
+
return this.get('/api/v2/mix/market/ticker', params);
|
|
444
444
|
}
|
|
445
445
|
getFuturesInterestExchangeRate() {
|
|
446
|
-
return this.get(
|
|
446
|
+
return this.get('/api/v2/mix/market/exchange-rate');
|
|
447
447
|
}
|
|
448
448
|
getFuturesDiscountRate() {
|
|
449
|
-
return this.get(
|
|
449
|
+
return this.get('/api/v2/mix/market/discount-rate');
|
|
450
450
|
}
|
|
451
451
|
getFuturesAllTickers(params) {
|
|
452
|
-
return this.get(
|
|
452
|
+
return this.get('/api/v2/mix/market/tickers', params);
|
|
453
453
|
}
|
|
454
454
|
getFuturesMergeDepth(params) {
|
|
455
|
-
return this.get(
|
|
455
|
+
return this.get('/api/v2/mix/market/merge-depth', params);
|
|
456
456
|
}
|
|
457
457
|
getFuturesCandles(params) {
|
|
458
|
-
return this.get(
|
|
458
|
+
return this.get('/api/v2/mix/market/candles', params);
|
|
459
459
|
}
|
|
460
460
|
getFuturesHistoricCandles(params) {
|
|
461
|
-
return this.get(
|
|
461
|
+
return this.get('/api/v2/mix/market/history-candles', params);
|
|
462
462
|
}
|
|
463
463
|
getFuturesHistoricIndexPriceCandles(params) {
|
|
464
|
-
return this.get(
|
|
464
|
+
return this.get('/api/v2/mix/market/history-index-candles', params);
|
|
465
465
|
}
|
|
466
466
|
getFuturesHistoricMarkPriceCandles(params) {
|
|
467
|
-
return this.get(
|
|
467
|
+
return this.get('/api/v2/mix/market/history-mark-candles', params);
|
|
468
468
|
}
|
|
469
469
|
getFuturesRecentTrades(params) {
|
|
470
|
-
return this.get(
|
|
470
|
+
return this.get('/api/v2/mix/market/fills', params);
|
|
471
471
|
}
|
|
472
472
|
getFuturesHistoricTrades(params) {
|
|
473
|
-
return this.get(
|
|
473
|
+
return this.get('/api/v2/mix/market/fills-history', params);
|
|
474
474
|
}
|
|
475
475
|
getFuturesOpenInterest(params) {
|
|
476
|
-
return this.get(
|
|
476
|
+
return this.get('/api/v2/mix/market/open-interest', params);
|
|
477
477
|
}
|
|
478
478
|
getFuturesNextFundingTime(params) {
|
|
479
|
-
return this.get(
|
|
479
|
+
return this.get('/api/v2/mix/market/funding-time', params);
|
|
480
480
|
}
|
|
481
481
|
getFuturesSymbolPrice(params) {
|
|
482
|
-
return this.get(
|
|
482
|
+
return this.get('/api/v2/mix/market/symbol-price', params);
|
|
483
483
|
}
|
|
484
484
|
getFuturesHistoricFundingRates(params) {
|
|
485
|
-
return this.get(
|
|
485
|
+
return this.get('/api/v2/mix/market/history-fund-rate', params);
|
|
486
486
|
}
|
|
487
487
|
getFuturesCurrentFundingRate(params) {
|
|
488
|
-
return this.get(
|
|
488
|
+
return this.get('/api/v2/mix/market/current-fund-rate', params);
|
|
489
489
|
}
|
|
490
490
|
getFuturesContractConfig(params) {
|
|
491
|
-
return this.get(
|
|
491
|
+
return this.get('/api/v2/mix/market/contracts', params);
|
|
492
492
|
}
|
|
493
493
|
/**
|
|
494
494
|
*
|
|
@@ -496,40 +496,40 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
496
496
|
*
|
|
497
497
|
*/
|
|
498
498
|
getFuturesAccountAsset(params) {
|
|
499
|
-
return this.getPrivate(
|
|
499
|
+
return this.getPrivate('/api/v2/mix/account/account', params);
|
|
500
500
|
}
|
|
501
501
|
getFuturesAccountAssets(params) {
|
|
502
|
-
return this.getPrivate(
|
|
502
|
+
return this.getPrivate('/api/v2/mix/account/accounts', params);
|
|
503
503
|
}
|
|
504
504
|
getFuturesSubAccountAssets(params) {
|
|
505
|
-
return this.getPrivate(
|
|
505
|
+
return this.getPrivate('/api/v2/mix/account/sub-account-assets', params);
|
|
506
506
|
}
|
|
507
507
|
getFuturesInterestHistory(params) {
|
|
508
|
-
return this.getPrivate(
|
|
508
|
+
return this.getPrivate('/api/v2/mix/account/interest-history', params);
|
|
509
509
|
}
|
|
510
510
|
getFuturesOpenCount(params) {
|
|
511
|
-
return this.getPrivate(
|
|
511
|
+
return this.getPrivate('/api/v2/mix/account/open-count', params);
|
|
512
512
|
}
|
|
513
513
|
setFuturesLeverage(params) {
|
|
514
|
-
return this.postPrivate(
|
|
514
|
+
return this.postPrivate('/api/v2/mix/account/set-leverage', params);
|
|
515
515
|
}
|
|
516
516
|
setFuturesPositionAutoMargin(params) {
|
|
517
|
-
return this.postPrivate(
|
|
517
|
+
return this.postPrivate('/api/v2/mix/account/set-auto-margin', params);
|
|
518
518
|
}
|
|
519
519
|
setFuturesPositionMargin(params) {
|
|
520
|
-
return this.postPrivate(
|
|
520
|
+
return this.postPrivate('/api/v2/mix/account/set-margin', params);
|
|
521
521
|
}
|
|
522
522
|
setFuturesAssetMode(params) {
|
|
523
|
-
return this.postPrivate(
|
|
523
|
+
return this.postPrivate('/api/v2/mix/account/set-asset-mode', params);
|
|
524
524
|
}
|
|
525
525
|
setFuturesMarginMode(params) {
|
|
526
|
-
return this.postPrivate(
|
|
526
|
+
return this.postPrivate('/api/v2/mix/account/set-margin-mode', params);
|
|
527
527
|
}
|
|
528
528
|
setFuturesPositionMode(params) {
|
|
529
|
-
return this.postPrivate(
|
|
529
|
+
return this.postPrivate('/api/v2/mix/account/set-position-mode', params);
|
|
530
530
|
}
|
|
531
531
|
getFuturesAccountBills(params) {
|
|
532
|
-
return this.getPrivate(
|
|
532
|
+
return this.getPrivate('/api/v2/mix/account/bill', params);
|
|
533
533
|
}
|
|
534
534
|
/**
|
|
535
535
|
*
|
|
@@ -537,16 +537,16 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
537
537
|
*
|
|
538
538
|
*/
|
|
539
539
|
getFuturesPositionTier(params) {
|
|
540
|
-
return this.get(
|
|
540
|
+
return this.get('/api/v2/mix/market/query-position-lever', params);
|
|
541
541
|
}
|
|
542
542
|
getFuturesPosition(params) {
|
|
543
|
-
return this.getPrivate(
|
|
543
|
+
return this.getPrivate('/api/v2/mix/position/single-position', params);
|
|
544
544
|
}
|
|
545
545
|
getFuturesPositions(params) {
|
|
546
|
-
return this.getPrivate(
|
|
546
|
+
return this.getPrivate('/api/v2/mix/position/all-position', params);
|
|
547
547
|
}
|
|
548
548
|
getFuturesHistoricPositions(params) {
|
|
549
|
-
return this.getPrivate(
|
|
549
|
+
return this.getPrivate('/api/v2/mix/position/history-position', params);
|
|
550
550
|
}
|
|
551
551
|
/**
|
|
552
552
|
*
|
|
@@ -554,43 +554,43 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
554
554
|
*
|
|
555
555
|
*/
|
|
556
556
|
futuresSubmitOrder(params) {
|
|
557
|
-
return this.postPrivate(
|
|
557
|
+
return this.postPrivate('/api/v2/mix/order/place-order', params);
|
|
558
558
|
}
|
|
559
559
|
futuresCancelOrder(params) {
|
|
560
|
-
return this.postPrivate(
|
|
560
|
+
return this.postPrivate('/api/v2/mix/order/cancel-order', params);
|
|
561
561
|
}
|
|
562
562
|
futuresSubmitReversal(params) {
|
|
563
|
-
return this.postPrivate(
|
|
563
|
+
return this.postPrivate('/api/v2/mix/order/click-backhand', params);
|
|
564
564
|
}
|
|
565
565
|
futuresBatchSubmitOrders(params) {
|
|
566
|
-
return this.postPrivate(
|
|
566
|
+
return this.postPrivate('/api/v2/mix/order/batch-place-order', params);
|
|
567
567
|
}
|
|
568
568
|
futuresModifyOrder(params) {
|
|
569
|
-
return this.postPrivate(
|
|
569
|
+
return this.postPrivate('/api/v2/mix/order/modify-order', params);
|
|
570
570
|
}
|
|
571
571
|
futuresBatchCancelOrders(params) {
|
|
572
|
-
return this.postPrivate(
|
|
572
|
+
return this.postPrivate('/api/v2/mix/order/batch-cancel-orders', params);
|
|
573
573
|
}
|
|
574
574
|
futuresFlashClosePositions(params) {
|
|
575
|
-
return this.postPrivate(
|
|
575
|
+
return this.postPrivate('/api/v2/mix/order/close-positions', params);
|
|
576
576
|
}
|
|
577
577
|
getFuturesOrder(params) {
|
|
578
|
-
return this.getPrivate(
|
|
578
|
+
return this.getPrivate('/api/v2/mix/order/detail', params);
|
|
579
579
|
}
|
|
580
580
|
getFuturesFills(params) {
|
|
581
|
-
return this.getPrivate(
|
|
581
|
+
return this.getPrivate('/api/v2/mix/order/fills', params);
|
|
582
582
|
}
|
|
583
583
|
getFuturesHistoricOrderFills(params) {
|
|
584
|
-
return this.getPrivate(
|
|
584
|
+
return this.getPrivate('/api/v2/mix/order/fill-history', params);
|
|
585
585
|
}
|
|
586
586
|
getFuturesOpenOrders(params) {
|
|
587
|
-
return this.getPrivate(
|
|
587
|
+
return this.getPrivate('/api/v2/mix/order/orders-pending', params);
|
|
588
588
|
}
|
|
589
589
|
getFuturesHistoricOrders(params) {
|
|
590
|
-
return this.getPrivate(
|
|
590
|
+
return this.getPrivate('/api/v2/mix/order/orders-history', params);
|
|
591
591
|
}
|
|
592
592
|
futuresCancelAllOrders(params) {
|
|
593
|
-
return this.postPrivate(
|
|
593
|
+
return this.postPrivate('/api/v2/mix/order/cancel-all-orders', params);
|
|
594
594
|
}
|
|
595
595
|
/**
|
|
596
596
|
*
|
|
@@ -598,28 +598,28 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
598
598
|
*
|
|
599
599
|
*/
|
|
600
600
|
futuresSubmitPlanSubOrder(params) {
|
|
601
|
-
return this.postPrivate(
|
|
601
|
+
return this.postPrivate('/api/v2/mix/order/plan-sub-order', params);
|
|
602
602
|
}
|
|
603
603
|
futuresSubmitTPSLOrder(params) {
|
|
604
|
-
return this.postPrivate(
|
|
604
|
+
return this.postPrivate('/api/v2/mix/order/place-tpsl-order', params);
|
|
605
605
|
}
|
|
606
606
|
futuresSubmitPlanOrder(params) {
|
|
607
|
-
return this.postPrivate(
|
|
607
|
+
return this.postPrivate('/api/v2/mix/order/place-plan-order', params);
|
|
608
608
|
}
|
|
609
609
|
futuresModifyTPSLPOrder(params) {
|
|
610
|
-
return this.postPrivate(
|
|
610
|
+
return this.postPrivate('/api/v2/mix/order/modify-tpsl-order', params);
|
|
611
611
|
}
|
|
612
612
|
futuresModifyPlanOrder(params) {
|
|
613
|
-
return this.postPrivate(
|
|
613
|
+
return this.postPrivate('/api/v2/mix/order/modify-plan-order', params);
|
|
614
614
|
}
|
|
615
615
|
futuresCancelPlanOrder(params) {
|
|
616
|
-
return this.postPrivate(
|
|
616
|
+
return this.postPrivate('/api/v2/mix/order/cancel-plan-order', params);
|
|
617
617
|
}
|
|
618
618
|
getFuturesPlanOrders(params) {
|
|
619
|
-
return this.getPrivate(
|
|
619
|
+
return this.getPrivate('/api/v2/mix/order/orders-plan-pending', params);
|
|
620
620
|
}
|
|
621
621
|
getFuturesHistoricPlanOrders(params) {
|
|
622
|
-
return this.getPrivate(
|
|
622
|
+
return this.getPrivate('/api/v2/mix/order/orders-plan-history', params);
|
|
623
623
|
}
|
|
624
624
|
/**
|
|
625
625
|
*
|
|
@@ -634,43 +634,43 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
634
634
|
*
|
|
635
635
|
*/
|
|
636
636
|
modifySubaccountEmail(params) {
|
|
637
|
-
return this.postPrivate(
|
|
637
|
+
return this.postPrivate('/api/v2/broker/account/modify-subaccount-email', params);
|
|
638
638
|
}
|
|
639
639
|
getBrokerInfo() {
|
|
640
|
-
return this.getPrivate(
|
|
640
|
+
return this.getPrivate('/api/v2/broker/account/info');
|
|
641
641
|
}
|
|
642
642
|
createSubaccount(params) {
|
|
643
|
-
return this.postPrivate(
|
|
643
|
+
return this.postPrivate('/api/v2/broker/account/create-subaccount', params);
|
|
644
644
|
}
|
|
645
645
|
getSubaccounts(params) {
|
|
646
|
-
return this.getPrivate(
|
|
646
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-list', params);
|
|
647
647
|
}
|
|
648
648
|
modifySubaccount(params) {
|
|
649
|
-
return this.postPrivate(
|
|
649
|
+
return this.postPrivate('/api/v2/broker/account/modify-subaccount', params);
|
|
650
650
|
}
|
|
651
651
|
getSubaccountEmail(params) {
|
|
652
|
-
return this.getPrivate(
|
|
652
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-email', params);
|
|
653
653
|
}
|
|
654
654
|
getSubaccountSpotAssets(params) {
|
|
655
|
-
return this.getPrivate(
|
|
655
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-spot-assets', params);
|
|
656
656
|
}
|
|
657
657
|
getSubaccountFuturesAssets(params) {
|
|
658
|
-
return this.getPrivate(
|
|
658
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-future-assets', params);
|
|
659
659
|
}
|
|
660
660
|
createSubaccountDepositAddress(params) {
|
|
661
|
-
return this.postPrivate(
|
|
661
|
+
return this.postPrivate('/api/v2/broker/account/subaccount-address', params);
|
|
662
662
|
}
|
|
663
663
|
subaccountWithdrawal(params) {
|
|
664
|
-
return this.postPrivate(
|
|
664
|
+
return this.postPrivate('/api/v2/broker/account/subaccount-withdrawal', params);
|
|
665
665
|
}
|
|
666
666
|
subaccountSetAutoTransfer(params) {
|
|
667
|
-
return this.postPrivate(
|
|
667
|
+
return this.postPrivate('/api/v2/broker/account/set-subaccount-autotransfer', params);
|
|
668
668
|
}
|
|
669
669
|
subaccountDepositRecords(params) {
|
|
670
|
-
return this.postPrivate(
|
|
670
|
+
return this.postPrivate('/api/v2/broker/subaccount-deposit', params);
|
|
671
671
|
}
|
|
672
672
|
subaccountWithdrawalRecords(params) {
|
|
673
|
-
return this.postPrivate(
|
|
673
|
+
return this.postPrivate('/api/v2/broker/subaccount-withdrawal', params);
|
|
674
674
|
}
|
|
675
675
|
/**
|
|
676
676
|
*
|
|
@@ -678,13 +678,13 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
678
678
|
*
|
|
679
679
|
*/
|
|
680
680
|
createSubaccountApiKey(params) {
|
|
681
|
-
return this.postPrivate(
|
|
681
|
+
return this.postPrivate('/api/v2/broker/manage/create-subaccount-apikey', params);
|
|
682
682
|
}
|
|
683
683
|
getSubaccountApiKey(params) {
|
|
684
|
-
return this.getPrivate(
|
|
684
|
+
return this.getPrivate('/api/v2/broker/manage/subaccount-apikey-list', params);
|
|
685
685
|
}
|
|
686
686
|
modifySubaccountApiKey(params) {
|
|
687
|
-
return this.postPrivate(
|
|
687
|
+
return this.postPrivate('/api/v2/broker/manage/modify-subaccount-apikey', params);
|
|
688
688
|
}
|
|
689
689
|
/**
|
|
690
690
|
*
|
|
@@ -699,7 +699,7 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
699
699
|
*
|
|
700
700
|
*/
|
|
701
701
|
getMarginCurrencies() {
|
|
702
|
-
return this.get(
|
|
702
|
+
return this.get('/api/v2/margin/currencies');
|
|
703
703
|
}
|
|
704
704
|
/**
|
|
705
705
|
*
|
|
@@ -823,46 +823,46 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
823
823
|
*
|
|
824
824
|
*/
|
|
825
825
|
getFuturesTraderCurrentOrder(params) {
|
|
826
|
-
return this.getPrivate(
|
|
826
|
+
return this.getPrivate('/api/v2/copy/mix-trader/order-current-track', params);
|
|
827
827
|
}
|
|
828
828
|
getFuturesTraderHistoryOrders(params) {
|
|
829
|
-
return this.getPrivate(
|
|
829
|
+
return this.getPrivate('/api/v2/copy/mix-trader/order-history-track', params);
|
|
830
830
|
}
|
|
831
831
|
modifyFuturesTraderOrderTPSL(params) {
|
|
832
|
-
return this.postPrivate(
|
|
832
|
+
return this.postPrivate('/api/v2/copy/mix-trader/order-modify-tpsl', params);
|
|
833
833
|
}
|
|
834
834
|
getFuturesTraderOrder() {
|
|
835
|
-
return this.getPrivate(
|
|
835
|
+
return this.getPrivate('/api/v2/copy/mix-trader/order-total-detail');
|
|
836
836
|
}
|
|
837
837
|
getFuturesTraderProfitHistory() {
|
|
838
|
-
return this.getPrivate(
|
|
838
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profit-history-summarys');
|
|
839
839
|
}
|
|
840
840
|
getFuturesTraderProfitShareHistory(params) {
|
|
841
|
-
return this.getPrivate(
|
|
841
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profit-history-details', params);
|
|
842
842
|
}
|
|
843
843
|
closeFuturesTraderOrder(params) {
|
|
844
|
-
return this.postPrivate(
|
|
844
|
+
return this.postPrivate('/api/v2/copy/mix-trader/order-close-positions', params);
|
|
845
845
|
}
|
|
846
846
|
getFuturesTraderProfitShare(params) {
|
|
847
|
-
return this.getPrivate(
|
|
847
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profit-details', params);
|
|
848
848
|
}
|
|
849
849
|
getFuturesTraderProfitShareGroup(params) {
|
|
850
|
-
return this.getPrivate(
|
|
850
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profits-group-coin-date', params);
|
|
851
851
|
}
|
|
852
852
|
getFuturesTraderSymbolSettings(params) {
|
|
853
|
-
return this.getPrivate(
|
|
853
|
+
return this.getPrivate('/api/v2/copy/mix-trader/config-query-symbols', params);
|
|
854
854
|
}
|
|
855
855
|
updateFuturesTraderSymbolSettings(params) {
|
|
856
|
-
return this.postPrivate(
|
|
856
|
+
return this.postPrivate('/api/v2/copy/mix-trader/config-setting-symbols', params);
|
|
857
857
|
}
|
|
858
858
|
updateFuturesTraderGlobalSettings(params) {
|
|
859
|
-
return this.postPrivate(
|
|
859
|
+
return this.postPrivate('/api/v2/copy/mix-trader/config-settings-base', params);
|
|
860
860
|
}
|
|
861
861
|
getFuturesTraderFollowers(params) {
|
|
862
|
-
return this.getPrivate(
|
|
862
|
+
return this.getPrivate('/api/v2/copy/mix-trader/config-query-followers', params);
|
|
863
863
|
}
|
|
864
864
|
removeFuturesTraderFollower(params) {
|
|
865
|
-
return this.postPrivate(
|
|
865
|
+
return this.postPrivate('/api/v2/copy/mix-trader/config-remove-follower', params);
|
|
866
866
|
}
|
|
867
867
|
/**
|
|
868
868
|
*
|
|
@@ -872,31 +872,31 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
872
872
|
*
|
|
873
873
|
*/
|
|
874
874
|
getFuturesFollowerCurrentOrders(params) {
|
|
875
|
-
return this.getPrivate(
|
|
875
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-current-orders', params);
|
|
876
876
|
}
|
|
877
877
|
getFuturesFollowerHistoryOrders(params) {
|
|
878
|
-
return this.getPrivate(
|
|
878
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-history-orders', params);
|
|
879
879
|
}
|
|
880
880
|
updateFuturesFollowerTPSL(params) {
|
|
881
|
-
return this.postPrivate(
|
|
881
|
+
return this.postPrivate('/api/v2/copy/mix-follower/setting-tpsl', params);
|
|
882
882
|
}
|
|
883
883
|
updateFuturesFollowerSettings(params) {
|
|
884
|
-
return this.postPrivate(
|
|
884
|
+
return this.postPrivate('/api/v2/copy/mix-follower/settings', params);
|
|
885
885
|
}
|
|
886
886
|
getFuturesFollowerSettings(params) {
|
|
887
|
-
return this.getPrivate(
|
|
887
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-settings', params);
|
|
888
888
|
}
|
|
889
889
|
closeFuturesFollowerPositions(params) {
|
|
890
|
-
return this.postPrivate(
|
|
890
|
+
return this.postPrivate('/api/v2/copy/mix-follower/close-positions', params);
|
|
891
891
|
}
|
|
892
892
|
getFuturesFollowerTraders(params) {
|
|
893
|
-
return this.getPrivate(
|
|
893
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-traders', params);
|
|
894
894
|
}
|
|
895
895
|
getFuturesFollowerFollowLimit(params) {
|
|
896
|
-
return this.getPrivate(
|
|
896
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-quantity-limit', params);
|
|
897
897
|
}
|
|
898
898
|
unfollowFuturesTrader(params) {
|
|
899
|
-
return this.postPrivate(
|
|
899
|
+
return this.postPrivate('/api/v2/copy/mix-follower/cancel-trader', params);
|
|
900
900
|
}
|
|
901
901
|
/**
|
|
902
902
|
*
|
|
@@ -906,13 +906,13 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
906
906
|
*
|
|
907
907
|
*/
|
|
908
908
|
getBrokerTraders(params) {
|
|
909
|
-
return this.getPrivate(
|
|
909
|
+
return this.getPrivate('/api/v2/copy/mix-broker/query-traders', params);
|
|
910
910
|
}
|
|
911
911
|
getBrokerTradersHistoricalOrders(params) {
|
|
912
|
-
return this.getPrivate(
|
|
912
|
+
return this.getPrivate('/api/v2/copy/mix-broker/query-history-traces', params);
|
|
913
913
|
}
|
|
914
914
|
getBrokerTradersPendingOrders(params) {
|
|
915
|
-
return this.getPrivate(
|
|
915
|
+
return this.getPrivate('/api/v2/copy/mix-broker/query-current-traces', params);
|
|
916
916
|
}
|
|
917
917
|
/**
|
|
918
918
|
*
|
|
@@ -922,40 +922,40 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
922
922
|
*
|
|
923
923
|
*/
|
|
924
924
|
getSpotTraderProfit() {
|
|
925
|
-
return this.getPrivate(
|
|
925
|
+
return this.getPrivate('/api/v2/copy/spot-trader/profit-summarys');
|
|
926
926
|
}
|
|
927
927
|
getSpotTraderHistoryProfit(params) {
|
|
928
|
-
return this.getPrivate(
|
|
928
|
+
return this.getPrivate('/api/v2/copy/spot-trader/profit-history-details', params);
|
|
929
929
|
}
|
|
930
930
|
getSpotTraderUnrealizedProfit(params) {
|
|
931
|
-
return this.getPrivate(
|
|
931
|
+
return this.getPrivate('/api/v2/copy/spot-trader/profit-details', params);
|
|
932
932
|
}
|
|
933
933
|
getSpotTraderOrder() {
|
|
934
|
-
return this.getPrivate(
|
|
934
|
+
return this.getPrivate('/api/v2/copy/spot-trader/order-total-detail');
|
|
935
935
|
}
|
|
936
936
|
modifySpotTraderOrderTPSL(params) {
|
|
937
|
-
return this.postPrivate(
|
|
937
|
+
return this.postPrivate('/api/v2/copy/spot-trader/order-modify-tpsl', params);
|
|
938
938
|
}
|
|
939
939
|
getSpotTraderHistoryOrders(params) {
|
|
940
|
-
return this.getPrivate(
|
|
940
|
+
return this.getPrivate('/api/v2/copy/spot-trader/order-history-track', params);
|
|
941
941
|
}
|
|
942
942
|
getSpotTraderCurrentOrders(params) {
|
|
943
|
-
return this.getPrivate(
|
|
943
|
+
return this.getPrivate('/api/v2/copy/spot-trader/order-current-track', params);
|
|
944
944
|
}
|
|
945
945
|
sellSpotTrader(params) {
|
|
946
|
-
return this.postPrivate(
|
|
946
|
+
return this.postPrivate('/api/v2/copy/spot-trader/order-close-tracking', params);
|
|
947
947
|
}
|
|
948
948
|
getSpotTraderSymbolSettings(params) {
|
|
949
|
-
return this.postPrivate(
|
|
949
|
+
return this.postPrivate('/api/v2/copy/spot-trader/config-setting-symbols', params);
|
|
950
950
|
}
|
|
951
951
|
removeSpotTraderFollowers(params) {
|
|
952
|
-
return this.postPrivate(
|
|
952
|
+
return this.postPrivate('/api/v2/copy/spot-trader/config-remove-follower', params);
|
|
953
953
|
}
|
|
954
954
|
getSpotTraderConfiguration() {
|
|
955
|
-
return this.getPrivate(
|
|
955
|
+
return this.getPrivate('/api/v2/copy/spot-trader/config-query-settings');
|
|
956
956
|
}
|
|
957
957
|
getSpotTraderFollowers(params) {
|
|
958
|
-
return this.getPrivate(
|
|
958
|
+
return this.getPrivate('/api/v2/copy/spot-trader/config-query-followers', params);
|
|
959
959
|
}
|
|
960
960
|
/**
|
|
961
961
|
*
|
|
@@ -965,34 +965,34 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
965
965
|
*
|
|
966
966
|
*/
|
|
967
967
|
cancelSpotFollowerOrder(params) {
|
|
968
|
-
return this.postPrivate(
|
|
968
|
+
return this.postPrivate('/api/v2/copy/spot-follower/stop-order', params);
|
|
969
969
|
}
|
|
970
970
|
updateSpotFollowerSettings(params) {
|
|
971
|
-
return this.postPrivate(
|
|
971
|
+
return this.postPrivate('/api/v2/copy/spot-follower/settings', params);
|
|
972
972
|
}
|
|
973
973
|
updateSpotFollowerTPSL(params) {
|
|
974
|
-
return this.postPrivate(
|
|
974
|
+
return this.postPrivate('/api/v2/copy/spot-follower/setting-tpsl', params);
|
|
975
975
|
}
|
|
976
976
|
getSpotFollowerTraders(params) {
|
|
977
|
-
return this.getPrivate(
|
|
977
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-traders', params);
|
|
978
978
|
}
|
|
979
979
|
getSpotFollowerCurrentTraderSymbols(params) {
|
|
980
|
-
return this.getPrivate(
|
|
980
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-trader-symbols', params);
|
|
981
981
|
}
|
|
982
982
|
getSpotFollowerSettings(params) {
|
|
983
|
-
return this.getPrivate(
|
|
983
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-settings', params);
|
|
984
984
|
}
|
|
985
985
|
getSpotFollowerHistoryOrders(params) {
|
|
986
|
-
return this.getPrivate(
|
|
986
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-history-orders', params);
|
|
987
987
|
}
|
|
988
988
|
getSpotFollowerOpenOrders(params) {
|
|
989
|
-
return this.getPrivate(
|
|
989
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-current-orders', params);
|
|
990
990
|
}
|
|
991
991
|
sellSpotFollower(params) {
|
|
992
|
-
return this.postPrivate(
|
|
992
|
+
return this.postPrivate('/api/v2/copy/spot-follower/order-close-tracking', params);
|
|
993
993
|
}
|
|
994
994
|
unfollowSpotTrader(params) {
|
|
995
|
-
return this.postPrivate(
|
|
995
|
+
return this.postPrivate('/api/v2/copy/spot-follower/cancel-trader', params);
|
|
996
996
|
}
|
|
997
997
|
/**
|
|
998
998
|
*
|
|
@@ -1002,31 +1002,31 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
1002
1002
|
*
|
|
1003
1003
|
*/
|
|
1004
1004
|
getEarnSavingsProducts(params) {
|
|
1005
|
-
return this.getPrivate(
|
|
1005
|
+
return this.getPrivate('/api/v2/earn/savings/product', params);
|
|
1006
1006
|
}
|
|
1007
1007
|
getEarnSavingsAccount() {
|
|
1008
|
-
return this.getPrivate(
|
|
1008
|
+
return this.getPrivate('/api/v2/earn/savings/account');
|
|
1009
1009
|
}
|
|
1010
1010
|
getEarnSavingsAssets(params) {
|
|
1011
|
-
return this.getPrivate(
|
|
1011
|
+
return this.getPrivate('/api/v2/earn/savings/assets', params);
|
|
1012
1012
|
}
|
|
1013
1013
|
getEarnSavingsRecords(params) {
|
|
1014
|
-
return this.getPrivate(
|
|
1014
|
+
return this.getPrivate('/api/v2/earn/savings/records', params);
|
|
1015
1015
|
}
|
|
1016
1016
|
getEarnSavingsSubscription(params) {
|
|
1017
|
-
return this.getPrivate(
|
|
1017
|
+
return this.getPrivate('/api/v2/earn/savings/subscribe-info', params);
|
|
1018
1018
|
}
|
|
1019
1019
|
earnSubscribeSavings(params) {
|
|
1020
|
-
return this.postPrivate(
|
|
1020
|
+
return this.postPrivate('/api/v2/earn/savings/subscribe', params);
|
|
1021
1021
|
}
|
|
1022
1022
|
getEarnSavingsSubscriptionResult(params) {
|
|
1023
|
-
return this.getPrivate(
|
|
1023
|
+
return this.getPrivate('/api/v2/earn/savings/subscribe-result', params);
|
|
1024
1024
|
}
|
|
1025
1025
|
earnRedeemSavings(params) {
|
|
1026
|
-
return this.postPrivate(
|
|
1026
|
+
return this.postPrivate('/api/v2/earn/savings/redeem', params);
|
|
1027
1027
|
}
|
|
1028
1028
|
getEarnSavingsRedemptionResult(params) {
|
|
1029
|
-
return this.getPrivate(
|
|
1029
|
+
return this.getPrivate('/api/v2/earn/savings/redeem-result', params);
|
|
1030
1030
|
}
|
|
1031
1031
|
/**
|
|
1032
1032
|
*
|
|
@@ -1036,7 +1036,7 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
1036
1036
|
*
|
|
1037
1037
|
*/
|
|
1038
1038
|
getEarnAccount(params) {
|
|
1039
|
-
return this.getPrivate(
|
|
1039
|
+
return this.getPrivate('/api/v2/earn/account/assets', params);
|
|
1040
1040
|
}
|
|
1041
1041
|
/**
|
|
1042
1042
|
*
|
|
@@ -1046,25 +1046,25 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
1046
1046
|
*
|
|
1047
1047
|
*/
|
|
1048
1048
|
getSharkfinProducts(params) {
|
|
1049
|
-
return this.getPrivate(
|
|
1049
|
+
return this.getPrivate('/api/v2/earn/sharkfin/product', params);
|
|
1050
1050
|
}
|
|
1051
1051
|
getSharkfinAccount() {
|
|
1052
|
-
return this.getPrivate(
|
|
1052
|
+
return this.getPrivate('/api/v2/earn/sharkfin/account');
|
|
1053
1053
|
}
|
|
1054
1054
|
getSharkfinAssets(params) {
|
|
1055
|
-
return this.getPrivate(
|
|
1055
|
+
return this.getPrivate('/api/v2/earn/sharkfin/assets', params);
|
|
1056
1056
|
}
|
|
1057
1057
|
getSharkfinRecords(params) {
|
|
1058
|
-
return this.getPrivate(
|
|
1058
|
+
return this.getPrivate('/api/v2/earn/sharkfin/records', params);
|
|
1059
1059
|
}
|
|
1060
1060
|
getSharkfinSubscription(params) {
|
|
1061
|
-
return this.getPrivate(
|
|
1061
|
+
return this.getPrivate('/api/v2/earn/sharkfin/subscribe-info', params);
|
|
1062
1062
|
}
|
|
1063
1063
|
subscribeSharkfin(params) {
|
|
1064
|
-
return this.postPrivate(
|
|
1064
|
+
return this.postPrivate('/api/v2/earn/sharkfin/subscribe', params);
|
|
1065
1065
|
}
|
|
1066
1066
|
getSharkfinSubscriptionResult(params) {
|
|
1067
|
-
return this.getPrivate(
|
|
1067
|
+
return this.getPrivate('/api/v2/earn/sharkfin/subscribe-result', params);
|
|
1068
1068
|
}
|
|
1069
1069
|
/**
|
|
1070
1070
|
*
|
|
@@ -1074,37 +1074,37 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
1074
1074
|
*
|
|
1075
1075
|
*/
|
|
1076
1076
|
getLoanCurrencies(params) {
|
|
1077
|
-
return this.get(
|
|
1077
|
+
return this.get('/api/v2/earn/loan/public/coinInfos', params);
|
|
1078
1078
|
}
|
|
1079
1079
|
getLoanEstInterestAndBorrowable(params) {
|
|
1080
|
-
return this.get(
|
|
1080
|
+
return this.get('/api/v2/earn/loan/public/hour-interest', params);
|
|
1081
1081
|
}
|
|
1082
1082
|
borrowLoan(params) {
|
|
1083
|
-
return this.postPrivate(
|
|
1083
|
+
return this.postPrivate('/api/v2/earn/loan/borrow', params);
|
|
1084
1084
|
}
|
|
1085
1085
|
getOngoingLoanOrders(params) {
|
|
1086
|
-
return this.getPrivate(
|
|
1086
|
+
return this.getPrivate('/api/v2/earn/loan/ongoing-orders', params);
|
|
1087
1087
|
}
|
|
1088
1088
|
repayLoan(params) {
|
|
1089
|
-
return this.postPrivate(
|
|
1089
|
+
return this.postPrivate('/api/v2/earn/loan/repay', params);
|
|
1090
1090
|
}
|
|
1091
1091
|
getRepayHistory(params) {
|
|
1092
|
-
return this.getPrivate(
|
|
1092
|
+
return this.getPrivate('/api/v2/earn/loan/repay-history', params);
|
|
1093
1093
|
}
|
|
1094
1094
|
updateLoanPledgeRate(params) {
|
|
1095
|
-
return this.postPrivate(
|
|
1095
|
+
return this.postPrivate('/api/v2/earn/loan/revise-pledge', params);
|
|
1096
1096
|
}
|
|
1097
1097
|
getLoanPledgeRateHistory(params) {
|
|
1098
|
-
return this.getPrivate(
|
|
1098
|
+
return this.getPrivate('/api/v2/earn/loan/revise-history', params);
|
|
1099
1099
|
}
|
|
1100
1100
|
getLoanHistory(params) {
|
|
1101
|
-
return this.getPrivate(
|
|
1101
|
+
return this.getPrivate('/api/v2/earn/loan/borrow-history', params);
|
|
1102
1102
|
}
|
|
1103
1103
|
getLoanDebts() {
|
|
1104
|
-
return this.getPrivate(
|
|
1104
|
+
return this.getPrivate('/api/v2/earn/loan/debts');
|
|
1105
1105
|
}
|
|
1106
1106
|
getLoanLiquidationRecords(params) {
|
|
1107
|
-
return this.getPrivate(
|
|
1107
|
+
return this.getPrivate('/api/v2/earn/loan/reduces', params);
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
exports.RestClientV2 = RestClientV2;
|