ccxt 4.3.68 → 4.3.70

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.
Files changed (76) hide show
  1. package/README.md +6 -6
  2. package/dist/ccxt.browser.min.js +5 -5
  3. package/dist/cjs/ccxt.js +3 -1
  4. package/dist/cjs/src/ascendex.js +1 -1
  5. package/dist/cjs/src/base/Exchange.js +365 -353
  6. package/dist/cjs/src/binance.js +1 -1
  7. package/dist/cjs/src/bingx.js +134 -75
  8. package/dist/cjs/src/blofin.js +63 -6
  9. package/dist/cjs/src/btcbox.js +2 -1
  10. package/dist/cjs/src/bybit.js +1 -1
  11. package/dist/cjs/src/coinbaseinternational.js +247 -3
  12. package/dist/cjs/src/cryptocom.js +9 -1
  13. package/dist/cjs/src/hitbtc.js +1 -1
  14. package/dist/cjs/src/hyperliquid.js +0 -3
  15. package/dist/cjs/src/kucoin.js +12 -5
  16. package/dist/cjs/src/oxfun.js +2 -2
  17. package/dist/cjs/src/poloniex.js +34 -33
  18. package/dist/cjs/src/poloniexfutures.js +26 -26
  19. package/dist/cjs/src/pro/blofin.js +665 -0
  20. package/dist/cjs/src/pro/coinbaseinternational.js +154 -9
  21. package/dist/cjs/src/pro/cryptocom.js +3 -1
  22. package/dist/cjs/src/pro/hitbtc.js +26 -8
  23. package/dist/cjs/src/pro/okx.js +7 -0
  24. package/dist/cjs/src/pro/poloniex.js +50 -25
  25. package/dist/cjs/src/pro/poloniexfutures.js +5 -5
  26. package/dist/cjs/src/pro/woo.js +5 -4
  27. package/js/ccxt.d.ts +6 -3
  28. package/js/ccxt.js +3 -1
  29. package/js/src/abstract/coinbaseinternational.d.ts +1 -1
  30. package/js/src/ascendex.js +1 -1
  31. package/js/src/base/Exchange.d.ts +108 -82
  32. package/js/src/base/Exchange.js +365 -353
  33. package/js/src/base/types.d.ts +0 -2
  34. package/js/src/binance.d.ts +2 -2
  35. package/js/src/binance.js +1 -1
  36. package/js/src/bingx.d.ts +2 -2
  37. package/js/src/bingx.js +134 -75
  38. package/js/src/bitget.d.ts +2 -2
  39. package/js/src/bitmart.d.ts +2 -2
  40. package/js/src/bitrue.d.ts +2 -2
  41. package/js/src/blofin.d.ts +1 -1
  42. package/js/src/blofin.js +63 -6
  43. package/js/src/btcbox.js +2 -1
  44. package/js/src/bybit.d.ts +2 -2
  45. package/js/src/bybit.js +1 -1
  46. package/js/src/coinbaseinternational.d.ts +17 -1
  47. package/js/src/coinbaseinternational.js +247 -3
  48. package/js/src/coinex.d.ts +2 -2
  49. package/js/src/coinlist.d.ts +2 -2
  50. package/js/src/cryptocom.js +10 -2
  51. package/js/src/deribit.d.ts +2 -2
  52. package/js/src/digifinex.d.ts +2 -2
  53. package/js/src/hitbtc.js +1 -1
  54. package/js/src/hyperliquid.js +0 -3
  55. package/js/src/kucoin.js +12 -5
  56. package/js/src/latoken.d.ts +2 -2
  57. package/js/src/mexc.d.ts +2 -2
  58. package/js/src/okx.d.ts +2 -2
  59. package/js/src/oxfun.d.ts +1 -1
  60. package/js/src/oxfun.js +2 -2
  61. package/js/src/phemex.d.ts +2 -2
  62. package/js/src/poloniex.js +34 -33
  63. package/js/src/poloniexfutures.js +26 -26
  64. package/js/src/pro/blofin.d.ts +39 -0
  65. package/js/src/pro/blofin.js +668 -0
  66. package/js/src/pro/coinbaseinternational.d.ts +5 -1
  67. package/js/src/pro/coinbaseinternational.js +155 -10
  68. package/js/src/pro/cryptocom.js +4 -2
  69. package/js/src/pro/hitbtc.d.ts +1 -1
  70. package/js/src/pro/hitbtc.js +26 -8
  71. package/js/src/pro/okx.js +7 -0
  72. package/js/src/pro/poloniex.js +50 -25
  73. package/js/src/pro/poloniexfutures.js +5 -5
  74. package/js/src/pro/woo.js +5 -4
  75. package/js/src/woo.d.ts +2 -2
  76. package/package.json +1 -1
@@ -101,7 +101,7 @@ export default class poloniex extends Exchange {
101
101
  'rest': 'https://sand-spot-api-gateway.poloniex.com',
102
102
  },
103
103
  'www': 'https://www.poloniex.com',
104
- 'doc': 'https://docs.poloniex.com',
104
+ 'doc': 'https://api-docs.poloniex.com/spot/',
105
105
  'fees': 'https://poloniex.com/fees',
106
106
  'referral': 'https://poloniex.com/signup?c=UBFZJRPJ',
107
107
  },
@@ -347,6 +347,7 @@ export default class poloniex extends Exchange {
347
347
  '21350': InvalidOrder,
348
348
  '21355': ExchangeError,
349
349
  '21356': BadRequest,
350
+ '21721': InsufficientFunds,
350
351
  '24101': BadSymbol,
351
352
  '24102': InvalidOrder,
352
353
  '24103': InvalidOrder,
@@ -414,7 +415,7 @@ export default class poloniex extends Exchange {
414
415
  * @method
415
416
  * @name poloniex#fetchOHLCV
416
417
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
417
- * @see https://docs.poloniex.com/#public-endpoints-market-data-candles
418
+ * @see https://api-docs.poloniex.com/spot/api/public/market-data#candles
418
419
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
419
420
  * @param {string} timeframe the length of time each candle represents
420
421
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -479,7 +480,7 @@ export default class poloniex extends Exchange {
479
480
  * @method
480
481
  * @name poloniex#fetchMarkets
481
482
  * @description retrieves data on all markets for poloniex
482
- * @see https://docs.poloniex.com/#public-endpoints-reference-data-symbol-information
483
+ * @see https://api-docs.poloniex.com/spot/api/public/reference-data#symbol-information
483
484
  * @param {object} [params] extra parameters specific to the exchange API endpoint
484
485
  * @returns {object[]} an array of objects representing market data
485
486
  */
@@ -570,7 +571,7 @@ export default class poloniex extends Exchange {
570
571
  * @method
571
572
  * @name poloniex#fetchTime
572
573
  * @description fetches the current integer timestamp in milliseconds from the exchange server
573
- * @see https://docs.poloniex.com/#public-endpoints-reference-data-system-timestamp
574
+ * @see https://api-docs.poloniex.com/spot/api/public/reference-data#system-timestamp
574
575
  * @param {object} [params] extra parameters specific to the exchange API endpoint
575
576
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
576
577
  */
@@ -637,7 +638,7 @@ export default class poloniex extends Exchange {
637
638
  * @method
638
639
  * @name poloniex#fetchTickers
639
640
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
640
- * @see https://docs.poloniex.com/#public-endpoints-market-data-ticker
641
+ * @see https://api-docs.poloniex.com/spot/api/public/market-data#ticker
641
642
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
642
643
  * @param {object} [params] extra parameters specific to the exchange API endpoint
643
644
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -676,7 +677,7 @@ export default class poloniex extends Exchange {
676
677
  * @method
677
678
  * @name poloniex#fetchCurrencies
678
679
  * @description fetches all available currencies on an exchange
679
- * @see https://docs.poloniex.com/#public-endpoints-reference-data-currency-information
680
+ * @see https://api-docs.poloniex.com/spot/api/public/reference-data#currency-information
680
681
  * @param {object} [params] extra parameters specific to the exchange API endpoint
681
682
  * @returns {object} an associative dictionary of currencies
682
683
  */
@@ -814,7 +815,7 @@ export default class poloniex extends Exchange {
814
815
  * @method
815
816
  * @name poloniex#fetchTicker
816
817
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
817
- * @see https://docs.poloniex.com/#public-endpoints-market-data-ticker
818
+ * @see https://api-docs.poloniex.com/spot/api/public/market-data#ticker
818
819
  * @param {string} symbol unified symbol of the market to fetch the ticker for
819
820
  * @param {object} [params] extra parameters specific to the exchange API endpoint
820
821
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -945,7 +946,7 @@ export default class poloniex extends Exchange {
945
946
  * @method
946
947
  * @name poloniex#fetchTrades
947
948
  * @description get the list of most recent trades for a particular symbol
948
- * @see https://docs.poloniex.com/#public-endpoints-market-data-trades
949
+ * @see https://api-docs.poloniex.com/spot/api/public/market-data#trades
949
950
  * @param {string} symbol unified symbol of the market to fetch trades for
950
951
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
951
952
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -981,7 +982,7 @@ export default class poloniex extends Exchange {
981
982
  * @method
982
983
  * @name poloniex#fetchMyTrades
983
984
  * @description fetch all trades made by the user
984
- * @see https://docs.poloniex.com/#authenticated-endpoints-trades-trade-history
985
+ * @see https://api-docs.poloniex.com/spot/api/private/trade#trade-history
985
986
  * @param {string} symbol unified market symbol
986
987
  * @param {int} [since] the earliest time in ms to fetch trades for
987
988
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -1192,8 +1193,8 @@ export default class poloniex extends Exchange {
1192
1193
  * @method
1193
1194
  * @name poloniex#fetchOpenOrders
1194
1195
  * @description fetch all unfilled currently open orders
1195
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-open-orders
1196
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1196
+ * @see https://api-docs.poloniex.com/spot/api/private/order#open-orders
1197
+ * @see https://api-docs.poloniex.com/spot/api/private/smart-order#open-orders // trigger orders
1197
1198
  * @param {string} symbol unified market symbol
1198
1199
  * @param {int} [since] the earliest time in ms to fetch open orders for
1199
1200
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -1251,8 +1252,8 @@ export default class poloniex extends Exchange {
1251
1252
  * @method
1252
1253
  * @name poloniex#createOrder
1253
1254
  * @description create a trade order
1254
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-create-order
1255
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-create-order // trigger orders
1255
+ * @see https://api-docs.poloniex.com/spot/api/private/order#create-order
1256
+ * @see https://api-docs.poloniex.com/spot/api/private/smart-order#create-order // trigger orders
1256
1257
  * @param {string} symbol unified symbol of the market to create an order in
1257
1258
  * @param {string} type 'market' or 'limit'
1258
1259
  * @param {string} side 'buy' or 'sell'
@@ -1357,8 +1358,8 @@ export default class poloniex extends Exchange {
1357
1358
  * @method
1358
1359
  * @name poloniex#editOrder
1359
1360
  * @description edit a trade order
1360
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-replace-order
1361
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-replace-order
1361
+ * @see https://api-docs.poloniex.com/spot/api/private/order#cancel-replace-order
1362
+ * @see https://api-docs.poloniex.com/spot/api/private/smart-order#cancel-replace-order
1362
1363
  * @param {string} id order id
1363
1364
  * @param {string} symbol unified symbol of the market to create an order in
1364
1365
  * @param {string} type 'market' or 'limit'
@@ -1404,8 +1405,8 @@ export default class poloniex extends Exchange {
1404
1405
  // @method
1405
1406
  // @name poloniex#cancelOrder
1406
1407
  // @description cancels an open order
1407
- // @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-order-by-id
1408
- // @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-order-by-id // trigger orders
1408
+ // @see https://api-docs.poloniex.com/spot/api/private/order#cancel-order-by-id
1409
+ // @see https://api-docs.poloniex.com/spot/api/private/smart-order#cancel-order-by-id // trigger orders
1409
1410
  // @param {string} id order id
1410
1411
  // @param {string} symbol unified symbol of the market the order was made in
1411
1412
  // @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1444,8 +1445,8 @@ export default class poloniex extends Exchange {
1444
1445
  * @method
1445
1446
  * @name poloniex#cancelAllOrders
1446
1447
  * @description cancel all open orders
1447
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-cancel-all-orders
1448
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-cancel-all-orders // trigger orders
1448
+ * @see https://api-docs.poloniex.com/spot/api/private/order#cancel-all-orders
1449
+ * @see https://api-docs.poloniex.com/spot/api/private/smart-order#cancel-all-orders // trigger orders
1449
1450
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
1450
1451
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1451
1452
  * @param {boolean} [params.trigger] true if canceling trigger orders
@@ -1496,8 +1497,8 @@ export default class poloniex extends Exchange {
1496
1497
  * @method
1497
1498
  * @name poloniex#fetchOrder
1498
1499
  * @description fetch an order by it's id
1499
- * @see https://docs.poloniex.com/#authenticated-endpoints-orders-order-details
1500
- * @see https://docs.poloniex.com/#authenticated-endpoints-smart-orders-open-orders // trigger orders
1500
+ * @see https://api-docs.poloniex.com/spot/api/private/order#order-details
1501
+ * @see https://api-docs.poloniex.com/spot/api/private/smart-order#open-orders // trigger orders
1501
1502
  * @param {string} id order id
1502
1503
  * @param {string} symbol unified market symbol, default is undefined
1503
1504
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1555,7 +1556,7 @@ export default class poloniex extends Exchange {
1555
1556
  * @method
1556
1557
  * @name poloniex#fetchOrderTrades
1557
1558
  * @description fetch all the trades made from a single order
1558
- * @see https://docs.poloniex.com/#authenticated-endpoints-trades-trades-by-order-id
1559
+ * @see https://api-docs.poloniex.com/spot/api/private/trade#trades-by-order-id
1559
1560
  * @param {string} id order id
1560
1561
  * @param {string} symbol unified market symbol
1561
1562
  * @param {int} [since] the earliest time in ms to fetch trades for
@@ -1617,7 +1618,7 @@ export default class poloniex extends Exchange {
1617
1618
  * @method
1618
1619
  * @name poloniex#fetchBalance
1619
1620
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1620
- * @see https://docs.poloniex.com/#authenticated-endpoints-accounts-all-account-balances
1621
+ * @see https://api-docs.poloniex.com/spot/api/private/account#all-account-balances
1621
1622
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1622
1623
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1623
1624
  */
@@ -1649,7 +1650,7 @@ export default class poloniex extends Exchange {
1649
1650
  * @method
1650
1651
  * @name poloniex#fetchTradingFees
1651
1652
  * @description fetch the trading fees for multiple markets
1652
- * @see https://docs.poloniex.com/#authenticated-endpoints-accounts-fee-info
1653
+ * @see https://api-docs.poloniex.com/spot/api/private/account#fee-info
1653
1654
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1654
1655
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
1655
1656
  */
@@ -1682,7 +1683,7 @@ export default class poloniex extends Exchange {
1682
1683
  * @method
1683
1684
  * @name poloniex#fetchOrderBook
1684
1685
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1685
- * @see https://docs.poloniex.com/#public-endpoints-market-data-order-book
1686
+ * @see https://api-docs.poloniex.com/spot/api/public/market-data#order-book
1686
1687
  * @param {string} symbol unified symbol of the market to fetch the order book for
1687
1688
  * @param {int} [limit] the maximum amount of order book entries to return
1688
1689
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1739,7 +1740,7 @@ export default class poloniex extends Exchange {
1739
1740
  * @method
1740
1741
  * @name poloniex#createDepositAddress
1741
1742
  * @description create a currency deposit address
1742
- * @see https://docs.poloniex.com/#authenticated-endpoints-wallets-deposit-addresses
1743
+ * @see https://api-docs.poloniex.com/spot/api/private/wallet#deposit-addresses
1743
1744
  * @param {string} code unified currency code of the currency for the deposit address
1744
1745
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1745
1746
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -1790,7 +1791,7 @@ export default class poloniex extends Exchange {
1790
1791
  * @method
1791
1792
  * @name poloniex#fetchDepositAddress
1792
1793
  * @description fetch the deposit address for a currency associated with this account
1793
- * @see https://docs.poloniex.com/#authenticated-endpoints-wallets-deposit-addresses
1794
+ * @see https://api-docs.poloniex.com/spot/api/private/wallet#deposit-addresses
1794
1795
  * @param {string} code unified currency code
1795
1796
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1796
1797
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -1841,7 +1842,7 @@ export default class poloniex extends Exchange {
1841
1842
  * @method
1842
1843
  * @name poloniex#transfer
1843
1844
  * @description transfer currency internally between wallets on the same account
1844
- * @see https://docs.poloniex.com/#authenticated-endpoints-accounts-accounts-transfer
1845
+ * @see https://api-docs.poloniex.com/spot/api/private/account#accounts-transfer
1845
1846
  * @param {string} code unified currency code
1846
1847
  * @param {float} amount amount to transfer
1847
1848
  * @param {string} fromAccount account to transfer from
@@ -1891,7 +1892,7 @@ export default class poloniex extends Exchange {
1891
1892
  * @method
1892
1893
  * @name poloniex#withdraw
1893
1894
  * @description make a withdrawal
1894
- * @see https://docs.poloniex.com/#authenticated-endpoints-wallets-withdraw-currency
1895
+ * @see https://api-docs.poloniex.com/spot/api/private/wallet#withdraw-currency
1895
1896
  * @param {string} code unified currency code
1896
1897
  * @param {float} amount the amount to withdraw
1897
1898
  * @param {string} address the address to withdraw to
@@ -2016,7 +2017,7 @@ export default class poloniex extends Exchange {
2016
2017
  * @method
2017
2018
  * @name poloniex#fetchDepositsWithdrawals
2018
2019
  * @description fetch history of deposits and withdrawals
2019
- * @see https://docs.poloniex.com/#authenticated-endpoints-wallets-wallets-activity-records
2020
+ * @see https://api-docs.poloniex.com/spot/api/private/wallet#wallets-activity-records
2020
2021
  * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
2021
2022
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
2022
2023
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
@@ -2041,7 +2042,7 @@ export default class poloniex extends Exchange {
2041
2042
  * @method
2042
2043
  * @name poloniex#fetchWithdrawals
2043
2044
  * @description fetch all withdrawals made from an account
2044
- * @see https://docs.poloniex.com/#authenticated-endpoints-wallets-wallets-activity-records
2045
+ * @see https://api-docs.poloniex.com/spot/api/private/wallet#wallets-activity-records
2045
2046
  * @param {string} code unified currency code
2046
2047
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
2047
2048
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -2062,7 +2063,7 @@ export default class poloniex extends Exchange {
2062
2063
  * @method
2063
2064
  * @name poloniex#fetchDepositWithdrawFees
2064
2065
  * @description fetch deposit and withdraw fees
2065
- * @see https://docs.poloniex.com/#public-endpoints-reference-data-currency-information
2066
+ * @see https://api-docs.poloniex.com/spot/api/public/reference-data#currency-information
2066
2067
  * @param {string[]|undefined} codes list of unified currency codes
2067
2068
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2068
2069
  * @returns {object[]} a list of [fees structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
@@ -2187,7 +2188,7 @@ export default class poloniex extends Exchange {
2187
2188
  * @method
2188
2189
  * @name poloniex#fetchDeposits
2189
2190
  * @description fetch all deposits made to an account
2190
- * @see https://docs.poloniex.com/#authenticated-endpoints-wallets-wallets-activity-records
2191
+ * @see https://api-docs.poloniex.com/spot/api/private/wallet#wallets-activity-records
2191
2192
  * @param {string} code unified currency code
2192
2193
  * @param {int} [since] the earliest time in ms to fetch deposits for
2193
2194
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -76,7 +76,7 @@ export default class poloniexfutures extends Exchange {
76
76
  'private': 'https://futures-api.poloniex.com',
77
77
  },
78
78
  'www': 'https://www.poloniex.com',
79
- 'doc': 'https://futures-docs.poloniex.com',
79
+ 'doc': 'https://api-docs.poloniex.com/futures/',
80
80
  'fees': 'https://poloniex.com/fee-schedule',
81
81
  'referral': 'https://poloniex.com/signup?c=UBFZJRPJ',
82
82
  },
@@ -211,7 +211,7 @@ export default class poloniexfutures extends Exchange {
211
211
  * @method
212
212
  * @name poloniexfutures#fetchMarkets
213
213
  * @description retrieves data on all markets for poloniexfutures
214
- * @see https://futures-docs.poloniex.com/#symbol-2
214
+ * @see https://api-docs.poloniex.com/futures/api/symbol
215
215
  * @param {object} [params] extra parameters specific to the exchange API endpoint
216
216
  * @returns {object[]} an array of objects representing market data
217
217
  */
@@ -423,7 +423,7 @@ export default class poloniexfutures extends Exchange {
423
423
  * @method
424
424
  * @name poloniexfutures#fetchTicker
425
425
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
426
- * @see https://futures-docs.poloniex.com/#get-real-time-ticker-2-0
426
+ * @see https://api-docs.poloniex.com/futures/api/ticker#get-real-time-ticker-20
427
427
  * @param {string} symbol unified symbol of the market to fetch the ticker for
428
428
  * @param {object} [params] extra parameters specific to the exchange API endpoint
429
429
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -459,7 +459,7 @@ export default class poloniexfutures extends Exchange {
459
459
  * @method
460
460
  * @name poloniexfutures#fetchTickers
461
461
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
462
- * @see https://futures-docs.poloniex.com/#get-real-time-ticker-of-all-symbols
462
+ * @see https://api-docs.poloniex.com/futures/api/ticker#get-real-time-ticker-of-all-symbols
463
463
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
464
464
  * @param {object} [params] extra parameters specific to the exchange API endpoint
465
465
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -474,8 +474,8 @@ export default class poloniexfutures extends Exchange {
474
474
  * @method
475
475
  * @name poloniexfuturesfutures#fetchOrderBook
476
476
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
477
- * @see https://futures-docs.poloniex.com/#get-full-order-book-level-2
478
- * @see https://futures-docs.poloniex.com/#get-full-order-book-level-3
477
+ * @see https://api-docs.poloniex.com/futures/api/orderbook#get-full-order-book---level-2
478
+ * @see https://api-docs.poloniex.com/futures/api/orderbook#get-full-order-book--level-3
479
479
  * @param {string} symbol unified symbol of the market to fetch the order book for
480
480
  * @param {int} [limit] the maximum amount of order book entries to return
481
481
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -561,7 +561,7 @@ export default class poloniexfutures extends Exchange {
561
561
  * @method
562
562
  * @name poloniexfutures#fetchL3OrderBook
563
563
  * @description fetches level 3 information on open orders with bid (buy) and ask (sell) prices, volumes and other data
564
- * @see https://futures-docs.poloniex.com/#get-full-order-book-level-3
564
+ * @see https://api-docs.poloniex.com/futures/api/orderbook#get-full-order-book--level-3
565
565
  * @param {string} symbol unified market symbol
566
566
  * @param {int} [limit] max number of orders to return, default is undefined
567
567
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -668,7 +668,7 @@ export default class poloniexfutures extends Exchange {
668
668
  * @method
669
669
  * @name poloniexfutures#fetchTrades
670
670
  * @description get the list of most recent trades for a particular symbol
671
- * @see https://futures-docs.poloniex.com/#historical-data
671
+ * @see https://api-docs.poloniex.com/futures/api/historical#transaction-history
672
672
  * @param {string} symbol unified symbol of the market to fetch trades for
673
673
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
674
674
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -705,7 +705,7 @@ export default class poloniexfutures extends Exchange {
705
705
  * @method
706
706
  * @name poloniexfutures#fetchTime
707
707
  * @description fetches the current integer timestamp in milliseconds from the poloniexfutures server
708
- * @see https://futures-docs.poloniex.com/#time
708
+ * @see https://api-docs.poloniex.com/futures/api/time#server-time
709
709
  * @param {object} [params] extra parameters specific to the exchange API endpoint
710
710
  * @returns {int} the current integer timestamp in milliseconds from the poloniexfutures server
711
711
  */
@@ -724,7 +724,7 @@ export default class poloniexfutures extends Exchange {
724
724
  * @method
725
725
  * @name poloniexfutures#fetchOHLCV
726
726
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
727
- * @see https://futures-docs.poloniex.com/#k-chart
727
+ * @see https://api-docs.poloniex.com/futures/api/kline#get-k-line-data-of-contract
728
728
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
729
729
  * @param {string} timeframe the length of time each candle represents
730
730
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -793,7 +793,7 @@ export default class poloniexfutures extends Exchange {
793
793
  * @method
794
794
  * @name poloniexfutures#fetchBalance
795
795
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
796
- * @see https://futures-docs.poloniex.com/#get-account-overview
796
+ * @see https://api-docs.poloniex.com/futures/api/account#get-account-overview
797
797
  * @param {object} [params] extra parameters specific to the exchange API endpoint
798
798
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
799
799
  */
@@ -829,7 +829,7 @@ export default class poloniexfutures extends Exchange {
829
829
  * @method
830
830
  * @name poloniexfutures#createOrder
831
831
  * @description Create an order on the exchange
832
- * @see https://futures-docs.poloniex.com/#place-an-order
832
+ * @see https://api-docs.poloniex.com/futures/api/orders#place-an-order
833
833
  * @param {string} symbol Unified CCXT market symbol
834
834
  * @param {string} type 'limit' or 'market'
835
835
  * @param {string} side 'buy' or 'sell'
@@ -937,7 +937,7 @@ export default class poloniexfutures extends Exchange {
937
937
  * @method
938
938
  * @name poloniexfutures#cancelOrder
939
939
  * @description cancels an open order
940
- * @see https://futures-docs.poloniex.com/#cancel-an-order
940
+ * @see https://api-docs.poloniex.com/futures/api/orders#cancel-an-order
941
941
  * @param {string} id order id
942
942
  * @param {string} symbol unified symbol of the market the order was made in
943
943
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -977,7 +977,7 @@ export default class poloniexfutures extends Exchange {
977
977
  * @method
978
978
  * @name poloniexfutures#fetchPositions
979
979
  * @description fetch all open positions
980
- * @see https://futures-docs.poloniex.com/#get-position-list
980
+ * @see https://api-docs.poloniex.com/futures/api/positions#get-position-list
981
981
  * @param {string[]|undefined} symbols list of unified market symbols
982
982
  * @param {object} [params] extra parameters specific to the exchange API endpoint
983
983
  * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/#/?id=position-structure}
@@ -1131,7 +1131,7 @@ export default class poloniexfutures extends Exchange {
1131
1131
  * @method
1132
1132
  * @name poloniexfutures#fetchFundingHistory
1133
1133
  * @description fetch the history of funding payments paid and received on this account
1134
- * @see https://futures-docs.poloniex.com/#get-funding-history
1134
+ * @see https://api-docs.poloniex.com/futures/api/funding-fees#get-funding-history
1135
1135
  * @param {string} symbol unified market symbol
1136
1136
  * @param {int} [since] the earliest time in ms to fetch funding history for
1137
1137
  * @param {int} [limit] the maximum number of funding history structures to retrieve
@@ -1270,8 +1270,8 @@ export default class poloniexfutures extends Exchange {
1270
1270
  * @method
1271
1271
  * @name poloniexfutures#fetchOrdersByStatus
1272
1272
  * @description fetches a list of orders placed on the exchange
1273
- * @see https://futures-docs.poloniex.com/#get-order-list
1274
- * @see https://futures-docs.poloniex.com/#get-untriggered-stop-order-list
1273
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-order-listdeprecated
1274
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-untriggered-stop-order-list
1275
1275
  * @param {string} status 'active' or 'closed', only 'active' is valid for stop orders
1276
1276
  * @param {string} symbol unified symbol for the market to retrieve orders from
1277
1277
  * @param {int} [since] timestamp in ms of the earliest order to retrieve
@@ -1380,8 +1380,8 @@ export default class poloniexfutures extends Exchange {
1380
1380
  * @method
1381
1381
  * @name poloniexfutures#fetchOpenOrders
1382
1382
  * @description fetch all unfilled currently open orders
1383
- * @see https://futures-docs.poloniex.com/#get-order-list
1384
- * @see https://futures-docs.poloniex.com/#get-untriggered-stop-order-list
1383
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-order-listdeprecated
1384
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-untriggered-stop-order-list
1385
1385
  * @param {string} symbol unified market symbol
1386
1386
  * @param {int} [since] the earliest time in ms to fetch open orders for
1387
1387
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -1398,8 +1398,8 @@ export default class poloniexfutures extends Exchange {
1398
1398
  * @method
1399
1399
  * @name poloniexfutures#fetchClosedOrders
1400
1400
  * @description fetches information on multiple closed orders made by the user
1401
- * @see https://futures-docs.poloniex.com/#get-order-list
1402
- * @see https://futures-docs.poloniex.com/#get-untriggered-stop-order-list
1401
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-order-listdeprecated
1402
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-untriggered-stop-order-list
1403
1403
  * @param {string} symbol unified market symbol of the market orders were made in
1404
1404
  * @param {int} [since] the earliest time in ms to fetch orders for
1405
1405
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -1416,8 +1416,8 @@ export default class poloniexfutures extends Exchange {
1416
1416
  * @method
1417
1417
  * @name poloniexfutures#fetchOrder
1418
1418
  * @description fetches information on an order made by the user
1419
- * @see https://futures-docs.poloniex.com/#get-details-of-a-single-order
1420
- * @see https://futures-docs.poloniex.com/#get-single-order-by-clientoid
1419
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-details-of-a-single-order
1420
+ * @see https://api-docs.poloniex.com/futures/api/orders#get-single-order-by-clientoid
1421
1421
  * @param {string} symbol unified symbol of the market the order was made in
1422
1422
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1423
1423
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1616,7 +1616,7 @@ export default class poloniexfutures extends Exchange {
1616
1616
  * @method
1617
1617
  * @name poloniexfutures#fetchFundingRate
1618
1618
  * @description fetch the current funding rate
1619
- * @see https://futures-docs.poloniex.com/#get-premium-index
1619
+ * @see https://api-docs.poloniex.com/futures/api/futures-index#get-premium-index
1620
1620
  * @param {string} symbol unified market symbol
1621
1621
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1622
1622
  * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/#/?id=funding-rate-structure}
@@ -1664,7 +1664,7 @@ export default class poloniexfutures extends Exchange {
1664
1664
  * @method
1665
1665
  * @name poloniexfutures#fetchMyTrades
1666
1666
  * @description fetch all trades made by the user
1667
- * @see https://futures-docs.poloniex.com/#get-fills
1667
+ * @see https://api-docs.poloniex.com/futures/api/fills#get-fillsdeprecated
1668
1668
  * @param {string} symbol unified market symbol
1669
1669
  * @param {int} [since] the earliest time in ms to fetch trades for
1670
1670
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -1728,7 +1728,7 @@ export default class poloniexfutures extends Exchange {
1728
1728
  * @method
1729
1729
  * @name poloniexfutures#setMarginMode
1730
1730
  * @description set margin mode to 'cross' or 'isolated'
1731
- * @see https://futures-docs.poloniex.com/#change-margin-mode
1731
+ * @see https://api-docs.poloniex.com/futures/api/margin-mode#change-margin-mode
1732
1732
  * @param {string} marginMode "0" (isolated) or "1" (cross)
1733
1733
  * @param {string} symbol unified market symbol
1734
1734
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -0,0 +1,39 @@
1
+ import blofinRest from '../blofin.js';
2
+ import type { Int, Market, Trade, OrderBook, Strings, Ticker, Tickers, OHLCV, Balances, Str, Order, Position } from '../base/types.js';
3
+ import Client from '../base/ws/Client.js';
4
+ export default class blofin extends blofinRest {
5
+ describe(): any;
6
+ ping(client: any): string;
7
+ handlePong(client: Client, message: any): void;
8
+ watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
9
+ watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
10
+ handleTrades(client: Client, message: any): void;
11
+ parseWsTrade(trade: any, market?: Market): Trade;
12
+ watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
13
+ watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
14
+ handleOrderBook(client: Client, message: any): void;
15
+ watchTicker(symbol: string, params?: {}): Promise<Ticker>;
16
+ watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
17
+ handleTicker(client: Client, message: any): void;
18
+ parseWsTicker(ticker: any, market?: Market): Ticker;
19
+ watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
20
+ watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<import("../base/types.js").Dictionary<import("../base/types.js").Dictionary<OHLCV[]>>>;
21
+ handleOHLCV(client: Client, message: any): void;
22
+ watchBalance(params?: {}): Promise<Balances>;
23
+ handleBalance(client: Client, message: any): void;
24
+ parseWsBalance(message: any): Balances;
25
+ watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
26
+ watchOrdersForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
27
+ handleOrders(client: Client, message: any): void;
28
+ parseWsOrder(order: any, market?: Market): Order;
29
+ watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
30
+ handlePositions(client: Client, message: any): void;
31
+ parseWsPosition(position: any, market?: Market): Position;
32
+ watchMultipleWrapper(isPublic: boolean, channelName: string, callerMethodName: string, symbolsArray?: any[], params?: {}): Promise<any>;
33
+ getSubscriptionRequest(args: any): {
34
+ op: string;
35
+ args: any;
36
+ };
37
+ handleMessage(client: Client, message: any): void;
38
+ authenticate(params?: {}): Promise<void>;
39
+ }