ccxt 4.5.22 → 4.5.23
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/README.md +6 -5
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +6 -1
- package/dist/cjs/src/abstract/bullish.js +11 -0
- package/dist/cjs/src/base/Exchange.js +3 -2
- package/dist/cjs/src/base/ws/WsClient.js +15 -0
- package/dist/cjs/src/binance.js +159 -36
- package/dist/cjs/src/bingx.js +2 -1
- package/dist/cjs/src/bitmart.js +1 -0
- package/dist/cjs/src/bullish.js +2919 -0
- package/dist/cjs/src/bybit.js +34 -37
- package/dist/cjs/src/gate.js +2 -2
- package/dist/cjs/src/htx.js +4 -1
- package/dist/cjs/src/hyperliquid.js +115 -12
- package/dist/cjs/src/kucoin.js +22 -3
- package/dist/cjs/src/mexc.js +7 -0
- package/dist/cjs/src/okx.js +117 -63
- package/dist/cjs/src/paradex.js +78 -3
- package/dist/cjs/src/pro/binance.js +131 -29
- package/dist/cjs/src/pro/bullish.js +781 -0
- package/dist/cjs/src/pro/coinbase.js +2 -2
- package/dist/cjs/src/pro/hyperliquid.js +75 -15
- package/dist/cjs/src/pro/upbit.js +28 -82
- package/js/ccxt.d.ts +8 -2
- package/js/ccxt.js +6 -2
- package/js/src/abstract/binance.d.ts +1 -0
- package/js/src/abstract/binancecoinm.d.ts +1 -0
- package/js/src/abstract/binanceus.d.ts +1 -0
- package/js/src/abstract/binanceusdm.d.ts +1 -0
- package/js/src/abstract/bingx.d.ts +1 -0
- package/js/src/abstract/bullish.d.ts +65 -0
- package/js/src/abstract/bullish.js +5 -0
- package/js/src/abstract/kucoin.d.ts +15 -0
- package/js/src/abstract/kucoinfutures.d.ts +15 -0
- package/js/src/abstract/mexc.d.ts +7 -0
- package/js/src/abstract/myokx.d.ts +90 -39
- package/js/src/abstract/okx.d.ts +90 -39
- package/js/src/abstract/okxus.d.ts +90 -39
- package/js/src/base/Exchange.d.ts +1 -1
- package/js/src/base/Exchange.js +3 -2
- package/js/src/base/ws/Client.d.ts +1 -0
- package/js/src/base/ws/WsClient.js +15 -0
- package/js/src/binance.d.ts +14 -5
- package/js/src/binance.js +159 -36
- package/js/src/bingx.js +2 -1
- package/js/src/bitmart.js +1 -0
- package/js/src/bullish.d.ts +446 -0
- package/js/src/bullish.js +2912 -0
- package/js/src/bybit.js +34 -37
- package/js/src/gate.js +2 -2
- package/js/src/htx.js +4 -1
- package/js/src/hyperliquid.d.ts +24 -0
- package/js/src/hyperliquid.js +115 -12
- package/js/src/kucoin.js +22 -3
- package/js/src/mexc.js +7 -0
- package/js/src/okx.js +117 -63
- package/js/src/paradex.d.ts +15 -1
- package/js/src/paradex.js +78 -3
- package/js/src/pro/binance.d.ts +7 -0
- package/js/src/pro/binance.js +131 -29
- package/js/src/pro/bullish.d.ts +108 -0
- package/js/src/pro/bullish.js +774 -0
- package/js/src/pro/coinbase.js +2 -2
- package/js/src/pro/hyperliquid.d.ts +13 -1
- package/js/src/pro/hyperliquid.js +75 -15
- package/js/src/pro/upbit.d.ts +0 -1
- package/js/src/pro/upbit.js +28 -82
- package/package.json +2 -2
package/dist/cjs/src/okx.js
CHANGED
|
@@ -194,74 +194,85 @@ class okx extends okx$1["default"] {
|
|
|
194
194
|
'api': {
|
|
195
195
|
'public': {
|
|
196
196
|
'get': {
|
|
197
|
-
|
|
197
|
+
// market
|
|
198
198
|
'market/tickers': 1,
|
|
199
199
|
'market/ticker': 1,
|
|
200
|
-
'market/index-tickers': 1,
|
|
201
200
|
'market/books': 1 / 2,
|
|
202
|
-
'market/books-
|
|
201
|
+
'market/books-full': 2,
|
|
203
202
|
'market/candles': 1 / 2,
|
|
204
203
|
'market/history-candles': 1,
|
|
205
|
-
'market/index-candles': 1,
|
|
206
|
-
'market/history-index-candles': 2,
|
|
207
|
-
'market/mark-price-candles': 1,
|
|
208
|
-
'market/history-mark-price-candles': 2,
|
|
209
204
|
'market/trades': 1 / 5,
|
|
210
205
|
'market/history-trades': 2,
|
|
211
206
|
'market/option/instrument-family-trades': 1,
|
|
212
207
|
'market/platform-24-volume': 10,
|
|
213
|
-
'market/
|
|
214
|
-
'market/
|
|
215
|
-
'market/index-components': 1,
|
|
216
|
-
'public/market-data-history': 4,
|
|
217
|
-
'public/economic-calendar': 50,
|
|
208
|
+
'market/call-auction-detail': 1,
|
|
209
|
+
'market/books-sbe': 10,
|
|
218
210
|
'market/block-tickers': 1,
|
|
219
211
|
'market/block-ticker': 1,
|
|
212
|
+
'market/sprd-ticker': 1,
|
|
213
|
+
'market/sprd-candles': 1 / 2,
|
|
214
|
+
'market/sprd-history-candles': 1,
|
|
215
|
+
'market/index-tickers': 1,
|
|
216
|
+
'market/index-candles': 1,
|
|
217
|
+
'market/history-index-candles': 2,
|
|
218
|
+
'market/mark-price-candles': 1,
|
|
219
|
+
'market/history-mark-price-candles': 1,
|
|
220
|
+
'market/exchange-rate': 20,
|
|
221
|
+
'market/index-components': 1,
|
|
222
|
+
'market/open-oracle': 50,
|
|
223
|
+
'market/books-lite': 5 / 3,
|
|
224
|
+
// public
|
|
225
|
+
'public/option-trades': 1,
|
|
220
226
|
'public/block-trades': 1,
|
|
221
227
|
'public/instruments': 1,
|
|
228
|
+
'public/estimated-price': 2,
|
|
222
229
|
'public/delivery-exercise-history': 1 / 2,
|
|
230
|
+
'public/estimated-settlement-info': 2,
|
|
231
|
+
'public/settlement-history': 1 / 2,
|
|
232
|
+
'public/funding-rate': 2,
|
|
233
|
+
'public/funding-rate-history': 2,
|
|
223
234
|
'public/open-interest': 1,
|
|
224
|
-
'public/funding-rate': 1,
|
|
225
|
-
'public/funding-rate-history': 1,
|
|
226
235
|
'public/price-limit': 1,
|
|
227
236
|
'public/opt-summary': 1,
|
|
228
|
-
'public/estimated-price': 2,
|
|
229
237
|
'public/discount-rate-interest-free-quota': 10,
|
|
230
238
|
'public/time': 2,
|
|
231
239
|
'public/mark-price': 2,
|
|
232
240
|
'public/position-tiers': 2,
|
|
233
241
|
'public/interest-rate-loan-quota': 10,
|
|
234
|
-
'public/vip-interest-rate-loan-quota': 10,
|
|
235
242
|
'public/underlying': 1,
|
|
236
243
|
'public/insurance-fund': 2,
|
|
237
244
|
'public/convert-contract-coin': 2,
|
|
238
|
-
'public/option-trades': 1,
|
|
239
245
|
'public/instrument-tick-bands': 4,
|
|
246
|
+
'public/premium-history': 1,
|
|
247
|
+
'public/economic-calendar': 50,
|
|
248
|
+
'public/market-data-history': 4,
|
|
249
|
+
'public/vip-interest-rate-loan-quota': 10,
|
|
250
|
+
// rubik
|
|
240
251
|
'rubik/stat/trading-data/support-coin': 4,
|
|
252
|
+
'rubik/stat/contracts/open-interest-history': 2,
|
|
241
253
|
'rubik/stat/taker-volume': 4,
|
|
254
|
+
'rubik/stat/taker-volume-contract': 4,
|
|
242
255
|
'rubik/stat/margin/loan-ratio': 4,
|
|
243
|
-
|
|
244
|
-
'rubik/stat/contracts/long-short-account-ratio': 4,
|
|
256
|
+
'rubik/stat/contracts/long-short-account-ratio-contract-top-trader': 4,
|
|
245
257
|
'rubik/stat/contracts/long-short-account-ratio-contract': 4,
|
|
258
|
+
'rubik/stat/contracts/long-short-account-ratio': 4,
|
|
246
259
|
'rubik/stat/contracts/open-interest-volume': 4,
|
|
247
260
|
'rubik/stat/option/open-interest-volume': 4,
|
|
248
|
-
// put/call
|
|
249
261
|
'rubik/stat/option/open-interest-volume-ratio': 4,
|
|
250
262
|
'rubik/stat/option/open-interest-volume-expiry': 4,
|
|
251
263
|
'rubik/stat/option/open-interest-volume-strike': 4,
|
|
252
264
|
'rubik/stat/option/taker-block-volume': 4,
|
|
265
|
+
// system
|
|
253
266
|
'system/status': 50,
|
|
254
|
-
//
|
|
267
|
+
// sprd
|
|
255
268
|
'sprd/spreads': 1,
|
|
256
|
-
'sprd/books': 1
|
|
269
|
+
'sprd/books': 1,
|
|
270
|
+
'sprd/public-trades': 1,
|
|
257
271
|
'sprd/ticker': 1,
|
|
258
|
-
'sprd/public-trades': 1 / 5,
|
|
259
|
-
'market/sprd-ticker': 2,
|
|
260
|
-
'market/sprd-candles': 2,
|
|
261
|
-
'market/sprd-history-candles': 2,
|
|
262
272
|
'tradingBot/grid/ai-param': 1,
|
|
263
273
|
'tradingBot/grid/min-investment': 1,
|
|
264
274
|
'tradingBot/public/rsi-back-testing': 1,
|
|
275
|
+
'tradingBot/grid/grid-quantity': 4,
|
|
265
276
|
'asset/exchange-list': 5 / 3,
|
|
266
277
|
'finance/staking-defi/eth/apy-history': 5 / 3,
|
|
267
278
|
'finance/staking-defi/sol/apy-history': 5 / 3,
|
|
@@ -273,14 +284,21 @@ class okx extends okx$1["default"] {
|
|
|
273
284
|
// public broker
|
|
274
285
|
'finance/sfp/dcd/products': 2 / 3,
|
|
275
286
|
// copytrading
|
|
287
|
+
'copytrading/public-config': 4,
|
|
276
288
|
'copytrading/public-lead-traders': 4,
|
|
277
289
|
'copytrading/public-weekly-pnl': 4,
|
|
290
|
+
'copytrading/public-pnl': 4,
|
|
278
291
|
'copytrading/public-stats': 4,
|
|
279
292
|
'copytrading/public-preference-currency': 4,
|
|
280
293
|
'copytrading/public-current-subpositions': 4,
|
|
281
294
|
'copytrading/public-subpositions-history': 4,
|
|
295
|
+
'copytrading/public-copy-traders': 4,
|
|
296
|
+
'support/announcements': 4,
|
|
282
297
|
'support/announcements-types': 20,
|
|
283
298
|
},
|
|
299
|
+
'post': {
|
|
300
|
+
'tradingBot/grid/min-investment': 1, // public
|
|
301
|
+
},
|
|
284
302
|
},
|
|
285
303
|
'private': {
|
|
286
304
|
'get': {
|
|
@@ -293,18 +311,18 @@ class okx extends okx$1["default"] {
|
|
|
293
311
|
'rfq/trades': 4,
|
|
294
312
|
'rfq/public-trades': 4,
|
|
295
313
|
// sprd
|
|
296
|
-
'sprd/order': 1
|
|
297
|
-
'sprd/orders-pending':
|
|
298
|
-
'sprd/orders-history': 1
|
|
299
|
-
'sprd/orders-history-archive': 1
|
|
300
|
-
'sprd/trades': 1
|
|
314
|
+
'sprd/order': 1,
|
|
315
|
+
'sprd/orders-pending': 2,
|
|
316
|
+
'sprd/orders-history': 1,
|
|
317
|
+
'sprd/orders-history-archive': 1,
|
|
318
|
+
'sprd/trades': 1,
|
|
301
319
|
// trade
|
|
302
320
|
'trade/order': 1 / 3,
|
|
303
321
|
'trade/orders-pending': 1 / 3,
|
|
304
322
|
'trade/orders-history': 1 / 2,
|
|
305
323
|
'trade/orders-history-archive': 1,
|
|
306
324
|
'trade/fills': 1 / 3,
|
|
307
|
-
'trade/fills-history': 2
|
|
325
|
+
'trade/fills-history': 2,
|
|
308
326
|
'trade/fills-archive': 2,
|
|
309
327
|
'trade/order-algo': 1,
|
|
310
328
|
'trade/orders-algo-pending': 1,
|
|
@@ -321,25 +339,26 @@ class okx extends okx$1["default"] {
|
|
|
321
339
|
'asset/balances': 5 / 3,
|
|
322
340
|
'asset/non-tradable-assets': 5 / 3,
|
|
323
341
|
'asset/asset-valuation': 10,
|
|
324
|
-
'asset/transfer-state':
|
|
342
|
+
'asset/transfer-state': 1,
|
|
325
343
|
'asset/bills': 5 / 3,
|
|
344
|
+
'asset/bills-history': 10,
|
|
326
345
|
'asset/deposit-lightning': 5,
|
|
327
346
|
'asset/deposit-address': 5 / 3,
|
|
328
347
|
'asset/deposit-history': 5 / 3,
|
|
329
348
|
'asset/withdrawal-history': 5 / 3,
|
|
330
349
|
'asset/deposit-withdraw-status': 20,
|
|
350
|
+
'asset/monthly-statement': 2,
|
|
331
351
|
'asset/convert/currencies': 5 / 3,
|
|
332
352
|
'asset/convert/currency-pair': 5 / 3,
|
|
333
353
|
'asset/convert/history': 5 / 3,
|
|
334
|
-
'asset/monthly-statement': 2,
|
|
335
354
|
// account
|
|
336
355
|
'account/instruments': 1,
|
|
337
356
|
'account/balance': 2,
|
|
338
357
|
'account/positions': 2,
|
|
339
|
-
'account/positions-history':
|
|
358
|
+
'account/positions-history': 2,
|
|
340
359
|
'account/account-position-risk': 2,
|
|
341
|
-
'account/bills':
|
|
342
|
-
'account/bills-archive':
|
|
360
|
+
'account/bills': 2,
|
|
361
|
+
'account/bills-archive': 4,
|
|
343
362
|
'account/bills-history-archive': 2,
|
|
344
363
|
'account/config': 4,
|
|
345
364
|
'account/max-size': 1,
|
|
@@ -352,23 +371,26 @@ class okx extends okx$1["default"] {
|
|
|
352
371
|
'account/interest-rate': 4,
|
|
353
372
|
'account/max-withdrawal': 1,
|
|
354
373
|
'account/risk-state': 2,
|
|
374
|
+
'account/interest-limits': 4,
|
|
375
|
+
'account/spot-borrow-repay-history': 4,
|
|
376
|
+
'account/greeks': 2,
|
|
377
|
+
'account/position-tiers': 2,
|
|
378
|
+
'account/set-account-switch-precheck': 4,
|
|
379
|
+
'account/collateral-assets': 4,
|
|
380
|
+
'account/mmp-config': 4,
|
|
381
|
+
'account/move-positions-history': 10,
|
|
382
|
+
'account/precheck-set-delta-neutral': 20,
|
|
355
383
|
'account/quick-margin-borrow-repay-history': 4,
|
|
356
384
|
'account/borrow-repay-history': 4,
|
|
357
385
|
'account/vip-interest-accrued': 4,
|
|
358
386
|
'account/vip-interest-deducted': 4,
|
|
359
387
|
'account/vip-loan-order-list': 4,
|
|
360
388
|
'account/vip-loan-order-detail': 4,
|
|
361
|
-
'account/interest-limits': 4,
|
|
362
|
-
'account/greeks': 2,
|
|
363
|
-
'account/position-tiers': 2,
|
|
364
|
-
'account/mmp-config': 4,
|
|
365
389
|
'account/fixed-loan/borrowing-limit': 4,
|
|
366
390
|
'account/fixed-loan/borrowing-quote': 5,
|
|
367
391
|
'account/fixed-loan/borrowing-orders-list': 5,
|
|
368
392
|
'account/spot-manual-borrow-repay': 30,
|
|
369
393
|
'account/set-auto-repay': 4,
|
|
370
|
-
'account/spot-borrow-repay-history': 4,
|
|
371
|
-
'account/move-positions-history': 10,
|
|
372
394
|
// subaccount
|
|
373
395
|
'users/subaccount/list': 10,
|
|
374
396
|
'account/subaccount/balances': 10 / 3,
|
|
@@ -388,9 +410,10 @@ class okx extends okx$1["default"] {
|
|
|
388
410
|
'tradingBot/grid/ai-param': 1,
|
|
389
411
|
'tradingBot/signal/signals': 1,
|
|
390
412
|
'tradingBot/signal/orders-algo-details': 1,
|
|
413
|
+
'tradingBot/signal/orders-algo-pending': 1,
|
|
391
414
|
'tradingBot/signal/orders-algo-history': 1,
|
|
392
415
|
'tradingBot/signal/positions': 1,
|
|
393
|
-
'tradingBot/signal/positions-history':
|
|
416
|
+
'tradingBot/signal/positions-history': 2,
|
|
394
417
|
'tradingBot/signal/sub-orders': 1,
|
|
395
418
|
'tradingBot/signal/event-history': 1,
|
|
396
419
|
'tradingBot/recurring/orders-algo-pending': 1,
|
|
@@ -404,11 +427,18 @@ class okx extends okx$1["default"] {
|
|
|
404
427
|
'finance/staking-defi/orders-active': 10 / 3,
|
|
405
428
|
'finance/staking-defi/orders-history': 10 / 3,
|
|
406
429
|
// eth staking
|
|
430
|
+
'finance/staking-defi/eth/product-info': 10 / 3,
|
|
407
431
|
'finance/staking-defi/eth/balance': 5 / 3,
|
|
408
432
|
'finance/staking-defi/eth/purchase-redeem-history': 5 / 3,
|
|
409
|
-
'finance/staking-defi/
|
|
433
|
+
'finance/staking-defi/sol/product-info': 10 / 3,
|
|
410
434
|
'finance/staking-defi/sol/balance': 5 / 3,
|
|
411
435
|
'finance/staking-defi/sol/purchase-redeem-history': 5 / 3,
|
|
436
|
+
'finance/flexible-loan/borrow-currencies': 4,
|
|
437
|
+
'finance/flexible-loan/collateral-assets': 4,
|
|
438
|
+
'finance/flexible-loan/max-collateral-redeem-amount': 4,
|
|
439
|
+
'finance/flexible-loan/loan-info': 4,
|
|
440
|
+
'finance/flexible-loan/loan-history': 4,
|
|
441
|
+
'finance/flexible-loan/interest-accrued': 4,
|
|
412
442
|
// copytrading
|
|
413
443
|
'copytrading/current-subpositions': 1,
|
|
414
444
|
'copytrading/subpositions-history': 1,
|
|
@@ -416,11 +446,19 @@ class okx extends okx$1["default"] {
|
|
|
416
446
|
'copytrading/profit-sharing-details': 4,
|
|
417
447
|
'copytrading/total-profit-sharing': 4,
|
|
418
448
|
'copytrading/unrealized-profit-sharing-details': 4,
|
|
449
|
+
'copytrading/total-unrealized-profit-sharing': 4,
|
|
450
|
+
'copytrading/config': 4,
|
|
419
451
|
'copytrading/copy-settings': 4,
|
|
420
|
-
'copytrading/batch-leverage-info': 4,
|
|
421
452
|
'copytrading/current-lead-traders': 4,
|
|
453
|
+
'copytrading/batch-leverage-info': 4,
|
|
422
454
|
'copytrading/lead-traders-history': 4,
|
|
423
455
|
// broker
|
|
456
|
+
'broker/dma/subaccount-info': 2,
|
|
457
|
+
'broker/dma/subaccount-trade-fee': 10,
|
|
458
|
+
'broker/dma/subaccount/apikey': 10,
|
|
459
|
+
'broker/dma/rebate-per-orders': 300,
|
|
460
|
+
'broker/fd/rebate-per-orders': 300,
|
|
461
|
+
'broker/fd/if-rebate': 5,
|
|
424
462
|
'broker/nd/info': 10,
|
|
425
463
|
'broker/nd/subaccount-info': 10,
|
|
426
464
|
'broker/nd/subaccount/apikey': 10,
|
|
@@ -431,8 +469,6 @@ class okx extends okx$1["default"] {
|
|
|
431
469
|
'broker/nd/rebate-per-orders': 300,
|
|
432
470
|
'finance/sfp/dcd/order': 2,
|
|
433
471
|
'finance/sfp/dcd/orders': 2,
|
|
434
|
-
'broker/fd/rebate-per-orders': 300,
|
|
435
|
-
'broker/fd/if-rebate': 5,
|
|
436
472
|
// affiliate
|
|
437
473
|
'affiliate/invitee/detail': 1,
|
|
438
474
|
'users/partner/if-rebate': 1,
|
|
@@ -452,6 +488,7 @@ class okx extends okx$1["default"] {
|
|
|
452
488
|
'rfq/cancel-quote': 0.4,
|
|
453
489
|
'rfq/cancel-batch-quotes': 10,
|
|
454
490
|
'rfq/cancel-all-quotes': 10,
|
|
491
|
+
'rfq/cancel-all-after': 10,
|
|
455
492
|
// sprd
|
|
456
493
|
'sprd/order': 1,
|
|
457
494
|
'sprd/cancel-order': 1,
|
|
@@ -467,57 +504,68 @@ class okx extends okx$1["default"] {
|
|
|
467
504
|
'trade/amend-batch-orders': 1 / 150,
|
|
468
505
|
'trade/close-position': 1,
|
|
469
506
|
'trade/fills-archive': 172800,
|
|
470
|
-
'trade/order-algo': 1,
|
|
471
|
-
'trade/cancel-algos': 1,
|
|
472
|
-
'trade/amend-algos': 1,
|
|
473
507
|
'trade/cancel-advance-algos': 1,
|
|
474
508
|
'trade/easy-convert': 20,
|
|
475
509
|
'trade/one-click-repay': 20,
|
|
476
510
|
'trade/one-click-repay-v2': 20,
|
|
477
511
|
'trade/mass-cancel': 4,
|
|
478
512
|
'trade/cancel-all-after': 10,
|
|
513
|
+
'trade/order-precheck': 4,
|
|
514
|
+
'trade/order-algo': 1,
|
|
515
|
+
'trade/cancel-algos': 1,
|
|
516
|
+
'trade/amend-algos': 1,
|
|
479
517
|
// asset
|
|
480
|
-
'asset/transfer':
|
|
518
|
+
'asset/transfer': 5,
|
|
481
519
|
'asset/withdrawal': 5 / 3,
|
|
482
520
|
'asset/withdrawal-lightning': 5,
|
|
483
521
|
'asset/cancel-withdrawal': 5 / 3,
|
|
484
522
|
'asset/convert-dust-assets': 10,
|
|
485
|
-
'asset/
|
|
523
|
+
'asset/monthly-statement': 1296000,
|
|
524
|
+
'asset/convert/estimate-quote': 50,
|
|
486
525
|
'asset/convert/trade': 1,
|
|
487
|
-
'asset/monthly-statement': 1,
|
|
488
526
|
// account
|
|
527
|
+
'account/bills-history-archive': 72000,
|
|
489
528
|
'account/set-position-mode': 4,
|
|
490
529
|
'account/set-leverage': 1,
|
|
491
530
|
'account/position/margin-balance': 1,
|
|
531
|
+
'account/set-fee-type': 4,
|
|
492
532
|
'account/set-greeks': 4,
|
|
493
533
|
'account/set-isolated-mode': 4,
|
|
534
|
+
'account/spot-manual-borrow-repay': 30,
|
|
535
|
+
'account/set-auto-repay': 4,
|
|
494
536
|
'account/quick-margin-borrow-repay': 4,
|
|
495
537
|
'account/borrow-repay': 5 / 3,
|
|
496
538
|
'account/simulated_margin': 10,
|
|
497
539
|
'account/position-builder': 10,
|
|
540
|
+
'account/position-builder-graph': 50,
|
|
498
541
|
'account/set-riskOffset-type': 2,
|
|
499
542
|
'account/activate-option': 4,
|
|
500
543
|
'account/set-auto-loan': 4,
|
|
544
|
+
'account/account-level-switch-preset': 4,
|
|
501
545
|
'account/set-account-level': 4,
|
|
546
|
+
'account/set-collateral-assets': 4,
|
|
502
547
|
'account/mmp-reset': 4,
|
|
503
|
-
'account/mmp-config':
|
|
548
|
+
'account/mmp-config': 50,
|
|
504
549
|
'account/fixed-loan/borrowing-order': 5,
|
|
505
550
|
'account/fixed-loan/amend-borrowing-order': 5,
|
|
506
551
|
'account/fixed-loan/manual-reborrow': 5,
|
|
507
552
|
'account/fixed-loan/repay-borrowing-order': 5,
|
|
508
|
-
'account/bills-history-archive': 72000,
|
|
509
553
|
'account/move-positions': 10,
|
|
554
|
+
'account/set-auto-earn': 10,
|
|
510
555
|
'account/set-settle-currency': 1,
|
|
556
|
+
'account/set-trading-config': 20,
|
|
511
557
|
// subaccount
|
|
512
|
-
'users/subaccount/modify-apikey': 10,
|
|
513
558
|
'asset/subaccount/transfer': 10,
|
|
514
|
-
'users/subaccount/set-transfer-out': 10,
|
|
515
559
|
'account/subaccount/set-loan-allocation': 4,
|
|
516
560
|
'users/subaccount/create-subaccount': 10,
|
|
561
|
+
'users/subaccount/apikey': 10,
|
|
562
|
+
'users/subaccount/modify-apikey': 10,
|
|
517
563
|
'users/subaccount/subaccount-apikey': 10,
|
|
518
564
|
'users/subaccount/delete-apikey': 10,
|
|
565
|
+
'users/subaccount/set-transfer-out': 10,
|
|
519
566
|
// grid trading
|
|
520
567
|
'tradingBot/grid/order-algo': 1,
|
|
568
|
+
'tradingBot/grid/amend-algo-basic-param': 1,
|
|
521
569
|
'tradingBot/grid/amend-order-algo': 1,
|
|
522
570
|
'tradingBot/grid/stop-order-algo': 1,
|
|
523
571
|
'tradingBot/grid/close-position': 1,
|
|
@@ -543,18 +591,23 @@ class okx extends okx$1["default"] {
|
|
|
543
591
|
// earn
|
|
544
592
|
'finance/savings/purchase-redempt': 5 / 3,
|
|
545
593
|
'finance/savings/set-lending-rate': 5 / 3,
|
|
546
|
-
'finance/staking-defi/purchase':
|
|
547
|
-
'finance/staking-defi/redeem':
|
|
548
|
-
'finance/staking-defi/cancel':
|
|
594
|
+
'finance/staking-defi/purchase': 5,
|
|
595
|
+
'finance/staking-defi/redeem': 5,
|
|
596
|
+
'finance/staking-defi/cancel': 5,
|
|
549
597
|
// eth staking
|
|
550
598
|
'finance/staking-defi/eth/purchase': 5,
|
|
551
599
|
'finance/staking-defi/eth/redeem': 5,
|
|
600
|
+
'finance/staking-defi/eth/cancel-redeem': 5,
|
|
552
601
|
'finance/staking-defi/sol/purchase': 5,
|
|
553
602
|
'finance/staking-defi/sol/redeem': 5,
|
|
603
|
+
'finance/staking-defi/sol/cancel-redeem': 5,
|
|
604
|
+
'finance/flexible-loan/max-loan': 4,
|
|
605
|
+
'finance/flexible-loan/adjust-collateral': 4,
|
|
554
606
|
// copytrading
|
|
555
607
|
'copytrading/algo-order': 1,
|
|
556
608
|
'copytrading/close-subposition': 1,
|
|
557
609
|
'copytrading/set-instruments': 4,
|
|
610
|
+
'copytrading/amend-profit-sharing-ratio': 4,
|
|
558
611
|
'copytrading/first-copy-settings': 4,
|
|
559
612
|
'copytrading/amend-copy-settings': 4,
|
|
560
613
|
'copytrading/stop-copy-trading': 4,
|
|
@@ -574,6 +627,8 @@ class okx extends okx$1["default"] {
|
|
|
574
627
|
'finance/sfp/dcd/quote': 10,
|
|
575
628
|
'finance/sfp/dcd/order': 10,
|
|
576
629
|
'broker/nd/report-subaccount-ip': 0.25,
|
|
630
|
+
'broker/dma/subaccount/apikey': 1 / 4,
|
|
631
|
+
'broker/dma/trades': 36000,
|
|
577
632
|
'broker/fd/rebate-per-orders': 36000,
|
|
578
633
|
},
|
|
579
634
|
},
|
|
@@ -1338,8 +1393,7 @@ class okx extends okx$1["default"] {
|
|
|
1338
1393
|
},
|
|
1339
1394
|
'commonCurrencies': {
|
|
1340
1395
|
// the exchange refers to ERC20 version of Aeternity (AEToken)
|
|
1341
|
-
'AE': 'AET',
|
|
1342
|
-
'WIN': 'WINTOKEN', // https://github.com/ccxt/ccxt/issues/5701
|
|
1396
|
+
'AE': 'AET', // https://github.com/ccxt/ccxt/issues/4981
|
|
1343
1397
|
},
|
|
1344
1398
|
});
|
|
1345
1399
|
}
|
package/dist/cjs/src/paradex.js
CHANGED
|
@@ -71,9 +71,9 @@ class paradex extends paradex$1["default"] {
|
|
|
71
71
|
'fetchDeposits': true,
|
|
72
72
|
'fetchDepositWithdrawFee': false,
|
|
73
73
|
'fetchDepositWithdrawFees': false,
|
|
74
|
-
'fetchFundingHistory':
|
|
74
|
+
'fetchFundingHistory': true,
|
|
75
75
|
'fetchFundingRate': false,
|
|
76
|
-
'fetchFundingRateHistory':
|
|
76
|
+
'fetchFundingRateHistory': true,
|
|
77
77
|
'fetchFundingRates': false,
|
|
78
78
|
'fetchGreeks': true,
|
|
79
79
|
'fetchIndexOHLCV': false,
|
|
@@ -631,6 +631,7 @@ class paradex extends paradex$1["default"] {
|
|
|
631
631
|
* @param {int} [limit] the maximum amount of candles to fetch
|
|
632
632
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
633
633
|
* @param {int} [params.until] timestamp in ms of the latest candle to fetch
|
|
634
|
+
* @param {string} [params.price] "last", "mark", "index", default is "last"
|
|
634
635
|
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
635
636
|
*/
|
|
636
637
|
async fetchOHLCV(symbol, timeframe = '1m', since = undefined, limit = undefined, params = {}) {
|
|
@@ -643,7 +644,11 @@ class paradex extends paradex$1["default"] {
|
|
|
643
644
|
const now = this.milliseconds();
|
|
644
645
|
const duration = this.parseTimeframe(timeframe);
|
|
645
646
|
const until = this.safeInteger2(params, 'until', 'till', now);
|
|
646
|
-
|
|
647
|
+
const price = this.safeString(params, 'price');
|
|
648
|
+
if (price !== undefined) {
|
|
649
|
+
request['price_kind'] = price;
|
|
650
|
+
}
|
|
651
|
+
params = this.omit(params, ['until', 'till', 'price']);
|
|
647
652
|
if (since !== undefined) {
|
|
648
653
|
request['start_at'] = since;
|
|
649
654
|
if (limit !== undefined) {
|
|
@@ -2527,6 +2532,76 @@ class paradex extends paradex$1["default"] {
|
|
|
2527
2532
|
'info': greeks,
|
|
2528
2533
|
};
|
|
2529
2534
|
}
|
|
2535
|
+
/**
|
|
2536
|
+
* @method
|
|
2537
|
+
* @name paradex#fetchFundingRateHistory
|
|
2538
|
+
* @description fetches historical funding rate prices
|
|
2539
|
+
* @see https://docs.paradex.trade/api/prod/markets/get-funding-data
|
|
2540
|
+
* @param {string} symbol unified symbol of the market to fetch the funding rate history for
|
|
2541
|
+
* @param {int} [since] timestamp in ms of the earliest funding rate to fetch
|
|
2542
|
+
* @param {int} [limit] the maximum amount of funding rate structures
|
|
2543
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2544
|
+
* @param {int} [params.until] timestamp in ms of the latest funding rate to fetch
|
|
2545
|
+
* @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/#/?id=funding-rate-history-structure}
|
|
2546
|
+
*/
|
|
2547
|
+
async fetchFundingRateHistory(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
|
2548
|
+
if (symbol === undefined) {
|
|
2549
|
+
throw new errors.ArgumentsRequired(this.id + ' fetchFundingRateHistory() requires a symbol argument');
|
|
2550
|
+
}
|
|
2551
|
+
await this.loadMarkets();
|
|
2552
|
+
const market = this.market(symbol);
|
|
2553
|
+
const request = {
|
|
2554
|
+
'market': market['id'],
|
|
2555
|
+
};
|
|
2556
|
+
if (limit !== undefined) {
|
|
2557
|
+
request['page_size'] = Math.min(limit, 5000); // api maximum 5000
|
|
2558
|
+
}
|
|
2559
|
+
else {
|
|
2560
|
+
request['page_size'] = 1000; // max is 5000
|
|
2561
|
+
}
|
|
2562
|
+
if (since !== undefined) {
|
|
2563
|
+
request['start_at'] = since;
|
|
2564
|
+
}
|
|
2565
|
+
const until = this.safeInteger(params, 'until');
|
|
2566
|
+
if (until !== undefined) {
|
|
2567
|
+
params = this.omit(params, 'until');
|
|
2568
|
+
request['end_at'] = until;
|
|
2569
|
+
}
|
|
2570
|
+
const response = await this.publicGetFundingData(this.extend(request, params));
|
|
2571
|
+
//
|
|
2572
|
+
// {
|
|
2573
|
+
// "next": "eyJmaWx0ZXIiMsIm1hcmtlciI6eyJtYXJrZXIiOiIxNjc1NjUwMDE3NDMxMTAxNjk5N=",
|
|
2574
|
+
// "prev": "eyJmaWx0ZXIiOnsiTGltaXQiOjkwfSwidGltZSI6MTY4MTY3OTgzNzk3MTMwOTk1MywibWFya2VyIjp7Im1zMjExMD==",
|
|
2575
|
+
// "results": [
|
|
2576
|
+
// {
|
|
2577
|
+
// "market":"BTC-USD-PERP",
|
|
2578
|
+
// "funding_index":"20511.93608234044552",
|
|
2579
|
+
// "funding_premium":"-6.04646651485986656",
|
|
2580
|
+
// "funding_rate":"-0.00006992598926",
|
|
2581
|
+
// "funding_rate_8h":"",
|
|
2582
|
+
// "funding_period_hours":0,
|
|
2583
|
+
// "created_at":1764160327843
|
|
2584
|
+
// }
|
|
2585
|
+
// ]
|
|
2586
|
+
// }
|
|
2587
|
+
//
|
|
2588
|
+
const results = this.safeList(response, 'results', []);
|
|
2589
|
+
const rates = [];
|
|
2590
|
+
for (let i = 0; i < results.length; i++) {
|
|
2591
|
+
const rate = results[i];
|
|
2592
|
+
const timestamp = this.safeInteger(rate, 'created_at');
|
|
2593
|
+
const datetime = this.iso8601(timestamp);
|
|
2594
|
+
rates.push({
|
|
2595
|
+
'info': rate,
|
|
2596
|
+
'symbol': market['symbol'],
|
|
2597
|
+
'fundingRate': this.safeNumber(rate, 'funding_rate'),
|
|
2598
|
+
'timestamp': timestamp,
|
|
2599
|
+
'datetime': datetime,
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
const sorted = this.sortBy(rates, 'timestamp');
|
|
2603
|
+
return this.filterBySymbolSinceLimit(sorted, market['symbol'], since, limit);
|
|
2604
|
+
}
|
|
2530
2605
|
sign(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined) {
|
|
2531
2606
|
let url = this.implodeHostname(this.urls['api'][this.version]) + '/' + this.implodeParams(path, params);
|
|
2532
2607
|
const query = this.omit(params, this.extractParams(path));
|