bitget-api 2.0.13 → 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 +537 -233
- package/lib/rest-client-v2.js +258 -234
- 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 +6 -1
- package/lib/types/request/index.js +6 -1
- package/lib/types/request/index.js.map +1 -1
- package/lib/types/request/shared.d.ts +2 -0
- package/lib/types/request/v2/broker.d.ts +69 -0
- package/lib/types/request/v2/broker.js +8 -0
- package/lib/types/request/v2/broker.js.map +1 -0
- package/lib/types/request/v2/common.d.ts +163 -0
- package/lib/types/request/v2/common.js +3 -0
- package/lib/types/request/v2/common.js.map +1 -0
- package/lib/types/request/v2/copytrading.d.ts +196 -0
- package/lib/types/request/v2/copytrading.js +10 -0
- package/lib/types/request/v2/copytrading.js.map +1 -0
- package/lib/types/request/v2/earn.d.ts +121 -0
- package/lib/types/request/v2/earn.js +10 -0
- package/lib/types/request/v2/earn.js.map +1 -0
- package/lib/types/request/v2/futures.d.ts +342 -1
- package/lib/types/request/v2/margin.d.ts +121 -0
- package/lib/types/request/v2/margin.js +8 -0
- package/lib/types/request/v2/margin.js.map +1 -0
- package/lib/types/request/v2/spot.d.ts +256 -0
- 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
|
`);
|
|
@@ -95,8 +95,8 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
95
95
|
* * Common | Notice
|
|
96
96
|
*
|
|
97
97
|
*/
|
|
98
|
-
getAnnouncements() {
|
|
99
|
-
return this.get(
|
|
98
|
+
getAnnouncements(params) {
|
|
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
|
-
getSpotFundFlow() {
|
|
173
|
-
return this.get(
|
|
172
|
+
getSpotFundFlow(params) {
|
|
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,31 +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
|
+
}
|
|
306
|
+
spotCancelandSubmitOrder(params) {
|
|
307
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-replace-order', params);
|
|
308
|
+
}
|
|
309
|
+
spotBatchCancelandSubmitOrder(params) {
|
|
310
|
+
return this.postPrivate('/api/v2/spot/trade/batch-cancel-replace-order', params);
|
|
305
311
|
}
|
|
306
312
|
spotCancelOrder(params) {
|
|
307
|
-
return this.postPrivate(
|
|
313
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-order', params);
|
|
308
314
|
}
|
|
309
315
|
spotBatchSubmitOrders(params) {
|
|
310
|
-
return this.postPrivate(
|
|
316
|
+
return this.postPrivate('/api/v2/spot/trade/batch-orders', params);
|
|
311
317
|
}
|
|
312
318
|
spotBatchCancelOrders(params) {
|
|
313
|
-
return this.postPrivate(
|
|
319
|
+
return this.postPrivate('/api/v2/spot/trade/batch-cancel-order', params);
|
|
314
320
|
}
|
|
315
321
|
spotCancelSymbolOrder(params) {
|
|
316
|
-
return this.postPrivate(
|
|
322
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-symbol-order', params);
|
|
317
323
|
}
|
|
318
324
|
getSpotOrder(params) {
|
|
319
|
-
return this.getPrivate(
|
|
325
|
+
return this.getPrivate('/api/v2/spot/trade/orderInfo', params);
|
|
320
326
|
}
|
|
321
327
|
getSpotOpenOrders(params) {
|
|
322
|
-
return this.getPrivate(
|
|
328
|
+
return this.getPrivate('/api/v2/spot/trade/unfilled-orders', params);
|
|
323
329
|
}
|
|
324
330
|
getSpotHistoricOrders(params) {
|
|
325
|
-
return this.getPrivate(
|
|
331
|
+
return this.getPrivate('/api/v2/spot/trade/history-orders', params);
|
|
326
332
|
}
|
|
327
333
|
getSpotFills(params) {
|
|
328
|
-
return this.getPrivate(
|
|
334
|
+
return this.getPrivate('/api/v2/spot/trade/fills', params);
|
|
329
335
|
}
|
|
330
336
|
/**
|
|
331
337
|
*
|
|
@@ -333,22 +339,22 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
333
339
|
*
|
|
334
340
|
*/
|
|
335
341
|
spotSubmitPlanOrder(params) {
|
|
336
|
-
return this.postPrivate(
|
|
342
|
+
return this.postPrivate('/api/v2/spot/trade/place-plan-order', params);
|
|
337
343
|
}
|
|
338
344
|
spotModifyPlanOrder(params) {
|
|
339
|
-
return this.postPrivate(
|
|
345
|
+
return this.postPrivate('/api/v2/spot/trade/modify-plan-order', params);
|
|
340
346
|
}
|
|
341
347
|
spotCancelPlanOrder(params) {
|
|
342
|
-
return this.postPrivate(
|
|
348
|
+
return this.postPrivate('/api/v2/spot/trade/cancel-plan-order', params);
|
|
343
349
|
}
|
|
344
350
|
getSpotCurrentPlanOrders(params) {
|
|
345
|
-
return this.getPrivate(
|
|
351
|
+
return this.getPrivate('/api/v2/spot/trade/current-plan-order', params);
|
|
346
352
|
}
|
|
347
353
|
getSpotPlanSubOrder(params) {
|
|
348
|
-
return this.getPrivate(
|
|
354
|
+
return this.getPrivate('/api/v2/spot/trade/plan-sub-order', params);
|
|
349
355
|
}
|
|
350
356
|
getSpotHistoricPlanOrders(params) {
|
|
351
|
-
return this.getPrivate(
|
|
357
|
+
return this.getPrivate('/api/v2/spot/trade/history-plan-order', params);
|
|
352
358
|
}
|
|
353
359
|
spotCancelPlanOrders(params) {
|
|
354
360
|
return this.postPrivate('/api/v2/spot/trade/batch-cancel-plan-order', params);
|
|
@@ -359,61 +365,61 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
359
365
|
*
|
|
360
366
|
*/
|
|
361
367
|
getSpotAccount() {
|
|
362
|
-
return this.getPrivate(
|
|
368
|
+
return this.getPrivate('/api/v2/spot/account/info');
|
|
363
369
|
}
|
|
364
370
|
getSpotAccountAssets(params) {
|
|
365
|
-
return this.getPrivate(
|
|
371
|
+
return this.getPrivate('/api/v2/spot/account/assets', params);
|
|
366
372
|
}
|
|
367
373
|
getSpotSubAccountAssets() {
|
|
368
|
-
return this.getPrivate(
|
|
374
|
+
return this.getPrivate('/api/v2/spot/account/subaccount-assets');
|
|
369
375
|
}
|
|
370
376
|
spotModifyDepositAccount(params) {
|
|
371
|
-
return this.postPrivate(
|
|
377
|
+
return this.postPrivate('/api/v2/spot/wallet/modify-deposit-account', params);
|
|
372
378
|
}
|
|
373
379
|
getSpotAccountBills(params) {
|
|
374
|
-
return this.getPrivate(
|
|
380
|
+
return this.getPrivate('/api/v2/spot/account/bills', params);
|
|
375
381
|
}
|
|
376
382
|
spotTransfer(params) {
|
|
377
|
-
return this.postPrivate(
|
|
383
|
+
return this.postPrivate('/api/v2/spot/wallet/transfer', params);
|
|
378
384
|
}
|
|
379
385
|
getSpotTransferableCoins(params) {
|
|
380
|
-
return this.getPrivate(
|
|
386
|
+
return this.getPrivate('/api/v2/spot/wallet/transfer-coin-info', params);
|
|
381
387
|
}
|
|
382
388
|
spotSubTransfer(params) {
|
|
383
|
-
return this.postPrivate(
|
|
389
|
+
return this.postPrivate('/api/v2/spot/wallet/subaccount-transfer', params);
|
|
390
|
+
}
|
|
391
|
+
spotWithdraw(params) {
|
|
392
|
+
return this.postPrivate('/api/v2/spot/wallet/withdrawal', params);
|
|
393
|
+
}
|
|
394
|
+
getSpotMainSubTransferRecord(params) {
|
|
395
|
+
return this.getPrivate('/api/v2/spot/account/sub-main-trans-record', params);
|
|
384
396
|
}
|
|
385
397
|
getSpotTransferHistory(params) {
|
|
386
|
-
return this.getPrivate(
|
|
398
|
+
return this.getPrivate('/api/v2/spot/account/transferRecords', params);
|
|
387
399
|
}
|
|
388
400
|
spotSwitchBGBDeduct(params) {
|
|
389
|
-
return this.postPrivate(
|
|
390
|
-
}
|
|
391
|
-
spotWithdraw(params) {
|
|
392
|
-
return this.postPrivate(`/api/v2/spot/wallet/withdrawal`, params);
|
|
401
|
+
return this.postPrivate('/api/v2/spot/account/switch-deduct', params);
|
|
393
402
|
}
|
|
394
403
|
getSpotDepositAddress(params) {
|
|
395
|
-
return this.getPrivate(
|
|
404
|
+
return this.getPrivate('/api/v2/spot/wallet/deposit-address', params);
|
|
396
405
|
}
|
|
397
406
|
getSpotSubDepositAddress(params) {
|
|
398
|
-
return this.getPrivate(
|
|
399
|
-
}
|
|
400
|
-
getSpotDepositHistory(params) {
|
|
401
|
-
return this.getPrivate(`/api/v2/spot/wallet/deposit-records`, params);
|
|
407
|
+
return this.getPrivate('/api/v2/spot/wallet/subaccount-deposit-address', params);
|
|
402
408
|
}
|
|
403
409
|
getSpotBGBDeductInfo() {
|
|
404
|
-
return this.getPrivate(
|
|
410
|
+
return this.getPrivate('/api/v2/spot/account/deduct-info');
|
|
405
411
|
}
|
|
406
412
|
spotCancelWithdrawal(params) {
|
|
407
|
-
return this.postPrivate(
|
|
413
|
+
return this.postPrivate('/api/v2/spot/wallet/cancel-withdrawal', params);
|
|
408
414
|
}
|
|
409
|
-
|
|
410
|
-
return this.getPrivate(
|
|
415
|
+
getSubAccountDepositRecords(params) {
|
|
416
|
+
return this.getPrivate('/api/v2/spot/wallet/subaccount-deposit-records', params);
|
|
411
417
|
}
|
|
412
|
-
|
|
413
|
-
return this.getPrivate(
|
|
418
|
+
getSpotDepositHistory(params) {
|
|
419
|
+
return this.getPrivate('/api/v2/spot/wallet/deposit-records', params);
|
|
414
420
|
}
|
|
415
|
-
|
|
416
|
-
return this.getPrivate(
|
|
421
|
+
getSpotWithdrawalHistory(params) {
|
|
422
|
+
return this.getPrivate('/api/v2/spot/wallet/withdrawal-records', params);
|
|
417
423
|
}
|
|
418
424
|
/**
|
|
419
425
|
*
|
|
@@ -428,52 +434,61 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
428
434
|
*
|
|
429
435
|
*/
|
|
430
436
|
getFuturesVIPFeeRate() {
|
|
431
|
-
return this.get(
|
|
437
|
+
return this.get('/api/v2/mix/market/vip-fee-rate');
|
|
438
|
+
}
|
|
439
|
+
getFuturesInterestRateHistory(params) {
|
|
440
|
+
return this.get('/api/v2/mix/market/union-interest-rate-history', params);
|
|
432
441
|
}
|
|
433
442
|
getFuturesTicker(params) {
|
|
434
|
-
return this.get(
|
|
443
|
+
return this.get('/api/v2/mix/market/ticker', params);
|
|
444
|
+
}
|
|
445
|
+
getFuturesInterestExchangeRate() {
|
|
446
|
+
return this.get('/api/v2/mix/market/exchange-rate');
|
|
447
|
+
}
|
|
448
|
+
getFuturesDiscountRate() {
|
|
449
|
+
return this.get('/api/v2/mix/market/discount-rate');
|
|
435
450
|
}
|
|
436
451
|
getFuturesAllTickers(params) {
|
|
437
|
-
return this.get(
|
|
452
|
+
return this.get('/api/v2/mix/market/tickers', params);
|
|
438
453
|
}
|
|
439
454
|
getFuturesMergeDepth(params) {
|
|
440
|
-
return this.get(
|
|
455
|
+
return this.get('/api/v2/mix/market/merge-depth', params);
|
|
441
456
|
}
|
|
442
457
|
getFuturesCandles(params) {
|
|
443
|
-
return this.get(
|
|
458
|
+
return this.get('/api/v2/mix/market/candles', params);
|
|
444
459
|
}
|
|
445
460
|
getFuturesHistoricCandles(params) {
|
|
446
|
-
return this.get(
|
|
461
|
+
return this.get('/api/v2/mix/market/history-candles', params);
|
|
447
462
|
}
|
|
448
463
|
getFuturesHistoricIndexPriceCandles(params) {
|
|
449
|
-
return this.get(
|
|
464
|
+
return this.get('/api/v2/mix/market/history-index-candles', params);
|
|
450
465
|
}
|
|
451
466
|
getFuturesHistoricMarkPriceCandles(params) {
|
|
452
|
-
return this.get(
|
|
467
|
+
return this.get('/api/v2/mix/market/history-mark-candles', params);
|
|
453
468
|
}
|
|
454
469
|
getFuturesRecentTrades(params) {
|
|
455
|
-
return this.get(
|
|
470
|
+
return this.get('/api/v2/mix/market/fills', params);
|
|
456
471
|
}
|
|
457
472
|
getFuturesHistoricTrades(params) {
|
|
458
|
-
return this.get(
|
|
473
|
+
return this.get('/api/v2/mix/market/fills-history', params);
|
|
459
474
|
}
|
|
460
475
|
getFuturesOpenInterest(params) {
|
|
461
|
-
return this.get(
|
|
476
|
+
return this.get('/api/v2/mix/market/open-interest', params);
|
|
462
477
|
}
|
|
463
478
|
getFuturesNextFundingTime(params) {
|
|
464
|
-
return this.get(
|
|
479
|
+
return this.get('/api/v2/mix/market/funding-time', params);
|
|
465
480
|
}
|
|
466
481
|
getFuturesSymbolPrice(params) {
|
|
467
|
-
return this.get(
|
|
482
|
+
return this.get('/api/v2/mix/market/symbol-price', params);
|
|
468
483
|
}
|
|
469
484
|
getFuturesHistoricFundingRates(params) {
|
|
470
|
-
return this.get(
|
|
485
|
+
return this.get('/api/v2/mix/market/history-fund-rate', params);
|
|
471
486
|
}
|
|
472
487
|
getFuturesCurrentFundingRate(params) {
|
|
473
|
-
return this.get(
|
|
488
|
+
return this.get('/api/v2/mix/market/current-fund-rate', params);
|
|
474
489
|
}
|
|
475
490
|
getFuturesContractConfig(params) {
|
|
476
|
-
return this.get(
|
|
491
|
+
return this.get('/api/v2/mix/market/contracts', params);
|
|
477
492
|
}
|
|
478
493
|
/**
|
|
479
494
|
*
|
|
@@ -481,34 +496,40 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
481
496
|
*
|
|
482
497
|
*/
|
|
483
498
|
getFuturesAccountAsset(params) {
|
|
484
|
-
return this.getPrivate(
|
|
499
|
+
return this.getPrivate('/api/v2/mix/account/account', params);
|
|
485
500
|
}
|
|
486
501
|
getFuturesAccountAssets(params) {
|
|
487
|
-
return this.getPrivate(
|
|
502
|
+
return this.getPrivate('/api/v2/mix/account/accounts', params);
|
|
488
503
|
}
|
|
489
504
|
getFuturesSubAccountAssets(params) {
|
|
490
|
-
return this.getPrivate(
|
|
505
|
+
return this.getPrivate('/api/v2/mix/account/sub-account-assets', params);
|
|
506
|
+
}
|
|
507
|
+
getFuturesInterestHistory(params) {
|
|
508
|
+
return this.getPrivate('/api/v2/mix/account/interest-history', params);
|
|
491
509
|
}
|
|
492
510
|
getFuturesOpenCount(params) {
|
|
493
|
-
return this.getPrivate(
|
|
511
|
+
return this.getPrivate('/api/v2/mix/account/open-count', params);
|
|
494
512
|
}
|
|
495
513
|
setFuturesLeverage(params) {
|
|
496
|
-
return this.postPrivate(
|
|
514
|
+
return this.postPrivate('/api/v2/mix/account/set-leverage', params);
|
|
497
515
|
}
|
|
498
516
|
setFuturesPositionAutoMargin(params) {
|
|
499
|
-
return this.postPrivate(
|
|
517
|
+
return this.postPrivate('/api/v2/mix/account/set-auto-margin', params);
|
|
500
518
|
}
|
|
501
519
|
setFuturesPositionMargin(params) {
|
|
502
|
-
return this.postPrivate(
|
|
520
|
+
return this.postPrivate('/api/v2/mix/account/set-margin', params);
|
|
521
|
+
}
|
|
522
|
+
setFuturesAssetMode(params) {
|
|
523
|
+
return this.postPrivate('/api/v2/mix/account/set-asset-mode', params);
|
|
503
524
|
}
|
|
504
525
|
setFuturesMarginMode(params) {
|
|
505
|
-
return this.postPrivate(
|
|
526
|
+
return this.postPrivate('/api/v2/mix/account/set-margin-mode', params);
|
|
506
527
|
}
|
|
507
528
|
setFuturesPositionMode(params) {
|
|
508
|
-
return this.postPrivate(
|
|
529
|
+
return this.postPrivate('/api/v2/mix/account/set-position-mode', params);
|
|
509
530
|
}
|
|
510
531
|
getFuturesAccountBills(params) {
|
|
511
|
-
return this.getPrivate(
|
|
532
|
+
return this.getPrivate('/api/v2/mix/account/bill', params);
|
|
512
533
|
}
|
|
513
534
|
/**
|
|
514
535
|
*
|
|
@@ -516,16 +537,16 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
516
537
|
*
|
|
517
538
|
*/
|
|
518
539
|
getFuturesPositionTier(params) {
|
|
519
|
-
return this.get(
|
|
540
|
+
return this.get('/api/v2/mix/market/query-position-lever', params);
|
|
520
541
|
}
|
|
521
542
|
getFuturesPosition(params) {
|
|
522
|
-
return this.getPrivate(
|
|
543
|
+
return this.getPrivate('/api/v2/mix/position/single-position', params);
|
|
523
544
|
}
|
|
524
545
|
getFuturesPositions(params) {
|
|
525
|
-
return this.getPrivate(
|
|
546
|
+
return this.getPrivate('/api/v2/mix/position/all-position', params);
|
|
526
547
|
}
|
|
527
548
|
getFuturesHistoricPositions(params) {
|
|
528
|
-
return this.getPrivate(
|
|
549
|
+
return this.getPrivate('/api/v2/mix/position/history-position', params);
|
|
529
550
|
}
|
|
530
551
|
/**
|
|
531
552
|
*
|
|
@@ -533,43 +554,43 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
533
554
|
*
|
|
534
555
|
*/
|
|
535
556
|
futuresSubmitOrder(params) {
|
|
536
|
-
return this.postPrivate(
|
|
557
|
+
return this.postPrivate('/api/v2/mix/order/place-order', params);
|
|
537
558
|
}
|
|
538
559
|
futuresCancelOrder(params) {
|
|
539
|
-
return this.postPrivate(
|
|
560
|
+
return this.postPrivate('/api/v2/mix/order/cancel-order', params);
|
|
540
561
|
}
|
|
541
562
|
futuresSubmitReversal(params) {
|
|
542
|
-
return this.postPrivate(
|
|
563
|
+
return this.postPrivate('/api/v2/mix/order/click-backhand', params);
|
|
543
564
|
}
|
|
544
565
|
futuresBatchSubmitOrders(params) {
|
|
545
|
-
return this.postPrivate(
|
|
566
|
+
return this.postPrivate('/api/v2/mix/order/batch-place-order', params);
|
|
546
567
|
}
|
|
547
568
|
futuresModifyOrder(params) {
|
|
548
|
-
return this.postPrivate(
|
|
569
|
+
return this.postPrivate('/api/v2/mix/order/modify-order', params);
|
|
549
570
|
}
|
|
550
571
|
futuresBatchCancelOrders(params) {
|
|
551
|
-
return this.postPrivate(
|
|
572
|
+
return this.postPrivate('/api/v2/mix/order/batch-cancel-orders', params);
|
|
552
573
|
}
|
|
553
574
|
futuresFlashClosePositions(params) {
|
|
554
|
-
return this.postPrivate(
|
|
575
|
+
return this.postPrivate('/api/v2/mix/order/close-positions', params);
|
|
555
576
|
}
|
|
556
577
|
getFuturesOrder(params) {
|
|
557
|
-
return this.getPrivate(
|
|
578
|
+
return this.getPrivate('/api/v2/mix/order/detail', params);
|
|
558
579
|
}
|
|
559
580
|
getFuturesFills(params) {
|
|
560
|
-
return this.getPrivate(
|
|
581
|
+
return this.getPrivate('/api/v2/mix/order/fills', params);
|
|
561
582
|
}
|
|
562
583
|
getFuturesHistoricOrderFills(params) {
|
|
563
|
-
return this.getPrivate(
|
|
584
|
+
return this.getPrivate('/api/v2/mix/order/fill-history', params);
|
|
564
585
|
}
|
|
565
586
|
getFuturesOpenOrders(params) {
|
|
566
|
-
return this.getPrivate(
|
|
587
|
+
return this.getPrivate('/api/v2/mix/order/orders-pending', params);
|
|
567
588
|
}
|
|
568
589
|
getFuturesHistoricOrders(params) {
|
|
569
|
-
return this.getPrivate(
|
|
590
|
+
return this.getPrivate('/api/v2/mix/order/orders-history', params);
|
|
570
591
|
}
|
|
571
592
|
futuresCancelAllOrders(params) {
|
|
572
|
-
return this.postPrivate(
|
|
593
|
+
return this.postPrivate('/api/v2/mix/order/cancel-all-orders', params);
|
|
573
594
|
}
|
|
574
595
|
/**
|
|
575
596
|
*
|
|
@@ -577,28 +598,28 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
577
598
|
*
|
|
578
599
|
*/
|
|
579
600
|
futuresSubmitPlanSubOrder(params) {
|
|
580
|
-
return this.postPrivate(
|
|
601
|
+
return this.postPrivate('/api/v2/mix/order/plan-sub-order', params);
|
|
581
602
|
}
|
|
582
603
|
futuresSubmitTPSLOrder(params) {
|
|
583
|
-
return this.postPrivate(
|
|
604
|
+
return this.postPrivate('/api/v2/mix/order/place-tpsl-order', params);
|
|
584
605
|
}
|
|
585
606
|
futuresSubmitPlanOrder(params) {
|
|
586
|
-
return this.postPrivate(
|
|
607
|
+
return this.postPrivate('/api/v2/mix/order/place-plan-order', params);
|
|
587
608
|
}
|
|
588
609
|
futuresModifyTPSLPOrder(params) {
|
|
589
|
-
return this.postPrivate(
|
|
610
|
+
return this.postPrivate('/api/v2/mix/order/modify-tpsl-order', params);
|
|
590
611
|
}
|
|
591
612
|
futuresModifyPlanOrder(params) {
|
|
592
|
-
return this.postPrivate(
|
|
613
|
+
return this.postPrivate('/api/v2/mix/order/modify-plan-order', params);
|
|
593
614
|
}
|
|
594
615
|
futuresCancelPlanOrder(params) {
|
|
595
|
-
return this.postPrivate(
|
|
616
|
+
return this.postPrivate('/api/v2/mix/order/cancel-plan-order', params);
|
|
596
617
|
}
|
|
597
618
|
getFuturesPlanOrders(params) {
|
|
598
|
-
return this.getPrivate(
|
|
619
|
+
return this.getPrivate('/api/v2/mix/order/orders-plan-pending', params);
|
|
599
620
|
}
|
|
600
621
|
getFuturesHistoricPlanOrders(params) {
|
|
601
|
-
return this.getPrivate(
|
|
622
|
+
return this.getPrivate('/api/v2/mix/order/orders-plan-history', params);
|
|
602
623
|
}
|
|
603
624
|
/**
|
|
604
625
|
*
|
|
@@ -613,43 +634,43 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
613
634
|
*
|
|
614
635
|
*/
|
|
615
636
|
modifySubaccountEmail(params) {
|
|
616
|
-
return this.postPrivate(
|
|
637
|
+
return this.postPrivate('/api/v2/broker/account/modify-subaccount-email', params);
|
|
617
638
|
}
|
|
618
639
|
getBrokerInfo() {
|
|
619
|
-
return this.getPrivate(
|
|
640
|
+
return this.getPrivate('/api/v2/broker/account/info');
|
|
620
641
|
}
|
|
621
642
|
createSubaccount(params) {
|
|
622
|
-
return this.postPrivate(
|
|
643
|
+
return this.postPrivate('/api/v2/broker/account/create-subaccount', params);
|
|
623
644
|
}
|
|
624
645
|
getSubaccounts(params) {
|
|
625
|
-
return this.getPrivate(
|
|
646
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-list', params);
|
|
626
647
|
}
|
|
627
648
|
modifySubaccount(params) {
|
|
628
|
-
return this.postPrivate(
|
|
649
|
+
return this.postPrivate('/api/v2/broker/account/modify-subaccount', params);
|
|
629
650
|
}
|
|
630
651
|
getSubaccountEmail(params) {
|
|
631
|
-
return this.getPrivate(
|
|
652
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-email', params);
|
|
632
653
|
}
|
|
633
654
|
getSubaccountSpotAssets(params) {
|
|
634
|
-
return this.getPrivate(
|
|
655
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-spot-assets', params);
|
|
635
656
|
}
|
|
636
657
|
getSubaccountFuturesAssets(params) {
|
|
637
|
-
return this.getPrivate(
|
|
658
|
+
return this.getPrivate('/api/v2/broker/account/subaccount-future-assets', params);
|
|
638
659
|
}
|
|
639
660
|
createSubaccountDepositAddress(params) {
|
|
640
|
-
return this.postPrivate(
|
|
661
|
+
return this.postPrivate('/api/v2/broker/account/subaccount-address', params);
|
|
641
662
|
}
|
|
642
663
|
subaccountWithdrawal(params) {
|
|
643
|
-
return this.postPrivate(
|
|
664
|
+
return this.postPrivate('/api/v2/broker/account/subaccount-withdrawal', params);
|
|
644
665
|
}
|
|
645
666
|
subaccountSetAutoTransfer(params) {
|
|
646
|
-
return this.postPrivate(
|
|
667
|
+
return this.postPrivate('/api/v2/broker/account/set-subaccount-autotransfer', params);
|
|
647
668
|
}
|
|
648
669
|
subaccountDepositRecords(params) {
|
|
649
|
-
return this.postPrivate(
|
|
670
|
+
return this.postPrivate('/api/v2/broker/subaccount-deposit', params);
|
|
650
671
|
}
|
|
651
672
|
subaccountWithdrawalRecords(params) {
|
|
652
|
-
return this.postPrivate(
|
|
673
|
+
return this.postPrivate('/api/v2/broker/subaccount-withdrawal', params);
|
|
653
674
|
}
|
|
654
675
|
/**
|
|
655
676
|
*
|
|
@@ -657,13 +678,13 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
657
678
|
*
|
|
658
679
|
*/
|
|
659
680
|
createSubaccountApiKey(params) {
|
|
660
|
-
return this.postPrivate(
|
|
681
|
+
return this.postPrivate('/api/v2/broker/manage/create-subaccount-apikey', params);
|
|
661
682
|
}
|
|
662
683
|
getSubaccountApiKey(params) {
|
|
663
|
-
return this.getPrivate(
|
|
684
|
+
return this.getPrivate('/api/v2/broker/manage/subaccount-apikey-list', params);
|
|
664
685
|
}
|
|
665
686
|
modifySubaccountApiKey(params) {
|
|
666
|
-
return this.postPrivate(
|
|
687
|
+
return this.postPrivate('/api/v2/broker/manage/modify-subaccount-apikey', params);
|
|
667
688
|
}
|
|
668
689
|
/**
|
|
669
690
|
*
|
|
@@ -678,7 +699,7 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
678
699
|
*
|
|
679
700
|
*/
|
|
680
701
|
getMarginCurrencies() {
|
|
681
|
-
return this.get(
|
|
702
|
+
return this.get('/api/v2/margin/currencies');
|
|
682
703
|
}
|
|
683
704
|
/**
|
|
684
705
|
*
|
|
@@ -802,46 +823,46 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
802
823
|
*
|
|
803
824
|
*/
|
|
804
825
|
getFuturesTraderCurrentOrder(params) {
|
|
805
|
-
return this.getPrivate(
|
|
826
|
+
return this.getPrivate('/api/v2/copy/mix-trader/order-current-track', params);
|
|
806
827
|
}
|
|
807
828
|
getFuturesTraderHistoryOrders(params) {
|
|
808
|
-
return this.getPrivate(
|
|
829
|
+
return this.getPrivate('/api/v2/copy/mix-trader/order-history-track', params);
|
|
809
830
|
}
|
|
810
831
|
modifyFuturesTraderOrderTPSL(params) {
|
|
811
|
-
return this.postPrivate(
|
|
832
|
+
return this.postPrivate('/api/v2/copy/mix-trader/order-modify-tpsl', params);
|
|
812
833
|
}
|
|
813
834
|
getFuturesTraderOrder() {
|
|
814
|
-
return this.getPrivate(
|
|
835
|
+
return this.getPrivate('/api/v2/copy/mix-trader/order-total-detail');
|
|
815
836
|
}
|
|
816
837
|
getFuturesTraderProfitHistory() {
|
|
817
|
-
return this.getPrivate(
|
|
838
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profit-history-summarys');
|
|
818
839
|
}
|
|
819
840
|
getFuturesTraderProfitShareHistory(params) {
|
|
820
|
-
return this.getPrivate(
|
|
841
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profit-history-details', params);
|
|
821
842
|
}
|
|
822
843
|
closeFuturesTraderOrder(params) {
|
|
823
|
-
return this.postPrivate(
|
|
844
|
+
return this.postPrivate('/api/v2/copy/mix-trader/order-close-positions', params);
|
|
824
845
|
}
|
|
825
846
|
getFuturesTraderProfitShare(params) {
|
|
826
|
-
return this.getPrivate(
|
|
847
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profit-details', params);
|
|
827
848
|
}
|
|
828
849
|
getFuturesTraderProfitShareGroup(params) {
|
|
829
|
-
return this.getPrivate(
|
|
850
|
+
return this.getPrivate('/api/v2/copy/mix-trader/profits-group-coin-date', params);
|
|
830
851
|
}
|
|
831
852
|
getFuturesTraderSymbolSettings(params) {
|
|
832
|
-
return this.getPrivate(
|
|
853
|
+
return this.getPrivate('/api/v2/copy/mix-trader/config-query-symbols', params);
|
|
833
854
|
}
|
|
834
855
|
updateFuturesTraderSymbolSettings(params) {
|
|
835
|
-
return this.postPrivate(
|
|
856
|
+
return this.postPrivate('/api/v2/copy/mix-trader/config-setting-symbols', params);
|
|
836
857
|
}
|
|
837
858
|
updateFuturesTraderGlobalSettings(params) {
|
|
838
|
-
return this.postPrivate(
|
|
859
|
+
return this.postPrivate('/api/v2/copy/mix-trader/config-settings-base', params);
|
|
839
860
|
}
|
|
840
861
|
getFuturesTraderFollowers(params) {
|
|
841
|
-
return this.getPrivate(
|
|
862
|
+
return this.getPrivate('/api/v2/copy/mix-trader/config-query-followers', params);
|
|
842
863
|
}
|
|
843
864
|
removeFuturesTraderFollower(params) {
|
|
844
|
-
return this.postPrivate(
|
|
865
|
+
return this.postPrivate('/api/v2/copy/mix-trader/config-remove-follower', params);
|
|
845
866
|
}
|
|
846
867
|
/**
|
|
847
868
|
*
|
|
@@ -851,31 +872,31 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
851
872
|
*
|
|
852
873
|
*/
|
|
853
874
|
getFuturesFollowerCurrentOrders(params) {
|
|
854
|
-
return this.getPrivate(
|
|
875
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-current-orders', params);
|
|
855
876
|
}
|
|
856
877
|
getFuturesFollowerHistoryOrders(params) {
|
|
857
|
-
return this.getPrivate(
|
|
878
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-history-orders', params);
|
|
858
879
|
}
|
|
859
880
|
updateFuturesFollowerTPSL(params) {
|
|
860
|
-
return this.postPrivate(
|
|
881
|
+
return this.postPrivate('/api/v2/copy/mix-follower/setting-tpsl', params);
|
|
861
882
|
}
|
|
862
883
|
updateFuturesFollowerSettings(params) {
|
|
863
|
-
return this.postPrivate(
|
|
884
|
+
return this.postPrivate('/api/v2/copy/mix-follower/settings', params);
|
|
864
885
|
}
|
|
865
886
|
getFuturesFollowerSettings(params) {
|
|
866
|
-
return this.getPrivate(
|
|
887
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-settings', params);
|
|
867
888
|
}
|
|
868
889
|
closeFuturesFollowerPositions(params) {
|
|
869
|
-
return this.postPrivate(
|
|
890
|
+
return this.postPrivate('/api/v2/copy/mix-follower/close-positions', params);
|
|
870
891
|
}
|
|
871
892
|
getFuturesFollowerTraders(params) {
|
|
872
|
-
return this.getPrivate(
|
|
893
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-traders', params);
|
|
873
894
|
}
|
|
874
895
|
getFuturesFollowerFollowLimit(params) {
|
|
875
|
-
return this.getPrivate(
|
|
896
|
+
return this.getPrivate('/api/v2/copy/mix-follower/query-quantity-limit', params);
|
|
876
897
|
}
|
|
877
898
|
unfollowFuturesTrader(params) {
|
|
878
|
-
return this.postPrivate(
|
|
899
|
+
return this.postPrivate('/api/v2/copy/mix-follower/cancel-trader', params);
|
|
879
900
|
}
|
|
880
901
|
/**
|
|
881
902
|
*
|
|
@@ -885,13 +906,13 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
885
906
|
*
|
|
886
907
|
*/
|
|
887
908
|
getBrokerTraders(params) {
|
|
888
|
-
return this.getPrivate(
|
|
909
|
+
return this.getPrivate('/api/v2/copy/mix-broker/query-traders', params);
|
|
889
910
|
}
|
|
890
911
|
getBrokerTradersHistoricalOrders(params) {
|
|
891
|
-
return this.getPrivate(
|
|
912
|
+
return this.getPrivate('/api/v2/copy/mix-broker/query-history-traces', params);
|
|
892
913
|
}
|
|
893
914
|
getBrokerTradersPendingOrders(params) {
|
|
894
|
-
return this.getPrivate(
|
|
915
|
+
return this.getPrivate('/api/v2/copy/mix-broker/query-current-traces', params);
|
|
895
916
|
}
|
|
896
917
|
/**
|
|
897
918
|
*
|
|
@@ -901,77 +922,77 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
901
922
|
*
|
|
902
923
|
*/
|
|
903
924
|
getSpotTraderProfit() {
|
|
904
|
-
return this.getPrivate(
|
|
925
|
+
return this.getPrivate('/api/v2/copy/spot-trader/profit-summarys');
|
|
905
926
|
}
|
|
906
927
|
getSpotTraderHistoryProfit(params) {
|
|
907
|
-
return this.getPrivate(
|
|
928
|
+
return this.getPrivate('/api/v2/copy/spot-trader/profit-history-details', params);
|
|
908
929
|
}
|
|
909
930
|
getSpotTraderUnrealizedProfit(params) {
|
|
910
|
-
return this.getPrivate(
|
|
931
|
+
return this.getPrivate('/api/v2/copy/spot-trader/profit-details', params);
|
|
911
932
|
}
|
|
912
933
|
getSpotTraderOrder() {
|
|
913
|
-
return this.getPrivate(
|
|
934
|
+
return this.getPrivate('/api/v2/copy/spot-trader/order-total-detail');
|
|
914
935
|
}
|
|
915
936
|
modifySpotTraderOrderTPSL(params) {
|
|
916
|
-
return this.postPrivate(
|
|
937
|
+
return this.postPrivate('/api/v2/copy/spot-trader/order-modify-tpsl', params);
|
|
917
938
|
}
|
|
918
939
|
getSpotTraderHistoryOrders(params) {
|
|
919
|
-
return this.getPrivate(
|
|
940
|
+
return this.getPrivate('/api/v2/copy/spot-trader/order-history-track', params);
|
|
920
941
|
}
|
|
921
942
|
getSpotTraderCurrentOrders(params) {
|
|
922
|
-
return this.getPrivate(
|
|
943
|
+
return this.getPrivate('/api/v2/copy/spot-trader/order-current-track', params);
|
|
923
944
|
}
|
|
924
945
|
sellSpotTrader(params) {
|
|
925
|
-
return this.postPrivate(
|
|
946
|
+
return this.postPrivate('/api/v2/copy/spot-trader/order-close-tracking', params);
|
|
926
947
|
}
|
|
927
948
|
getSpotTraderSymbolSettings(params) {
|
|
928
|
-
return this.postPrivate(
|
|
949
|
+
return this.postPrivate('/api/v2/copy/spot-trader/config-setting-symbols', params);
|
|
929
950
|
}
|
|
930
951
|
removeSpotTraderFollowers(params) {
|
|
931
|
-
return this.postPrivate(
|
|
952
|
+
return this.postPrivate('/api/v2/copy/spot-trader/config-remove-follower', params);
|
|
932
953
|
}
|
|
933
954
|
getSpotTraderConfiguration() {
|
|
934
|
-
return this.getPrivate(
|
|
955
|
+
return this.getPrivate('/api/v2/copy/spot-trader/config-query-settings');
|
|
935
956
|
}
|
|
936
957
|
getSpotTraderFollowers(params) {
|
|
937
|
-
return this.getPrivate(
|
|
958
|
+
return this.getPrivate('/api/v2/copy/spot-trader/config-query-followers', params);
|
|
938
959
|
}
|
|
939
960
|
/**
|
|
940
961
|
*
|
|
941
962
|
*
|
|
942
|
-
* Copy Trading | Spot copy trading |
|
|
963
|
+
* Copy Trading | Spot copy trading | Follower api
|
|
943
964
|
*
|
|
944
965
|
*
|
|
945
966
|
*/
|
|
946
967
|
cancelSpotFollowerOrder(params) {
|
|
947
|
-
return this.postPrivate(
|
|
968
|
+
return this.postPrivate('/api/v2/copy/spot-follower/stop-order', params);
|
|
948
969
|
}
|
|
949
970
|
updateSpotFollowerSettings(params) {
|
|
950
|
-
return this.postPrivate(
|
|
971
|
+
return this.postPrivate('/api/v2/copy/spot-follower/settings', params);
|
|
951
972
|
}
|
|
952
973
|
updateSpotFollowerTPSL(params) {
|
|
953
|
-
return this.postPrivate(
|
|
974
|
+
return this.postPrivate('/api/v2/copy/spot-follower/setting-tpsl', params);
|
|
954
975
|
}
|
|
955
976
|
getSpotFollowerTraders(params) {
|
|
956
|
-
return this.getPrivate(
|
|
977
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-traders', params);
|
|
957
978
|
}
|
|
958
979
|
getSpotFollowerCurrentTraderSymbols(params) {
|
|
959
|
-
return this.getPrivate(
|
|
980
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-trader-symbols', params);
|
|
960
981
|
}
|
|
961
982
|
getSpotFollowerSettings(params) {
|
|
962
|
-
return this.getPrivate(
|
|
983
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-settings', params);
|
|
963
984
|
}
|
|
964
985
|
getSpotFollowerHistoryOrders(params) {
|
|
965
|
-
return this.getPrivate(
|
|
986
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-history-orders', params);
|
|
966
987
|
}
|
|
967
988
|
getSpotFollowerOpenOrders(params) {
|
|
968
|
-
return this.getPrivate(
|
|
989
|
+
return this.getPrivate('/api/v2/copy/spot-follower/query-current-orders', params);
|
|
969
990
|
}
|
|
970
991
|
sellSpotFollower(params) {
|
|
971
|
-
return this.postPrivate(
|
|
992
|
+
return this.postPrivate('/api/v2/copy/spot-follower/order-close-tracking', params);
|
|
972
993
|
}
|
|
973
994
|
unfollowSpotTrader(params) {
|
|
974
|
-
return this.postPrivate(
|
|
995
|
+
return this.postPrivate('/api/v2/copy/spot-follower/cancel-trader', params);
|
|
975
996
|
}
|
|
976
997
|
/**
|
|
977
998
|
*
|
|
@@ -981,28 +1002,31 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
981
1002
|
*
|
|
982
1003
|
*/
|
|
983
1004
|
getEarnSavingsProducts(params) {
|
|
984
|
-
return this.getPrivate(
|
|
1005
|
+
return this.getPrivate('/api/v2/earn/savings/product', params);
|
|
985
1006
|
}
|
|
986
1007
|
getEarnSavingsAccount() {
|
|
987
|
-
return this.getPrivate(
|
|
1008
|
+
return this.getPrivate('/api/v2/earn/savings/account');
|
|
988
1009
|
}
|
|
989
1010
|
getEarnSavingsAssets(params) {
|
|
990
|
-
return this.getPrivate(
|
|
1011
|
+
return this.getPrivate('/api/v2/earn/savings/assets', params);
|
|
991
1012
|
}
|
|
992
1013
|
getEarnSavingsRecords(params) {
|
|
993
|
-
return this.getPrivate(
|
|
1014
|
+
return this.getPrivate('/api/v2/earn/savings/records', params);
|
|
994
1015
|
}
|
|
995
1016
|
getEarnSavingsSubscription(params) {
|
|
996
|
-
return this.getPrivate(
|
|
1017
|
+
return this.getPrivate('/api/v2/earn/savings/subscribe-info', params);
|
|
997
1018
|
}
|
|
998
1019
|
earnSubscribeSavings(params) {
|
|
999
|
-
return this.postPrivate(
|
|
1020
|
+
return this.postPrivate('/api/v2/earn/savings/subscribe', params);
|
|
1000
1021
|
}
|
|
1001
1022
|
getEarnSavingsSubscriptionResult(params) {
|
|
1002
|
-
return this.getPrivate(
|
|
1023
|
+
return this.getPrivate('/api/v2/earn/savings/subscribe-result', params);
|
|
1024
|
+
}
|
|
1025
|
+
earnRedeemSavings(params) {
|
|
1026
|
+
return this.postPrivate('/api/v2/earn/savings/redeem', params);
|
|
1003
1027
|
}
|
|
1004
1028
|
getEarnSavingsRedemptionResult(params) {
|
|
1005
|
-
return this.getPrivate(
|
|
1029
|
+
return this.getPrivate('/api/v2/earn/savings/redeem-result', params);
|
|
1006
1030
|
}
|
|
1007
1031
|
/**
|
|
1008
1032
|
*
|
|
@@ -1012,7 +1036,7 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
1012
1036
|
*
|
|
1013
1037
|
*/
|
|
1014
1038
|
getEarnAccount(params) {
|
|
1015
|
-
return this.getPrivate(
|
|
1039
|
+
return this.getPrivate('/api/v2/earn/account/assets', params);
|
|
1016
1040
|
}
|
|
1017
1041
|
/**
|
|
1018
1042
|
*
|
|
@@ -1022,25 +1046,25 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
1022
1046
|
*
|
|
1023
1047
|
*/
|
|
1024
1048
|
getSharkfinProducts(params) {
|
|
1025
|
-
return this.getPrivate(
|
|
1049
|
+
return this.getPrivate('/api/v2/earn/sharkfin/product', params);
|
|
1026
1050
|
}
|
|
1027
1051
|
getSharkfinAccount() {
|
|
1028
|
-
return this.getPrivate(
|
|
1052
|
+
return this.getPrivate('/api/v2/earn/sharkfin/account');
|
|
1029
1053
|
}
|
|
1030
1054
|
getSharkfinAssets(params) {
|
|
1031
|
-
return this.getPrivate(
|
|
1055
|
+
return this.getPrivate('/api/v2/earn/sharkfin/assets', params);
|
|
1032
1056
|
}
|
|
1033
1057
|
getSharkfinRecords(params) {
|
|
1034
|
-
return this.getPrivate(
|
|
1058
|
+
return this.getPrivate('/api/v2/earn/sharkfin/records', params);
|
|
1035
1059
|
}
|
|
1036
1060
|
getSharkfinSubscription(params) {
|
|
1037
|
-
return this.getPrivate(
|
|
1061
|
+
return this.getPrivate('/api/v2/earn/sharkfin/subscribe-info', params);
|
|
1038
1062
|
}
|
|
1039
1063
|
subscribeSharkfin(params) {
|
|
1040
|
-
return this.postPrivate(
|
|
1064
|
+
return this.postPrivate('/api/v2/earn/sharkfin/subscribe', params);
|
|
1041
1065
|
}
|
|
1042
1066
|
getSharkfinSubscriptionResult(params) {
|
|
1043
|
-
return this.getPrivate(
|
|
1067
|
+
return this.getPrivate('/api/v2/earn/sharkfin/subscribe-result', params);
|
|
1044
1068
|
}
|
|
1045
1069
|
/**
|
|
1046
1070
|
*
|
|
@@ -1050,37 +1074,37 @@ class RestClientV2 extends BaseRestClient_1.default {
|
|
|
1050
1074
|
*
|
|
1051
1075
|
*/
|
|
1052
1076
|
getLoanCurrencies(params) {
|
|
1053
|
-
return this.get(
|
|
1077
|
+
return this.get('/api/v2/earn/loan/public/coinInfos', params);
|
|
1054
1078
|
}
|
|
1055
1079
|
getLoanEstInterestAndBorrowable(params) {
|
|
1056
|
-
return this.get(
|
|
1080
|
+
return this.get('/api/v2/earn/loan/public/hour-interest', params);
|
|
1057
1081
|
}
|
|
1058
1082
|
borrowLoan(params) {
|
|
1059
|
-
return this.postPrivate(
|
|
1083
|
+
return this.postPrivate('/api/v2/earn/loan/borrow', params);
|
|
1060
1084
|
}
|
|
1061
1085
|
getOngoingLoanOrders(params) {
|
|
1062
|
-
return this.getPrivate(
|
|
1086
|
+
return this.getPrivate('/api/v2/earn/loan/ongoing-orders', params);
|
|
1063
1087
|
}
|
|
1064
1088
|
repayLoan(params) {
|
|
1065
|
-
return this.postPrivate(
|
|
1089
|
+
return this.postPrivate('/api/v2/earn/loan/repay', params);
|
|
1066
1090
|
}
|
|
1067
1091
|
getRepayHistory(params) {
|
|
1068
|
-
return this.getPrivate(
|
|
1092
|
+
return this.getPrivate('/api/v2/earn/loan/repay-history', params);
|
|
1069
1093
|
}
|
|
1070
1094
|
updateLoanPledgeRate(params) {
|
|
1071
|
-
return this.postPrivate(
|
|
1095
|
+
return this.postPrivate('/api/v2/earn/loan/revise-pledge', params);
|
|
1072
1096
|
}
|
|
1073
1097
|
getLoanPledgeRateHistory(params) {
|
|
1074
|
-
return this.getPrivate(
|
|
1098
|
+
return this.getPrivate('/api/v2/earn/loan/revise-history', params);
|
|
1075
1099
|
}
|
|
1076
1100
|
getLoanHistory(params) {
|
|
1077
|
-
return this.getPrivate(
|
|
1101
|
+
return this.getPrivate('/api/v2/earn/loan/borrow-history', params);
|
|
1078
1102
|
}
|
|
1079
|
-
getLoanDebts(
|
|
1080
|
-
return this.getPrivate(
|
|
1103
|
+
getLoanDebts() {
|
|
1104
|
+
return this.getPrivate('/api/v2/earn/loan/debts');
|
|
1081
1105
|
}
|
|
1082
1106
|
getLoanLiquidationRecords(params) {
|
|
1083
|
-
return this.getPrivate(
|
|
1107
|
+
return this.getPrivate('/api/v2/earn/loan/reduces', params);
|
|
1084
1108
|
}
|
|
1085
1109
|
}
|
|
1086
1110
|
exports.RestClientV2 = RestClientV2;
|