ccxt 4.5.38 → 4.5.40

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 (117) hide show
  1. package/README.md +5 -7
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -6
  4. package/dist/cjs/src/base/Exchange.js +62 -5
  5. package/dist/cjs/src/binance.js +151 -2
  6. package/dist/cjs/src/bingx.js +137 -120
  7. package/dist/cjs/src/bitget.js +47 -1
  8. package/dist/cjs/src/bitmart.js +23 -8
  9. package/dist/cjs/src/bitmex.js +416 -0
  10. package/dist/cjs/src/bitstamp.js +264 -43
  11. package/dist/cjs/src/bitvavo.js +10 -0
  12. package/dist/cjs/src/blofin.js +85 -0
  13. package/dist/cjs/src/btcmarkets.js +1 -1
  14. package/dist/cjs/src/bybit.js +135 -0
  15. package/dist/cjs/src/coinspot.js +77 -7
  16. package/dist/cjs/src/delta.js +367 -0
  17. package/dist/cjs/src/htx.js +265 -2
  18. package/dist/cjs/src/hyperliquid.js +37 -8
  19. package/dist/cjs/src/krakenfutures.js +4 -0
  20. package/dist/cjs/src/kucoinfutures.js +121 -0
  21. package/dist/cjs/src/mexc.js +9 -1
  22. package/dist/cjs/src/phemex.js +359 -0
  23. package/dist/cjs/src/poloniex.js +5 -0
  24. package/dist/cjs/src/pro/binance.js +111 -26
  25. package/dist/cjs/src/pro/bingx.js +33 -33
  26. package/dist/cjs/src/pro/bitget.js +48 -90
  27. package/dist/cjs/src/pro/bitmart.js +68 -0
  28. package/dist/cjs/src/pro/blofin.js +52 -1
  29. package/dist/cjs/src/pro/bybit.js +2 -2
  30. package/dist/cjs/src/pro/coinbaseinternational.js +5 -2
  31. package/dist/cjs/src/pro/mexc.js +72 -0
  32. package/dist/cjs/src/pro/okx.js +8 -5
  33. package/dist/cjs/src/pro/paradex.js +137 -0
  34. package/dist/cjs/src/pro/woo.js +43 -0
  35. package/dist/cjs/src/tokocrypto.js +23 -0
  36. package/dist/cjs/src/toobit.js +20 -0
  37. package/dist/cjs/src/whitebit.js +11 -10
  38. package/dist/cjs/src/woo.js +103 -3
  39. package/js/ccxt.d.ts +3 -9
  40. package/js/ccxt.js +2 -6
  41. package/js/src/abstract/binance.d.ts +5 -0
  42. package/js/src/abstract/binancecoinm.d.ts +5 -0
  43. package/js/src/abstract/binanceus.d.ts +5 -0
  44. package/js/src/abstract/binanceusdm.d.ts +5 -0
  45. package/js/src/abstract/bitget.d.ts +47 -1
  46. package/js/src/abstract/bitstamp.d.ts +1 -1
  47. package/js/src/abstract/bitvavo.d.ts +10 -0
  48. package/js/src/abstract/coinspot.d.ts +45 -0
  49. package/js/src/base/Exchange.d.ts +11 -8
  50. package/js/src/base/Exchange.js +65 -5
  51. package/js/src/base/types.d.ts +9 -0
  52. package/js/src/binance.d.ts +26 -1
  53. package/js/src/binance.js +151 -2
  54. package/js/src/bingx.d.ts +113 -108
  55. package/js/src/bingx.js +137 -120
  56. package/js/src/bitget.js +47 -1
  57. package/js/src/bitmart.js +23 -8
  58. package/js/src/bitmex.d.ts +50 -1
  59. package/js/src/bitmex.js +416 -0
  60. package/js/src/bitstamp.d.ts +52 -1
  61. package/js/src/bitstamp.js +264 -43
  62. package/js/src/bitvavo.js +10 -0
  63. package/js/src/blofin.d.ts +12 -1
  64. package/js/src/blofin.js +85 -0
  65. package/js/src/btcmarkets.js +1 -1
  66. package/js/src/bybit.d.ts +12 -1
  67. package/js/src/bybit.js +135 -0
  68. package/js/src/coinspot.js +77 -7
  69. package/js/src/delta.d.ts +12 -1
  70. package/js/src/delta.js +367 -0
  71. package/js/src/htx.d.ts +15 -1
  72. package/js/src/htx.js +265 -2
  73. package/js/src/hyperliquid.js +37 -8
  74. package/js/src/krakenfutures.js +4 -0
  75. package/js/src/kucoinfutures.d.ts +12 -1
  76. package/js/src/kucoinfutures.js +121 -0
  77. package/js/src/mexc.js +9 -1
  78. package/js/src/phemex.d.ts +16 -1
  79. package/js/src/phemex.js +359 -0
  80. package/js/src/poloniex.js +5 -0
  81. package/js/src/pro/binance.d.ts +13 -0
  82. package/js/src/pro/binance.js +111 -26
  83. package/js/src/pro/bingx.d.ts +33 -33
  84. package/js/src/pro/bingx.js +33 -33
  85. package/js/src/pro/bitget.d.ts +6 -6
  86. package/js/src/pro/bitget.js +48 -90
  87. package/js/src/pro/bitmart.d.ts +22 -1
  88. package/js/src/pro/bitmart.js +69 -1
  89. package/js/src/pro/blofin.d.ts +12 -1
  90. package/js/src/pro/blofin.js +52 -1
  91. package/js/src/pro/bybit.d.ts +1 -1
  92. package/js/src/pro/bybit.js +2 -2
  93. package/js/src/pro/coinbaseinternational.d.ts +2 -2
  94. package/js/src/pro/coinbaseinternational.js +6 -3
  95. package/js/src/pro/mexc.d.ts +22 -1
  96. package/js/src/pro/mexc.js +72 -0
  97. package/js/src/pro/okx.d.ts +4 -4
  98. package/js/src/pro/okx.js +8 -5
  99. package/js/src/pro/paradex.d.ts +23 -1
  100. package/js/src/pro/paradex.js +137 -0
  101. package/js/src/pro/woo.d.ts +12 -1
  102. package/js/src/pro/woo.js +43 -0
  103. package/js/src/tokocrypto.js +23 -0
  104. package/js/src/toobit.js +20 -0
  105. package/js/src/whitebit.js +8 -8
  106. package/js/src/woo.d.ts +12 -1
  107. package/js/src/woo.js +103 -3
  108. package/package.json +1 -1
  109. package/dist/cjs/src/abstract/probit.js +0 -11
  110. package/dist/cjs/src/pro/probit.js +0 -594
  111. package/dist/cjs/src/probit.js +0 -1936
  112. package/js/src/abstract/probit.d.ts +0 -26
  113. package/js/src/abstract/probit.js +0 -11
  114. package/js/src/pro/probit.d.ts +0 -91
  115. package/js/src/pro/probit.js +0 -593
  116. package/js/src/probit.d.ts +0 -283
  117. package/js/src/probit.js +0 -1935
package/js/src/bingx.js CHANGED
@@ -798,7 +798,7 @@ export default class bingx extends Exchange {
798
798
  * @method
799
799
  * @name bingx#fetchCurrencies
800
800
  * @description fetches all available currencies on an exchange
801
- * @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins
801
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Wallet%20Deposits%20and%20Withdrawals/Query%20currency%20deposit%20and%20withdrawal%20data
802
802
  * @param {object} [params] extra parameters specific to the exchange API endpoint
803
803
  * @returns {object} an associative dictionary of currencies
804
804
  */
@@ -1123,9 +1123,9 @@ export default class bingx extends Exchange {
1123
1123
  * @method
1124
1124
  * @name bingx#fetchMarkets
1125
1125
  * @description retrieves data on all markets for bingx
1126
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20Symbols
1127
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Contract%20Information
1128
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Contract%20Information
1126
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Spot%20trading%20symbols
1127
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/USDT-M%20Perp%20Futures%20symbols
1128
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Contract%20Information
1129
1129
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1130
1130
  * @returns {object[]} an array of objects representing market data
1131
1131
  */
@@ -1147,11 +1147,10 @@ export default class bingx extends Exchange {
1147
1147
  * @method
1148
1148
  * @name bingx#fetchOHLCV
1149
1149
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1150
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#K-Line%20Data
1151
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Candlestick%20chart%20data
1152
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#%20K-Line%20Data
1153
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20Kline/Candlestick%20Data
1154
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20K-line%20Data
1150
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Kline%2FCandlestick%20Data
1151
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Kline%2FCandlestick%20Data
1152
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20Kline%2FCandlestick%20Data
1153
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Get%20K-line%20Data
1155
1154
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1156
1155
  * @param {string} timeframe the length of time each candle represents
1157
1156
  * @param {int} [since] timestamp in ms of the earliest candle to fetch
@@ -1301,8 +1300,8 @@ export default class bingx extends Exchange {
1301
1300
  * @method
1302
1301
  * @name bingx#fetchTrades
1303
1302
  * @description get the list of most recent trades for a particular symbol
1304
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20transaction%20records
1305
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#The%20latest%20Trade%20of%20a%20Trading%20Pair
1303
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Recent%20Trades%20List
1304
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Recent%20Trades%20List
1306
1305
  * @param {string} symbol unified symbol of the market to fetch trades for
1307
1306
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
1308
1307
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -1535,9 +1534,9 @@ export default class bingx extends Exchange {
1535
1534
  * @method
1536
1535
  * @name bingx#fetchOrderBook
1537
1536
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1538
- * @see https://bingx-api.github.io/docs/#/spot/market-api.html#Query%20depth%20information
1539
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Market%20Depth
1540
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%20Depth%20Data
1537
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/Order%20Book
1538
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Order%20Book
1539
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Query%20Depth%20Data
1541
1540
  * @param {string} symbol unified symbol of the market to fetch the order book for
1542
1541
  * @param {int} [limit] the maximum amount of order book entries to return
1543
1542
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1651,8 +1650,8 @@ export default class bingx extends Exchange {
1651
1650
  * @method
1652
1651
  * @name bingx#fetchFundingRate
1653
1652
  * @description fetch the current funding rate
1654
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
1655
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Price%20&%20Current%20Funding%20Rate
1653
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
1654
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
1656
1655
  * @param {string} symbol unified market symbol
1657
1656
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1658
1657
  * @returns {object} a [funding rate structure]{@link https://docs.ccxt.com/?id=funding-rate-structure}
@@ -1693,15 +1692,26 @@ export default class bingx extends Exchange {
1693
1692
  * @method
1694
1693
  * @name bingx#fetchFundingRates
1695
1694
  * @description fetch the current funding rate for multiple symbols
1696
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Current%20Funding%20Rate
1695
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
1696
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
1697
1697
  * @param {string[]} [symbols] list of unified market symbols
1698
1698
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1699
+ * @param {string} [params.subType] "linear" or "inverse" (default is linear)
1699
1700
  * @returns {object[]} a list of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-structure}
1700
1701
  */
1701
1702
  async fetchFundingRates(symbols = undefined, params = {}) {
1702
1703
  await this.loadMarkets();
1703
- symbols = this.marketSymbols(symbols, 'swap', true);
1704
- const response = await this.swapV2PublicGetQuotePremiumIndex(this.extend(params));
1704
+ symbols = this.marketSymbols(symbols, 'swap', true, true, true);
1705
+ const firstMarket = this.getMarketFromSymbols(symbols);
1706
+ let subType = 'linear';
1707
+ [subType, params] = this.handleSubTypeAndParams('fetchFundingRates', firstMarket, params, subType);
1708
+ let response = undefined;
1709
+ if (subType === 'inverse') {
1710
+ response = await this.cswapV1PublicGetMarketPremiumIndex(this.extend(params));
1711
+ }
1712
+ else {
1713
+ response = await this.swapV2PublicGetQuotePremiumIndex(this.extend(params));
1714
+ }
1705
1715
  const data = this.safeList(response, 'data', []);
1706
1716
  return this.parseFundingRates(data, symbols);
1707
1717
  }
@@ -1742,7 +1752,7 @@ export default class bingx extends Exchange {
1742
1752
  * @method
1743
1753
  * @name bingx#fetchFundingRateHistory
1744
1754
  * @description fetches historical funding rate prices
1745
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Funding%20Rate%20History
1755
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Get%20Funding%20Rate%20History
1746
1756
  * @param {string} symbol unified symbol of the market to fetch the funding rate history for
1747
1757
  * @param {int} [since] timestamp in ms of the earliest funding rate to fetch
1748
1758
  * @param {int} [limit] the maximum amount of [funding rate structures]{@link https://docs.ccxt.com/?id=funding-rate-history-structure} to fetch
@@ -1898,8 +1908,8 @@ export default class bingx extends Exchange {
1898
1908
  * @method
1899
1909
  * @name bingx#fetchOpenInterest
1900
1910
  * @description retrieves the open interest of a trading pair
1901
- * @see https://bingx-api.github.io/docs/#/swapV2/market-api.html#Get%20Swap%20Open%20Positions
1902
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Get%20Swap%20Open%20Positions
1911
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Open%20Interest%20Statistics
1912
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Get%20Swap%20Open%20Positions
1903
1913
  * @param {string} symbol unified CCXT market symbol
1904
1914
  * @param {object} [params] exchange specific parameters
1905
1915
  * @returns {object} an open interest structure{@link https://docs.ccxt.com/?id=open-interest-structure}
@@ -1992,9 +2002,9 @@ export default class bingx extends Exchange {
1992
2002
  * @method
1993
2003
  * @name bingx#fetchTicker
1994
2004
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
1995
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
1996
- * @see https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
1997
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
2005
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
2006
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
2007
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Query%2024-Hour%20Price%20Change
1998
2008
  * @param {string} symbol unified symbol of the market to fetch the ticker for
1999
2009
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2000
2010
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -2057,9 +2067,9 @@ export default class bingx extends Exchange {
2057
2067
  * @method
2058
2068
  * @name bingx#fetchTickers
2059
2069
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
2060
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Get%20Ticker
2061
- * @see https://bingx-api.github.io/docs/#/en-us/spot/market-api.html#24-hour%20price%20changes
2062
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/market-api.html#Query%2024-Hour%20Price%20Change
2070
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
2071
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/24hr%20Ticker%20Price%20Change%20Statistics
2072
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Query%2024-Hour%20Price%20Change
2063
2073
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2064
2074
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2065
2075
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -2126,7 +2136,8 @@ export default class bingx extends Exchange {
2126
2136
  * @method
2127
2137
  * @name bingx#fetchMarkPrice
2128
2138
  * @description fetches mark prices for the market
2129
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
2139
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
2140
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
2130
2141
  * @param {string} symbol unified symbol of the market to fetch the ticker for
2131
2142
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2132
2143
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -2184,7 +2195,8 @@ export default class bingx extends Exchange {
2184
2195
  * @method
2185
2196
  * @name bingx#fetchMarkPrices
2186
2197
  * @description fetches mark prices for multiple markets
2187
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/market-api.html#Mark%20Price%20and%20Funding%20Rate
2198
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Market%20Data/Mark%20Price%20and%20Funding%20Rate
2199
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Market%20Data/Price%20%26%20Current%20Funding%20Rate
2188
2200
  * @param {string[]} [symbols] unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
2189
2201
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2190
2202
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
@@ -2346,10 +2358,10 @@ export default class bingx extends Exchange {
2346
2358
  * @method
2347
2359
  * @name bingx#fetchBalance
2348
2360
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
2349
- * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Query%20Assets
2350
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20account%20data
2351
- * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Query%20standard%20contract%20balance
2352
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Account%20Assets
2361
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Account%20Endpoints/Query%20Assets
2362
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20account%20data
2363
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Account%20Assets
2364
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Fund%20Account/Query%20Assets
2353
2365
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2354
2366
  * @param {boolean} [params.standard] whether to fetch standard contract balances
2355
2367
  * @param {string} [params.type] the type of balance to fetch (spot, swap, funding) default is `spot`
@@ -2584,7 +2596,7 @@ export default class bingx extends Exchange {
2584
2596
  * @method
2585
2597
  * @name bingx#fetchPositionHistory
2586
2598
  * @description fetches historical positions
2587
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Position%20History
2599
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Position%20History
2588
2600
  * @param {string} symbol unified contract symbol
2589
2601
  * @param {int} [since] the earliest time in ms to fetch positions for
2590
2602
  * @param {int} [limit] the maximum amount of records to fetch
@@ -2649,9 +2661,9 @@ export default class bingx extends Exchange {
2649
2661
  * @method
2650
2662
  * @name bingx#fetchPositions
2651
2663
  * @description fetch all open positions
2652
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
2664
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20position%20data
2653
2665
  * @see https://bingx-api.github.io/docs/#/en-us/standard/contract-interface.html#position
2654
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
2666
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20warehouse
2655
2667
  * @param {string[]|undefined} symbols list of unified market symbols
2656
2668
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2657
2669
  * @param {boolean} [params.standard] whether to fetch standard contract positions
@@ -2748,8 +2760,8 @@ export default class bingx extends Exchange {
2748
2760
  * @method
2749
2761
  * @name bingx#fetchPosition
2750
2762
  * @description fetch data on a single open contract trade position
2751
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20position%20data
2752
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20warehouse
2763
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20position%20data
2764
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20warehouse
2753
2765
  * @param {string} symbol unified market symbol of the market the position is held in
2754
2766
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2755
2767
  * @returns {object} a [position structure]{@link https://docs.ccxt.com/?id=position-structure}
@@ -3232,10 +3244,10 @@ export default class bingx extends Exchange {
3232
3244
  * @method
3233
3245
  * @name bingx#createOrder
3234
3246
  * @description create a trade order
3235
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Trade%20order
3236
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Create%20an%20Order
3237
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Trade%20order
3238
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Place%20TWAP%20Order
3247
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Place%20order
3248
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Place%20order
3249
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Place%20TWAP%20Order
3250
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Trade%20order
3239
3251
  * @param {string} symbol unified symbol of the market to create an order in
3240
3252
  * @param {string} type 'market' or 'limit'
3241
3253
  * @param {string} side 'buy' or 'sell'
@@ -3375,8 +3387,8 @@ export default class bingx extends Exchange {
3375
3387
  * @method
3376
3388
  * @name bingx#createOrders
3377
3389
  * @description create a list of trade orders
3378
- * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Batch%20Placing%20Orders
3379
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Bulk%20order
3390
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Place%20multiple%20orders
3391
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Place%20multiple%20orders
3380
3392
  * @param {Array} orders list of orders to create, each object should contain the parameters required by createOrder, namely symbol, type, side, amount, price and params
3381
3393
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3382
3394
  * @param {boolean} [params.sync] *spot only* if true, multiple orders are ordered serially and all orders do not require the same symbol/side/type
@@ -3894,10 +3906,10 @@ export default class bingx extends Exchange {
3894
3906
  * @method
3895
3907
  * @name bingx#cancelOrder
3896
3908
  * @description cancels an open order
3897
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20Order
3898
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20Order
3899
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20an%20Order
3900
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20TWAP%20Order
3909
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20Order
3910
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20Order
3911
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20TWAP%20Order
3912
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Cancel%20an%20Order
3901
3913
  * @param {string} id order id
3902
3914
  * @param {string} symbol unified symbol of the market the order was made in
3903
3915
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -4078,24 +4090,29 @@ export default class bingx extends Exchange {
4078
4090
  * @method
4079
4091
  * @name bingx#cancelAllOrders
4080
4092
  * @description cancel all open orders
4081
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20orders%20by%20symbol
4082
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20All%20Orders
4083
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Cancel%20all%20orders
4093
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20all%20Open%20Orders%20on%20a%20Symbol
4094
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20All%20Open%20Orders
4095
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Cancel%20all%20orders
4084
4096
  * @param {string} [symbol] unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
4085
4097
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4098
+ * @param {string} [params.type] 'spot' or 'swap' (default is 'spot' if symbol is not provided)
4099
+ * @param {string} [params.subType] 'linear' or 'inverse' for swap markets (default is 'linear' if symbol is not provided)
4086
4100
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
4087
4101
  */
4088
4102
  async cancelAllOrders(symbol = undefined, params = {}) {
4089
- if (symbol === undefined) {
4090
- throw new ArgumentsRequired(this.id + ' cancelAllOrders() requires a symbol argument');
4091
- }
4092
4103
  await this.loadMarkets();
4093
- const market = this.market(symbol);
4094
- const request = {
4095
- 'symbol': market['id'],
4096
- };
4104
+ let market = undefined;
4105
+ const request = {};
4106
+ if (symbol !== undefined) {
4107
+ market = this.market(symbol);
4108
+ request['symbol'] = market['id'];
4109
+ }
4110
+ let marketType = 'spot';
4111
+ let subType = undefined;
4112
+ [marketType, params] = this.handleMarketTypeAndParams('cancelAllOrders', market, params);
4113
+ [subType, params] = this.handleSubTypeAndParams('cancelAllOrders', market, params);
4097
4114
  let response = undefined;
4098
- if (market['spot']) {
4115
+ if (marketType === 'spot') {
4099
4116
  response = await this.spotV1PrivatePostTradeCancelOpenOrders(this.extend(request, params));
4100
4117
  //
4101
4118
  // {
@@ -4120,8 +4137,8 @@ export default class bingx extends Exchange {
4120
4137
  // }
4121
4138
  //
4122
4139
  }
4123
- else if (market['swap']) {
4124
- if (market['inverse']) {
4140
+ else if (marketType === 'swap') {
4141
+ if (subType === 'inverse') {
4125
4142
  response = await this.cswapV1PrivateDeleteTradeAllOpenOrders(this.extend(request, params));
4126
4143
  //
4127
4144
  // {
@@ -4223,8 +4240,8 @@ export default class bingx extends Exchange {
4223
4240
  * @method
4224
4241
  * @name bingx#cancelOrders
4225
4242
  * @description cancel multiple orders
4226
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Cancel%20a%20Batch%20of%20Orders
4227
- * @see https://bingx-api.github.io/docs/#/spot/trade-api.html#Cancel%20a%20Batch%20of%20Orders
4243
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20multiple%20orders
4244
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20multiple%20orders
4228
4245
  * @param {string[]} ids order ids
4229
4246
  * @param {string} symbol unified market symbol, default is undefined
4230
4247
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -4331,8 +4348,8 @@ export default class bingx extends Exchange {
4331
4348
  * @method
4332
4349
  * @name bingx#cancelAllOrdersAfter
4333
4350
  * @description dead man's switch, cancel all orders after the given timeout
4334
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20all%20orders%20in%20countdown
4335
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20all%20orders%20in%20countdown
4351
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20All%20After
4352
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20All%20After
4336
4353
  * @param {number} timeout time in milliseconds, 0 represents cancel the timer
4337
4354
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4338
4355
  * @param {string} [params.type] spot or swap market
@@ -4374,10 +4391,10 @@ export default class bingx extends Exchange {
4374
4391
  * @method
4375
4392
  * @name bingx#fetchOrder
4376
4393
  * @description fetches information on an order made by the user
4377
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20details
4378
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20details
4379
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order
4380
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#TWAP%20Order%20Details
4394
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20details
4395
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20details
4396
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/TWAP%20Order%20Details
4397
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Order
4381
4398
  * @param {string} id the order id
4382
4399
  * @param {string} symbol unified symbol of the market the order was made in
4383
4400
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -4553,8 +4570,8 @@ export default class bingx extends Exchange {
4553
4570
  * @method
4554
4571
  * @name bingx#fetchOrders
4555
4572
  * @description fetches information on multiple orders made by the user
4556
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#All%20Orders
4557
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history (returns less fields than above)
4573
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/All%20Orders
4574
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history (returns less fields than above)
4558
4575
  * @param {string} symbol unified market symbol of the market orders were made in
4559
4576
  * @param {int} [since] the earliest time in ms to fetch orders for
4560
4577
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -4644,10 +4661,10 @@ export default class bingx extends Exchange {
4644
4661
  * @method
4645
4662
  * @name bingx#fetchOpenOrders
4646
4663
  * @description fetch all unfilled currently open orders
4647
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Current%20Open%20Orders
4648
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Current%20All%20Open%20Orders
4649
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20all%20current%20pending%20orders
4650
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20TWAP%20Entrusted%20Order
4664
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Current%20Open%20Orders
4665
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Current%20All%20Open%20Orders
4666
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20all%20current%20pending%20orders
4667
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20TWAP%20Entrusted%20Order
4651
4668
  * @param {string} symbol unified market symbol
4652
4669
  * @param {int} [since] the earliest time in ms to fetch open orders for
4653
4670
  * @param {int} [limit] the maximum number of open order structures to retrieve
@@ -4831,9 +4848,9 @@ export default class bingx extends Exchange {
4831
4848
  * @method
4832
4849
  * @name bingx#fetchClosedOrders
4833
4850
  * @description fetches information on multiple closed orders made by the user
4834
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4835
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4836
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4851
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20history
4852
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history
4853
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/User's%20History%20Orders
4837
4854
  * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4838
4855
  * @param {string} symbol unified market symbol of the closed orders
4839
4856
  * @param {int} [since] timestamp in ms of the earliest order
@@ -4852,9 +4869,9 @@ export default class bingx extends Exchange {
4852
4869
  * @method
4853
4870
  * @name bingx#fetchCanceledOrders
4854
4871
  * @description fetches information on multiple canceled orders made by the user
4855
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4856
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4857
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4872
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20history
4873
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history
4874
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/User's%20History%20Orders
4858
4875
  * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4859
4876
  * @param {string} symbol unified market symbol of the canceled orders
4860
4877
  * @param {int} [since] timestamp in ms of the earliest order
@@ -4873,11 +4890,11 @@ export default class bingx extends Exchange {
4873
4890
  * @method
4874
4891
  * @name bingx#fetchCanceledAndClosedOrders
4875
4892
  * @description fetches information on multiple closed orders made by the user
4876
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Order%20history
4877
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Order%20history
4878
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#User's%20History%20Orders
4893
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Order%20history
4894
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Order%20history
4895
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/User's%20History%20Orders
4879
4896
  * @see https://bingx-api.github.io/docs/#/standard/contract-interface.html#Historical%20order
4880
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20TWAP%20Historical%20Orders
4897
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20TWAP%20Historical%20Orders
4881
4898
  * @param {string} [symbol] unified market symbol of the market orders were made in
4882
4899
  * @param {int} [since] the earliest time in ms to fetch orders for
4883
4900
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -5072,7 +5089,7 @@ export default class bingx extends Exchange {
5072
5089
  * @method
5073
5090
  * @name bingx#transfer
5074
5091
  * @description transfer currency internally between wallets on the same account
5075
- * @see https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Asset%20Transfer%20New
5092
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Fund%20Account/Asset%20Transfer%20New
5076
5093
  * @param {string} code unified currency code
5077
5094
  * @param {float} amount amount to transfer
5078
5095
  * @param {string} fromAccount account to transfer from (spot, swap, futures, or funding)
@@ -5133,7 +5150,7 @@ export default class bingx extends Exchange {
5133
5150
  * @method
5134
5151
  * @name bingx#fetchTransfers
5135
5152
  * @description fetch a history of internal transfers made on an account
5136
- * @see https://bingx-api.github.io/docs/#/en-us/common/account-api.html#Asset%20transfer%20records%20new
5153
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Fund%20Account/Asset%20transfer%20records%20new
5137
5154
  * @param {string} [code] unified currency code of the currency transferred
5138
5155
  * @param {int} [since] the earliest time in ms to fetch transfers for
5139
5156
  * @param {int} [limit] the maximum number of transfers structures to retrieve (default 10, max 100)
@@ -5231,7 +5248,7 @@ export default class bingx extends Exchange {
5231
5248
  * @method
5232
5249
  * @name bingx#fetchDepositAddressesByNetwork
5233
5250
  * @description fetch the deposit addresses for a currency associated with this account
5234
- * @see https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
5251
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Wallet%20Deposits%20and%20Withdrawals/Main%20Account%20Deposit%20Address
5235
5252
  * @param {string} code unified currency code
5236
5253
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5237
5254
  * @returns {object} a dictionary [address structures]{@link https://docs.ccxt.com/?id=address-structure}, indexed by the network
@@ -5274,7 +5291,7 @@ export default class bingx extends Exchange {
5274
5291
  * @method
5275
5292
  * @name bingx#fetchDepositAddress
5276
5293
  * @description fetch the deposit address for a currency associated with this account
5277
- * @see https://bingx-api.github.io/docs/#/en-us/common/wallet-api.html#Query%20Main%20Account%20Deposit%20Address
5294
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Wallet%20Deposits%20and%20Withdrawals/Main%20Account%20Deposit%20Address
5278
5295
  * @param {string} code unified currency code
5279
5296
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5280
5297
  * @param {string} [params.network] The chain of currency. This only apply for multi-chain currency, and there is no need for single chain currency
@@ -5330,7 +5347,7 @@ export default class bingx extends Exchange {
5330
5347
  * @method
5331
5348
  * @name bingx#fetchDeposits
5332
5349
  * @description fetch all deposits made to an account
5333
- * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Deposit%20History(supporting%20network)
5350
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Wallet%20deposits%20and%20withdrawals/Deposit%20records
5334
5351
  * @param {string} [code] unified currency code
5335
5352
  * @param {int} [since] the earliest time in ms to fetch deposits for
5336
5353
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -5375,7 +5392,7 @@ export default class bingx extends Exchange {
5375
5392
  * @method
5376
5393
  * @name bingx#fetchWithdrawals
5377
5394
  * @description fetch all withdrawals made from an account
5378
- * @see https://bingx-api.github.io/docs/#/spot/account-api.html#Withdraw%20History%20(supporting%20network)
5395
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Wallet%20deposits%20and%20withdrawals/Withdraw%20records
5379
5396
  * @param {string} [code] unified currency code
5380
5397
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
5381
5398
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -5537,8 +5554,8 @@ export default class bingx extends Exchange {
5537
5554
  * @method
5538
5555
  * @name bingx#setMarginMode
5539
5556
  * @description set margin mode to 'cross' or 'isolated'
5540
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Change%20Margin%20Type
5541
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Set%20Margin%20Type
5557
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Change%20Margin%20Type
5558
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Set%20Margin%20Type
5542
5559
  * @param {string} marginMode 'cross' or 'isolated'
5543
5560
  * @param {string} symbol unified market symbol
5544
5561
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -5589,7 +5606,7 @@ export default class bingx extends Exchange {
5589
5606
  * @method
5590
5607
  * @name bingx#setMargin
5591
5608
  * @description Either adds or reduces margin in an isolated position in order to set the margin to a specific value
5592
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Adjust%20isolated%20margin
5609
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Modify%20Isolated%20Position%20Margin
5593
5610
  * @param {string} symbol unified market symbol of the market to set margin in
5594
5611
  * @param {float} amount the amount to set the margin to
5595
5612
  * @param {object} [params] parameters specific to the bingx api endpoint
@@ -5648,8 +5665,8 @@ export default class bingx extends Exchange {
5648
5665
  * @method
5649
5666
  * @name bingx#fetchLeverage
5650
5667
  * @description fetch the set leverage for a market
5651
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Query%20Leverage
5652
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Leverage
5668
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Leverage%20and%20Available%20Positions
5669
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Leverage
5653
5670
  * @param {string} symbol unified market symbol
5654
5671
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5655
5672
  * @returns {object} a [leverage structure]{@link https://docs.ccxt.com/?id=leverage-structure}
@@ -5746,8 +5763,8 @@ export default class bingx extends Exchange {
5746
5763
  * @method
5747
5764
  * @name bingx#setLeverage
5748
5765
  * @description set the level of leverage for a market
5749
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#Switch%20Leverage
5750
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Modify%20Leverage
5766
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Set%20Leverage
5767
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Modify%20Leverage
5751
5768
  * @param {float} leverage the rate of leverage
5752
5769
  * @param {string} symbol unified market symbol
5753
5770
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -5810,10 +5827,9 @@ export default class bingx extends Exchange {
5810
5827
  * @method
5811
5828
  * @name bingx#fetchMyTrades
5812
5829
  * @description fetch all trades made by the user
5813
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20transaction%20details
5814
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20orders
5815
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20historical%20transaction%20details
5816
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Order%20Trade%20Detail
5830
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20transaction%20details
5831
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20historical%20transaction%20orders
5832
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Order%20Trade%20Detail
5817
5833
  * @param {string} [symbol] unified market symbol
5818
5834
  * @param {int} [since] the earliest time in ms to fetch trades for
5819
5835
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -5989,7 +6005,7 @@ export default class bingx extends Exchange {
5989
6005
  * @method
5990
6006
  * @name bingx#fetchDepositWithdrawFees
5991
6007
  * @description fetch deposit and withdraw fees
5992
- * @see https://bingx-api.github.io/docs/#/common/account-api.html#All%20Coins'%20Information
6008
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Wallet%20Deposits%20and%20Withdrawals/Query%20currency%20deposit%20and%20withdrawal%20data
5993
6009
  * @param {string[]|undefined} codes list of unified currency codes
5994
6010
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5995
6011
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure}
@@ -6012,7 +6028,7 @@ export default class bingx extends Exchange {
6012
6028
  * @method
6013
6029
  * @name bingx#withdraw
6014
6030
  * @description make a withdrawal
6015
- * @see https://bingx-api.github.io/docs/#/en-us/spot/wallet-api.html#Withdraw
6031
+ * @see https://bingx-api.github.io/docs-v3/#/en/Account%20and%20Wallet/Wallet%20Deposits%20and%20Withdrawals/Withdraw
6016
6032
  * @param {string} code unified currency code
6017
6033
  * @param {float} amount the amount to withdraw
6018
6034
  * @param {string} address the address to withdraw to
@@ -6088,8 +6104,8 @@ export default class bingx extends Exchange {
6088
6104
  * @method
6089
6105
  * @name bingx#fetchMyLiquidations
6090
6106
  * @description retrieves the users liquidated positions
6091
- * @see https://bingx-api.github.io/docs/#/swapV2/trade-api.html#User's%20Force%20Orders
6092
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20force%20orders
6107
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/User's%20Force%20Orders
6108
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20force%20orders
6093
6109
  * @param {string} [symbol] unified CCXT market symbol
6094
6110
  * @param {int} [since] the earliest time in ms to fetch liquidations for
6095
6111
  * @param {int} [limit] the maximum number of liquidation structures to retrieve
@@ -6230,8 +6246,9 @@ export default class bingx extends Exchange {
6230
6246
  * @method
6231
6247
  * @name bingx#closePosition
6232
6248
  * @description closes open positions for a market
6233
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
6234
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
6249
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Close%20All%20Positions
6250
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Close%20position%20by%20position%20ID
6251
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Close%20all%20positions%20in%20bulk
6235
6252
  * @param {string} symbol Unified CCXT market symbol
6236
6253
  * @param {string} [side] not used by bingx
6237
6254
  * @param {object} [params] extra parameters specific to the bingx api endpoint
@@ -6302,8 +6319,8 @@ export default class bingx extends Exchange {
6302
6319
  * @method
6303
6320
  * @name bitget#closePositions
6304
6321
  * @description closes open positions for a market
6305
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#One-Click%20Close%20All%20Positions
6306
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Close%20all%20positions%20in%20bulk
6322
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Close%20All%20Positions
6323
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Close%20all%20positions%20in%20bulk
6307
6324
  * @param {object} [params] extra parameters specific to the bingx api endpoint
6308
6325
  * @param {string} [params.recvWindow] request valid time window value
6309
6326
  * @returns {object[]} [a list of position structures]{@link https://docs.ccxt.com/?id=position-structure}
@@ -6366,7 +6383,7 @@ export default class bingx extends Exchange {
6366
6383
  * @method
6367
6384
  * @name bingx#fetchPositionMode
6368
6385
  * @description fetchs the position mode, hedged or one way, hedged for binance is set identically for all linear markets or all inverse markets
6369
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Get%20Position%20Mode
6386
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20position%20mode
6370
6387
  * @param {string} symbol unified symbol of the market to fetch the order book for
6371
6388
  * @param {object} [params] extra parameters specific to the exchange API endpoint
6372
6389
  * @returns {object} an object detailing whether the market is in hedged or one-way mode
@@ -6394,7 +6411,7 @@ export default class bingx extends Exchange {
6394
6411
  * @method
6395
6412
  * @name bingx#setPositionMode
6396
6413
  * @description set hedged to true or false for a market
6397
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Set%20Position%20Mode
6414
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Set%20Position%20Mode
6398
6415
  * @param {bool} hedged set to true to use dualSidePosition
6399
6416
  * @param {string} symbol not used by bingx setPositionMode ()
6400
6417
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -6425,8 +6442,8 @@ export default class bingx extends Exchange {
6425
6442
  * @method
6426
6443
  * @name bingx#editOrder
6427
6444
  * @description cancels an order and places a new order
6428
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Cancel%20order%20and%20place%20a%20new%20order // spot
6429
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Cancel%20an%20order%20and%20then%20Place%20a%20new%20order // swap
6445
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Cancel%20an%20Existing%20Order%20and%20Send%20a%20New%20Order // spot
6446
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Cancel%20an%20Existing%20Order%20and%20Send%20a%20New%20Orde // swap
6430
6447
  * @param {string} id order id
6431
6448
  * @param {string} symbol unified symbol of the market to create an order in
6432
6449
  * @param {string} type 'market' or 'limit'
@@ -6563,8 +6580,8 @@ export default class bingx extends Exchange {
6563
6580
  * @method
6564
6581
  * @name bingx#fetchMarginMode
6565
6582
  * @description fetches the margin mode of the trading pair
6566
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/trade-api.html#Query%20Margin%20Type
6567
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Margin%20Type
6583
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Trades%20Endpoints/Query%20Margin%20Type
6584
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Margin%20Type
6568
6585
  * @param {string} symbol unified symbol of the market to fetch the margin mode for
6569
6586
  * @param {object} [params] extra parameters specific to the exchange API endpoint
6570
6587
  * @returns {object} a [margin mode structure]{@link https://docs.ccxt.com/?id=margin-mode-structure}
@@ -6621,9 +6638,9 @@ export default class bingx extends Exchange {
6621
6638
  * @method
6622
6639
  * @name bingx#fetchTradingFee
6623
6640
  * @description fetch the trading fees for a market
6624
- * @see https://bingx-api.github.io/docs/#/en-us/spot/trade-api.html#Query%20Trading%20Commission%20Rate
6625
- * @see https://bingx-api.github.io/docs/#/en-us/swapV2/account-api.html#Query%20Trading%20Commission%20Rate
6626
- * @see https://bingx-api.github.io/docs/#/en-us/cswap/trade-api.html#Query%20Trade%20Commission%20Rate
6641
+ * @see https://bingx-api.github.io/docs-v3/#/en/Spot/Trades%20Endpoints/Query%20Trading%20Commission%20Rate
6642
+ * @see https://bingx-api.github.io/docs-v3/#/en/Swap/Account%20Endpoints/Query%20Trading%20Commission%20Rate
6643
+ * @see https://bingx-api.github.io/docs-v3/#/en/Coin-M%20Futures/Trades%20Endpoints/Query%20Trade%20Commission%20Rate
6627
6644
  * @param {string} symbol unified market symbol
6628
6645
  * @param {object} [params] extra parameters specific to the exchange API endpoint
6629
6646
  * @returns {object} a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure}