ccxt 4.3.54 → 4.3.56

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 (236) hide show
  1. package/README.md +4 -6
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -1
  4. package/dist/cjs/src/ace.js +1 -1
  5. package/dist/cjs/src/alpaca.js +1 -1
  6. package/dist/cjs/src/ascendex.js +6 -4
  7. package/dist/cjs/src/base/Exchange.js +26 -2
  8. package/dist/cjs/src/bigone.js +1 -1
  9. package/dist/cjs/src/binance.js +13 -13
  10. package/dist/cjs/src/bingx.js +38 -4
  11. package/dist/cjs/src/bit2c.js +1 -1
  12. package/dist/cjs/src/bitbank.js +1 -1
  13. package/dist/cjs/src/bitbns.js +1 -1
  14. package/dist/cjs/src/bitfinex.js +1 -1
  15. package/dist/cjs/src/bitfinex2.js +1 -1
  16. package/dist/cjs/src/bitflyer.js +8 -2
  17. package/dist/cjs/src/bitget.js +2 -2
  18. package/dist/cjs/src/bithumb.js +1 -1
  19. package/dist/cjs/src/bitmart.js +3 -3
  20. package/dist/cjs/src/bitmex.js +1 -1
  21. package/dist/cjs/src/bitopro.js +21 -4
  22. package/dist/cjs/src/bitrue.js +1 -1
  23. package/dist/cjs/src/bitso.js +1 -1
  24. package/dist/cjs/src/bitstamp.js +1 -1
  25. package/dist/cjs/src/bitteam.js +1 -1
  26. package/dist/cjs/src/bitvavo.js +2 -2
  27. package/dist/cjs/src/bl3p.js +1 -1
  28. package/dist/cjs/src/blockchaincom.js +28 -28
  29. package/dist/cjs/src/blofin.js +1 -1
  30. package/dist/cjs/src/btcalpha.js +4 -12
  31. package/dist/cjs/src/btcbox.js +1 -1
  32. package/dist/cjs/src/btcmarkets.js +27 -28
  33. package/dist/cjs/src/btcturk.js +1 -1
  34. package/dist/cjs/src/bybit.js +11 -7
  35. package/dist/cjs/src/cex.js +2 -2
  36. package/dist/cjs/src/coinbase.js +33 -33
  37. package/dist/cjs/src/coinbaseexchange.js +1 -1
  38. package/dist/cjs/src/coinbaseinternational.js +1 -1
  39. package/dist/cjs/src/coincheck.js +1 -1
  40. package/dist/cjs/src/coinex.js +2 -2
  41. package/dist/cjs/src/coinlist.js +2 -2
  42. package/dist/cjs/src/coinmate.js +1 -1
  43. package/dist/cjs/src/coinmetro.js +1 -1
  44. package/dist/cjs/src/coinone.js +1 -1
  45. package/dist/cjs/src/coinsph.js +1 -1
  46. package/dist/cjs/src/coinspot.js +1 -1
  47. package/dist/cjs/src/cryptocom.js +1 -1
  48. package/dist/cjs/src/currencycom.js +1 -1
  49. package/dist/cjs/src/delta.js +7 -3
  50. package/dist/cjs/src/deribit.js +4 -4
  51. package/dist/cjs/src/digifinex.js +2 -2
  52. package/dist/cjs/src/exmo.js +2 -2
  53. package/dist/cjs/src/gate.js +3 -2
  54. package/dist/cjs/src/gemini.js +1 -1
  55. package/dist/cjs/src/hitbtc.js +1 -1
  56. package/dist/cjs/src/hollaex.js +1 -1
  57. package/dist/cjs/src/htx.js +3 -3
  58. package/dist/cjs/src/huobijp.js +1 -1
  59. package/dist/cjs/src/hyperliquid.js +3 -3
  60. package/dist/cjs/src/idex.js +1 -1
  61. package/dist/cjs/src/independentreserve.js +1 -1
  62. package/dist/cjs/src/indodax.js +1 -1
  63. package/dist/cjs/src/kraken.js +2 -2
  64. package/dist/cjs/src/kucoin.js +136 -47
  65. package/dist/cjs/src/kucoinfutures.js +1 -1
  66. package/dist/cjs/src/kuna.js +1 -1
  67. package/dist/cjs/src/latoken.js +1 -1
  68. package/dist/cjs/src/lbank.js +28 -7
  69. package/dist/cjs/src/luno.js +1 -1
  70. package/dist/cjs/src/lykke.js +1 -1
  71. package/dist/cjs/src/mercado.js +1 -1
  72. package/dist/cjs/src/mexc.js +1 -1
  73. package/dist/cjs/src/ndax.js +1 -1
  74. package/dist/cjs/src/novadax.js +1 -1
  75. package/dist/cjs/src/oceanex.js +1 -1
  76. package/dist/cjs/src/okcoin.js +1 -1
  77. package/dist/cjs/src/okx.js +3 -3
  78. package/dist/cjs/src/onetrading.js +1 -1
  79. package/dist/cjs/src/oxfun.js +2 -2
  80. package/dist/cjs/src/p2b.js +1 -1
  81. package/dist/cjs/src/paymium.js +1 -1
  82. package/dist/cjs/src/phemex.js +2 -2
  83. package/dist/cjs/src/poloniex.js +4 -3
  84. package/dist/cjs/src/poloniexfutures.js +1 -1
  85. package/dist/cjs/src/pro/binance.js +2 -2
  86. package/dist/cjs/src/pro/bitvavo.js +2 -2
  87. package/dist/cjs/src/pro/bybit.js +2 -2
  88. package/dist/cjs/src/pro/cex.js +3 -3
  89. package/dist/cjs/src/pro/coinbase.js +23 -1
  90. package/dist/cjs/src/pro/cryptocom.js +1 -1
  91. package/dist/cjs/src/pro/gate.js +2 -2
  92. package/dist/cjs/src/pro/hitbtc.js +1 -1
  93. package/dist/cjs/src/pro/kraken.js +2 -2
  94. package/dist/cjs/src/pro/kucoin.js +2 -2
  95. package/dist/cjs/src/pro/okx.js +2 -2
  96. package/dist/cjs/src/pro/oxfun.js +2 -2
  97. package/dist/cjs/src/pro/poloniex.js +1 -1
  98. package/dist/cjs/src/pro/vertex.js +1 -1
  99. package/dist/cjs/src/probit.js +1 -1
  100. package/dist/cjs/src/timex.js +1 -1
  101. package/dist/cjs/src/tokocrypto.js +1 -1
  102. package/dist/cjs/src/tradeogre.js +1 -1
  103. package/dist/cjs/src/upbit.js +1 -1
  104. package/dist/cjs/src/vertex.js +2 -2
  105. package/dist/cjs/src/wavesexchange.js +1 -1
  106. package/dist/cjs/src/wazirx.js +1 -1
  107. package/dist/cjs/src/whitebit.js +2 -2
  108. package/dist/cjs/src/woo.js +5 -5
  109. package/dist/cjs/src/woofipro.js +3 -3
  110. package/dist/cjs/src/yobit.js +1 -1
  111. package/dist/cjs/src/zaif.js +1 -1
  112. package/dist/cjs/src/zonda.js +1 -1
  113. package/js/ccxt.d.ts +1 -1
  114. package/js/ccxt.js +1 -1
  115. package/js/src/abstract/bingx.d.ts +16 -0
  116. package/js/src/abstract/kucoin.d.ts +3 -0
  117. package/js/src/abstract/kucoinfutures.d.ts +3 -0
  118. package/js/src/ace.js +1 -1
  119. package/js/src/alpaca.js +1 -1
  120. package/js/src/ascendex.d.ts +1 -1
  121. package/js/src/ascendex.js +6 -4
  122. package/js/src/base/Exchange.d.ts +1 -0
  123. package/js/src/base/Exchange.js +26 -2
  124. package/js/src/base/types.d.ts +4 -0
  125. package/js/src/bigone.js +1 -1
  126. package/js/src/binance.js +13 -13
  127. package/js/src/bingx.js +38 -4
  128. package/js/src/bit2c.js +1 -1
  129. package/js/src/bitbank.js +1 -1
  130. package/js/src/bitbns.js +1 -1
  131. package/js/src/bitfinex.js +1 -1
  132. package/js/src/bitfinex2.js +1 -1
  133. package/js/src/bitflyer.d.ts +1 -1
  134. package/js/src/bitflyer.js +8 -2
  135. package/js/src/bitget.js +2 -2
  136. package/js/src/bithumb.js +1 -1
  137. package/js/src/bitmart.js +3 -3
  138. package/js/src/bitmex.js +1 -1
  139. package/js/src/bitopro.d.ts +3 -2
  140. package/js/src/bitopro.js +21 -4
  141. package/js/src/bitrue.js +1 -1
  142. package/js/src/bitso.js +1 -1
  143. package/js/src/bitstamp.js +1 -1
  144. package/js/src/bitteam.js +1 -1
  145. package/js/src/bitvavo.js +2 -2
  146. package/js/src/bl3p.js +1 -1
  147. package/js/src/blockchaincom.js +28 -28
  148. package/js/src/blofin.js +1 -1
  149. package/js/src/btcalpha.js +5 -13
  150. package/js/src/btcbox.js +1 -1
  151. package/js/src/btcmarkets.js +28 -29
  152. package/js/src/btcturk.js +1 -1
  153. package/js/src/bybit.js +11 -7
  154. package/js/src/cex.js +2 -2
  155. package/js/src/coinbase.js +33 -33
  156. package/js/src/coinbaseexchange.js +1 -1
  157. package/js/src/coinbaseinternational.js +1 -1
  158. package/js/src/coincheck.js +1 -1
  159. package/js/src/coinex.js +2 -2
  160. package/js/src/coinlist.js +2 -2
  161. package/js/src/coinmate.js +1 -1
  162. package/js/src/coinmetro.js +1 -1
  163. package/js/src/coinone.js +1 -1
  164. package/js/src/coinsph.js +1 -1
  165. package/js/src/coinspot.js +1 -1
  166. package/js/src/cryptocom.js +1 -1
  167. package/js/src/currencycom.js +1 -1
  168. package/js/src/delta.d.ts +1 -1
  169. package/js/src/delta.js +7 -3
  170. package/js/src/deribit.js +4 -4
  171. package/js/src/digifinex.js +2 -2
  172. package/js/src/exmo.js +2 -2
  173. package/js/src/gate.js +3 -2
  174. package/js/src/gemini.js +1 -1
  175. package/js/src/hitbtc.js +1 -1
  176. package/js/src/hollaex.js +1 -1
  177. package/js/src/htx.js +3 -3
  178. package/js/src/huobijp.js +1 -1
  179. package/js/src/hyperliquid.js +3 -3
  180. package/js/src/idex.js +1 -1
  181. package/js/src/independentreserve.js +1 -1
  182. package/js/src/indodax.js +1 -1
  183. package/js/src/kraken.js +2 -2
  184. package/js/src/kucoin.d.ts +1 -0
  185. package/js/src/kucoin.js +136 -47
  186. package/js/src/kucoinfutures.js +1 -1
  187. package/js/src/kuna.js +1 -1
  188. package/js/src/latoken.js +1 -1
  189. package/js/src/lbank.d.ts +2 -2
  190. package/js/src/lbank.js +28 -7
  191. package/js/src/luno.js +1 -1
  192. package/js/src/lykke.js +1 -1
  193. package/js/src/mercado.js +1 -1
  194. package/js/src/mexc.js +1 -1
  195. package/js/src/ndax.js +1 -1
  196. package/js/src/novadax.js +1 -1
  197. package/js/src/oceanex.js +1 -1
  198. package/js/src/okcoin.js +1 -1
  199. package/js/src/okx.js +3 -3
  200. package/js/src/onetrading.js +1 -1
  201. package/js/src/oxfun.js +2 -2
  202. package/js/src/p2b.js +1 -1
  203. package/js/src/paymium.js +1 -1
  204. package/js/src/phemex.js +2 -2
  205. package/js/src/poloniex.js +4 -3
  206. package/js/src/poloniexfutures.js +1 -1
  207. package/js/src/pro/binance.js +2 -2
  208. package/js/src/pro/bitvavo.js +2 -2
  209. package/js/src/pro/bybit.js +2 -2
  210. package/js/src/pro/cex.js +3 -3
  211. package/js/src/pro/coinbase.d.ts +1 -0
  212. package/js/src/pro/coinbase.js +23 -1
  213. package/js/src/pro/cryptocom.js +1 -1
  214. package/js/src/pro/gate.js +2 -2
  215. package/js/src/pro/hitbtc.js +1 -1
  216. package/js/src/pro/kraken.js +2 -2
  217. package/js/src/pro/kucoin.js +2 -2
  218. package/js/src/pro/okx.js +2 -2
  219. package/js/src/pro/oxfun.js +2 -2
  220. package/js/src/pro/poloniex.js +1 -1
  221. package/js/src/pro/vertex.js +1 -1
  222. package/js/src/probit.js +1 -1
  223. package/js/src/timex.js +1 -1
  224. package/js/src/tokocrypto.js +1 -1
  225. package/js/src/tradeogre.js +1 -1
  226. package/js/src/upbit.js +1 -1
  227. package/js/src/vertex.js +2 -2
  228. package/js/src/wavesexchange.js +1 -1
  229. package/js/src/wazirx.js +1 -1
  230. package/js/src/whitebit.js +2 -2
  231. package/js/src/woo.js +5 -5
  232. package/js/src/woofipro.js +3 -3
  233. package/js/src/yobit.js +1 -1
  234. package/js/src/zaif.js +1 -1
  235. package/js/src/zonda.js +1 -1
  236. package/package.json +58 -52
package/dist/cjs/ccxt.js CHANGED
@@ -190,7 +190,7 @@ var woofipro$1 = require('./src/pro/woofipro.js');
190
190
 
191
191
  //-----------------------------------------------------------------------------
192
192
  // this is updated by vss.js when building
193
- const version = '4.3.54';
193
+ const version = '4.3.56';
194
194
  Exchange["default"].ccxtVersion = version;
195
195
  const exchanges = {
196
196
  'ace': ace,
@@ -598,7 +598,7 @@ class ace extends ace$1 {
598
598
  * @param {string} type 'market' or 'limit'
599
599
  * @param {string} side 'buy' or 'sell'
600
600
  * @param {float} amount how much of currency you want to trade in units of base currency
601
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
601
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
602
602
  * @param {object} [params] extra parameters specific to the exchange API endpoint
603
603
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
604
604
  */
@@ -691,7 +691,7 @@ class alpaca extends alpaca$1 {
691
691
  * @param {string} type 'market', 'limit' or 'stop_limit'
692
692
  * @param {string} side 'buy' or 'sell'
693
693
  * @param {float} amount how much of currency you want to trade in units of base currency
694
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
694
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
695
695
  * @param {object} [params] extra parameters specific to the exchange API endpoint
696
696
  * @param {float} [params.triggerPrice] The price at which a trigger order is triggered at
697
697
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1500,7 +1500,7 @@ class ascendex extends ascendex$1 {
1500
1500
  * @param {string} type 'market' or 'limit'
1501
1501
  * @param {string} side 'buy' or 'sell'
1502
1502
  * @param {float} amount how much you want to trade in units of the base currency
1503
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1503
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1504
1504
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1505
1505
  * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
1506
1506
  * @param {bool} [params.postOnly] true or false
@@ -1589,7 +1589,7 @@ class ascendex extends ascendex$1 {
1589
1589
  * @param {string} type "limit" or "market"
1590
1590
  * @param {string} side "buy" or "sell"
1591
1591
  * @param {float} amount the amount of currency to trade
1592
- * @param {float} [price] *ignored in "market" orders* the price at which the order is to be fullfilled at in units of the quote currency
1592
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1593
1593
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1594
1594
  * @param {string} [params.timeInForce] "GTC", "IOC", "FOK", or "PO"
1595
1595
  * @param {bool} [params.postOnly] true or false
@@ -2305,7 +2305,7 @@ class ascendex extends ascendex$1 {
2305
2305
  * @see https://ascendex.github.io/ascendex-futures-pro-api-v2/#cancel-all-open-orders
2306
2306
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
2307
2307
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2308
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/#/?id=order-structure}
2308
+ * @returns {object[]} a list with a single [order structure]{@link https://docs.ccxt.com/#/?id=order-structure} with the response assigned to the info property
2309
2309
  */
2310
2310
  await this.loadMarkets();
2311
2311
  await this.loadAccounts();
@@ -2371,7 +2371,9 @@ class ascendex extends ascendex$1 {
2371
2371
  // }
2372
2372
  // }
2373
2373
  //
2374
- return response;
2374
+ return this.safeOrder({
2375
+ 'info': response,
2376
+ });
2375
2377
  }
2376
2378
  parseDepositAddress(depositAddress, currency = undefined) {
2377
2379
  //
@@ -44,7 +44,7 @@ function _interopNamespace(e) {
44
44
  }
45
45
 
46
46
  // ----------------------------------------------------------------------------
47
- const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS } = functions;
47
+ const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sortBy2, safeFloat2, groupBy, aggregate, uuid, unCamelCase, precisionFromString, Throttler, capitalize, now, decimalToPrecision, safeValue, safeValue2, safeString, safeString2, seconds, milliseconds, binaryToBase16, numberToBE, base16ToBinary, iso8601, omit, isJsonEncodedObject, safeInteger, sum, omitZero, implodeParams, extractParams, json, merge, binaryConcat, hash, ecdsa, arrayConcat, encode, urlencode, hmac, numberToString, parseTimeframe, safeInteger2, safeStringLower, parse8601, yyyymmdd, safeStringUpper, safeTimestamp, binaryConcatArray, uuidv1, numberToLE, ymdhms, stringToBase64, decode, uuid22, safeIntegerProduct2, safeIntegerProduct, safeStringLower2, yymmdd, base58ToBinary, binaryToBase58, safeTimestamp2, rawencode, keysort, inArray, isEmpty, ordered, filterBy, uuid16, safeFloat, base64ToBinary, safeStringUpper2, urlencodeWithArrayRepeat, microseconds, binaryToBase64, strip, toArray, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, urlencodeNested, urlencodeBase64, parseDate, ymd, base64ToString, crc32, packb, TRUNCATE, ROUND, DECIMAL_PLACES, NO_PADDING, TICK_SIZE, SIGNIFICANT_DIGITS, sleep } = functions;
48
48
  // ----------------------------------------------------------------------------
49
49
  /**
50
50
  * @class Exchange
@@ -52,6 +52,7 @@ const { isNode, deepExtend, extend, clone, flatten, unique, indexBy, sortBy, sor
52
52
  class Exchange {
53
53
  constructor(userConfig = {}) {
54
54
  this.throttleProp = undefined;
55
+ this.sleep = sleep;
55
56
  this.api = undefined;
56
57
  this.userAgent = undefined;
57
58
  this.user_agent = undefined;
@@ -3805,7 +3806,30 @@ class Exchange {
3805
3806
  this.last_request_headers = request['headers'];
3806
3807
  this.last_request_body = request['body'];
3807
3808
  this.last_request_url = request['url'];
3808
- return await this.fetch(request['url'], request['method'], request['headers'], request['body']);
3809
+ let retries = undefined;
3810
+ [retries, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailure', 0);
3811
+ let retryDelay = undefined;
3812
+ [retryDelay, params] = this.handleOptionAndParams(params, path, 'maxRetriesOnFailureDelay', 0);
3813
+ for (let i = 0; i < retries + 1; i++) {
3814
+ try {
3815
+ return await this.fetch(request['url'], request['method'], request['headers'], request['body']);
3816
+ }
3817
+ catch (e) {
3818
+ if (e instanceof errors.NetworkError) {
3819
+ if (i < retries) {
3820
+ if (this.verbose) {
3821
+ this.log('Request failed with the error: ' + e.toString() + ', retrying ' + (i + 1).toString() + ' of ' + retries.toString() + '...');
3822
+ }
3823
+ if ((retryDelay !== undefined) && (retryDelay !== 0)) {
3824
+ await this.sleep(retryDelay);
3825
+ }
3826
+ continue;
3827
+ }
3828
+ }
3829
+ throw e;
3830
+ }
3831
+ }
3832
+ return undefined; // this line is never reached, but exists for c# value return requirement
3809
3833
  }
3810
3834
  async request(path, api = 'public', method = 'GET', params = {}, headers = undefined, body = undefined, config = {}) {
3811
3835
  return await this.fetch2(path, api, method, params, headers, body, config);
@@ -1460,7 +1460,7 @@ class bigone extends bigone$1 {
1460
1460
  * @param {string} type 'market' or 'limit'
1461
1461
  * @param {string} side 'buy' or 'sell'
1462
1462
  * @param {float} amount how much of currency you want to trade in units of base currency
1463
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1463
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1464
1464
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1465
1465
  * @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
1466
1466
  * @param {bool} [params.postOnly] if true, the order will only be posted to the order book and not executed immediately
@@ -1543,7 +1543,7 @@ class binance extends binance$1 {
1543
1543
  '-3042': errors.BadRequest,
1544
1544
  '-3043': errors.PermissionDenied,
1545
1545
  '-3044': errors.OperationFailed,
1546
- '-3045': errors.OperationFailed,
1546
+ '-3045': errors.OperationRejected,
1547
1547
  '-3999': errors.PermissionDenied,
1548
1548
  //
1549
1549
  // 4xxx (different from contract markets)
@@ -1562,7 +1562,7 @@ class binance extends binance$1 {
1562
1562
  '-4011': errors.BadRequest,
1563
1563
  '-4012': errors.PermissionDenied,
1564
1564
  '-4013': errors.AuthenticationError,
1565
- '-4014': errors.OperationFailed,
1565
+ '-4014': errors.OperationRejected,
1566
1566
  '-4015': errors.PermissionDenied,
1567
1567
  '-4016': errors.PermissionDenied,
1568
1568
  '-4017': errors.PermissionDenied,
@@ -1571,7 +1571,7 @@ class binance extends binance$1 {
1571
1571
  '-4020': errors.ExchangeError,
1572
1572
  '-4021': errors.BadRequest,
1573
1573
  '-4022': errors.BadRequest,
1574
- '-4023': errors.OperationFailed,
1574
+ '-4023': errors.OperationRejected,
1575
1575
  '-4024': errors.InsufficientFunds,
1576
1576
  '-4025': errors.InsufficientFunds,
1577
1577
  '-4026': errors.InsufficientFunds,
@@ -1580,7 +1580,7 @@ class binance extends binance$1 {
1580
1580
  '-4029': errors.BadRequest,
1581
1581
  '-4030': errors.BadResponse,
1582
1582
  '-4031': errors.OperationFailed,
1583
- '-4032': errors.OperationFailed,
1583
+ '-4032': errors.OperationRejected,
1584
1584
  '-4033': errors.BadRequest,
1585
1585
  '-4034': errors.OperationRejected,
1586
1586
  '-4035': errors.PermissionDenied,
@@ -1703,7 +1703,7 @@ class binance extends binance$1 {
1703
1703
  '-5003': errors.InsufficientFunds,
1704
1704
  '-5004': errors.OperationRejected,
1705
1705
  '-5005': errors.OperationRejected,
1706
- '-5006': errors.OperationFailed,
1706
+ '-5006': errors.OperationRejected,
1707
1707
  '-5007': errors.BadRequest,
1708
1708
  '-5008': errors.OperationRejected,
1709
1709
  '-5009': errors.BadSymbol,
@@ -1721,8 +1721,8 @@ class binance extends binance$1 {
1721
1721
  '-6004': errors.BadRequest,
1722
1722
  '-6005': errors.BadRequest,
1723
1723
  '-6006': errors.BadRequest,
1724
- '-6007': errors.OperationFailed,
1725
- '-6008': errors.OperationFailed,
1724
+ '-6007': errors.OperationRejected,
1725
+ '-6008': errors.OperationRejected,
1726
1726
  '-6009': errors.RateLimitExceeded,
1727
1727
  '-6011': errors.OperationRejected,
1728
1728
  '-6012': errors.InsufficientFunds,
@@ -4746,7 +4746,7 @@ class binance extends binance$1 {
4746
4746
  * @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
4747
4747
  * @param {string} side 'buy' or 'sell'
4748
4748
  * @param {float} amount how much of currency you want to trade in units of base currency
4749
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
4749
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4750
4750
  * @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
4751
4751
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4752
4752
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -4811,7 +4811,7 @@ class binance extends binance$1 {
4811
4811
  * @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
4812
4812
  * @param {string} side 'buy' or 'sell'
4813
4813
  * @param {float} amount how much of currency you want to trade in units of base currency
4814
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
4814
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4815
4815
  * @param {object} params extra parameters specific to the exchange API endpoint
4816
4816
  * @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
4817
4817
  * @returns {object} request to be sent to the exchange
@@ -4970,7 +4970,7 @@ class binance extends binance$1 {
4970
4970
  * @param {string} type 'market' or 'limit'
4971
4971
  * @param {string} side 'buy' or 'sell'
4972
4972
  * @param {float} amount how much of currency you want to trade in units of base currency
4973
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
4973
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4974
4974
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4975
4975
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
4976
4976
  */
@@ -5026,7 +5026,7 @@ class binance extends binance$1 {
5026
5026
  * @param {string} type 'market' or 'limit'
5027
5027
  * @param {string} side 'buy' or 'sell'
5028
5028
  * @param {float} amount how much of currency you want to trade in units of base currency
5029
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
5029
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
5030
5030
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5031
5031
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
5032
5032
  */
@@ -5724,7 +5724,7 @@ class binance extends binance$1 {
5724
5724
  * @param {string} type 'market' or 'limit' or 'STOP_LOSS' or 'STOP_LOSS_LIMIT' or 'TAKE_PROFIT' or 'TAKE_PROFIT_LIMIT' or 'STOP'
5725
5725
  * @param {string} side 'buy' or 'sell'
5726
5726
  * @param {float} amount how much of you want to trade in units of the base currency
5727
- * @param {float} [price] the price that the order is to be fullfilled, in units of the quote currency, ignored in market orders
5727
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
5728
5728
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5729
5729
  * @param {string} [params.reduceOnly] for swap and future reduceOnly is a string 'true' or 'false' that cant be sent with close position set to true or in hedge mode. For spot margin and option reduceOnly is a boolean.
5730
5730
  * @param {string} [params.marginMode] 'cross' or 'isolated', for spot margin trading
@@ -5827,7 +5827,7 @@ class binance extends binance$1 {
5827
5827
  * @param {string} type 'market' or 'limit'
5828
5828
  * @param {string} side 'buy' or 'sell'
5829
5829
  * @param {float} amount how much you want to trade in units of the base currency
5830
- * @param {float} [price] the price that the order is to be fullfilled, in units of the quote currency, ignored in market orders
5830
+ * @param {float} [price] the price that the order is to be fulfilled, in units of the quote currency, ignored in market orders
5831
5831
  * @param {object} [params] extra parameters specific to the exchange API endpoint
5832
5832
  * @returns {object} request to be sent to the exchange
5833
5833
  */
@@ -101,6 +101,7 @@ class bingx extends bingx$1 {
101
101
  'subAccount': 'https://open-api.{hostname}/openApi',
102
102
  'account': 'https://open-api.{hostname}/openApi',
103
103
  'copyTrading': 'https://open-api.{hostname}/openApi',
104
+ 'cswap': 'https://open-api.{hostname}/openApi',
104
105
  },
105
106
  'test': {
106
107
  'swap': 'https://open-api-vst.{hostname}/openApi', // only swap is really "test" but since the API keys are the same, we want to keep all the functionalities when the user enables the sandboxmode
@@ -263,6 +264,36 @@ class bingx extends bingx$1 {
263
264
  },
264
265
  },
265
266
  },
267
+ 'cswap': {
268
+ 'v1': {
269
+ 'public': {
270
+ 'get': {
271
+ 'market/contracts': 1,
272
+ 'market/premiumIndex': 1,
273
+ 'market/openInterest': 1,
274
+ 'market/klines': 1,
275
+ 'market/depth': 1,
276
+ 'market/ticker': 1,
277
+ },
278
+ },
279
+ 'private': {
280
+ 'get': {
281
+ 'trade/leverage': 2,
282
+ 'trade/forceOrders': 2,
283
+ 'trade/allFillOrders': 2,
284
+ 'user/commissionRate': 2,
285
+ 'user/positions': 2,
286
+ 'user/balance': 2,
287
+ },
288
+ 'post': {
289
+ 'trade/order': 2,
290
+ 'trade/leverage': 2,
291
+ 'trade/allOpenOrders': 2,
292
+ 'trade/closeAllPositions': 2,
293
+ },
294
+ },
295
+ },
296
+ },
266
297
  'contract': {
267
298
  'v1': {
268
299
  'private': {
@@ -1523,7 +1554,10 @@ class bingx extends bingx$1 {
1523
1554
  percentage = percentage.replace('%', '');
1524
1555
  }
1525
1556
  const change = this.safeString(ticker, 'priceChange');
1526
- const ts = this.safeInteger(ticker, 'closeTime');
1557
+ let ts = this.safeInteger(ticker, 'closeTime');
1558
+ if (ts === 0) {
1559
+ ts = undefined;
1560
+ }
1527
1561
  const datetime = this.iso8601(ts);
1528
1562
  const bid = this.safeString(ticker, 'bidPrice');
1529
1563
  const bidVolume = this.safeString(ticker, 'bidQty');
@@ -1843,7 +1877,7 @@ class bingx extends bingx$1 {
1843
1877
  * @param {string} type 'market' or 'limit'
1844
1878
  * @param {string} side 'buy' or 'sell'
1845
1879
  * @param {float} amount how much you want to trade in units of the base currency
1846
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1880
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1847
1881
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1848
1882
  * @returns {object} request to be sent to the exchange
1849
1883
  */
@@ -2043,7 +2077,7 @@ class bingx extends bingx$1 {
2043
2077
  * @param {string} type 'market' or 'limit'
2044
2078
  * @param {string} side 'buy' or 'sell'
2045
2079
  * @param {float} amount how much you want to trade in units of the base currency
2046
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2080
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2047
2081
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2048
2082
  * @param {string} [params.clientOrderId] a unique id for the order
2049
2083
  * @param {bool} [params.postOnly] true to place a post only order
@@ -4384,7 +4418,7 @@ class bingx extends bingx$1 {
4384
4418
  * @param {string} type 'market' or 'limit'
4385
4419
  * @param {string} side 'buy' or 'sell'
4386
4420
  * @param {float} amount how much of the currency you want to trade in units of the base currency
4387
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
4421
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4388
4422
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4389
4423
  * @param {string} [params.stopPrice] Trigger price used for TAKE_STOP_LIMIT, TAKE_STOP_MARKET, TRIGGER_LIMIT, TRIGGER_MARKET order types.
4390
4424
  * @param {object} [params.takeProfit] *takeProfit object in params* containing the triggerPrice at which the attached take profit order will be triggered
@@ -426,7 +426,7 @@ class bit2c extends bit2c$1 {
426
426
  * @param {string} type 'market' or 'limit'
427
427
  * @param {string} side 'buy' or 'sell'
428
428
  * @param {float} amount how much of currency you want to trade in units of base currency
429
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
429
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
430
430
  * @param {object} [params] extra parameters specific to the exchange API endpoint
431
431
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
432
432
  */
@@ -648,7 +648,7 @@ class bitbank extends bitbank$1 {
648
648
  * @param {string} type 'market' or 'limit'
649
649
  * @param {string} side 'buy' or 'sell'
650
650
  * @param {float} amount how much of currency you want to trade in units of base currency
651
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
651
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
652
652
  * @param {object} [params] extra parameters specific to the exchange API endpoint
653
653
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
654
654
  */
@@ -587,7 +587,7 @@ class bitbns extends bitbns$1 {
587
587
  * @param {string} type 'market' or 'limit'
588
588
  * @param {string} side 'buy' or 'sell'
589
589
  * @param {float} amount how much of currency you want to trade in units of base currency
590
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
590
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
591
591
  * @param {object} [params] extra parameters specific to the exchange API endpoint
592
592
  * @param {float} [params.triggerPrice] the price at which a trigger order is triggered at
593
593
  *
@@ -1082,7 +1082,7 @@ class bitfinex extends bitfinex$1 {
1082
1082
  * @param {string} type 'market' or 'limit'
1083
1083
  * @param {string} side 'buy' or 'sell'
1084
1084
  * @param {float} amount how much of currency you want to trade in units of base currency
1085
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1085
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1086
1086
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1087
1087
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1088
1088
  */
@@ -3656,7 +3656,7 @@ class bitfinex2 extends bitfinex2$1 {
3656
3656
  * @param {string} type 'market' or 'limit'
3657
3657
  * @param {string} side 'buy' or 'sell'
3658
3658
  * @param {float} amount how much you want to trade in units of the base currency
3659
- * @param {float} [price] the price that the order is to be fullfilled, in units of the quote currency, ignored in market orders
3659
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3660
3660
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3661
3661
  * @param {float} [params.stopPrice] the price that triggers a trigger order
3662
3662
  * @param {boolean} [params.postOnly] set to true if you want to make a post only order
@@ -554,7 +554,7 @@ class bitflyer extends bitflyer$1 {
554
554
  * @param {string} type 'market' or 'limit'
555
555
  * @param {string} side 'buy' or 'sell'
556
556
  * @param {float} amount how much of currency you want to trade in units of base currency
557
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
557
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
558
558
  * @param {object} [params] extra parameters specific to the exchange API endpoint
559
559
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
560
560
  */
@@ -593,7 +593,13 @@ class bitflyer extends bitflyer$1 {
593
593
  'product_code': this.marketId(symbol),
594
594
  'child_order_acceptance_id': id,
595
595
  };
596
- return await this.privatePostCancelchildorder(this.extend(request, params));
596
+ const response = await this.privatePostCancelchildorder(this.extend(request, params));
597
+ //
598
+ // 200 OK.
599
+ //
600
+ return this.safeOrder({
601
+ 'info': response,
602
+ });
597
603
  }
598
604
  parseOrderStatus(status) {
599
605
  const statuses = {
@@ -4129,7 +4129,7 @@ class bitget extends bitget$1 {
4129
4129
  * @param {string} type 'market' or 'limit'
4130
4130
  * @param {string} side 'buy' or 'sell'
4131
4131
  * @param {float} amount how much you want to trade in units of the base currency
4132
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
4132
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4133
4133
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4134
4134
  * @param {float} [params.cost] *spot only* how much you want to trade in units of the quote currency, for market buy orders only
4135
4135
  * @param {float} [params.triggerPrice] *swap only* The price at which a trigger order is triggered at
@@ -4564,7 +4564,7 @@ class bitget extends bitget$1 {
4564
4564
  * @param {string} type 'market' or 'limit'
4565
4565
  * @param {string} side 'buy' or 'sell'
4566
4566
  * @param {float} amount how much you want to trade in units of the base currency
4567
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
4567
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4568
4568
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4569
4569
  * @param {float} [params.triggerPrice] the price that a trigger order is triggered at
4570
4570
  * @param {float} [params.stopLossPrice] *swap only* The price at which a stop loss order is triggered at
@@ -698,7 +698,7 @@ class bithumb extends bithumb$1 {
698
698
  * @param {string} type 'market' or 'limit'
699
699
  * @param {string} side 'buy' or 'sell'
700
700
  * @param {float} amount how much of currency you want to trade in units of base currency
701
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
701
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
702
702
  * @param {object} [params] extra parameters specific to the exchange API endpoint
703
703
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
704
704
  */
@@ -2419,7 +2419,7 @@ class bitmart extends bitmart$1 {
2419
2419
  * @param {string} type 'market', 'limit' or 'trailing' for swap markets only
2420
2420
  * @param {string} side 'buy' or 'sell'
2421
2421
  * @param {float} amount how much of currency you want to trade in units of base currency
2422
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2422
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2423
2423
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2424
2424
  * @param {string} [params.marginMode] 'cross' or 'isolated'
2425
2425
  * @param {string} [params.leverage] *swap only* leverage level
@@ -2564,7 +2564,7 @@ class bitmart extends bitmart$1 {
2564
2564
  * @param {string} type 'market', 'limit' or 'trailing'
2565
2565
  * @param {string} side 'buy' or 'sell'
2566
2566
  * @param {float} amount how much of currency you want to trade in units of base currency
2567
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2567
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2568
2568
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2569
2569
  * @param {int} [params.leverage] leverage level
2570
2570
  * @param {boolean} [params.reduceOnly] *swap only* reduce only
@@ -2680,7 +2680,7 @@ class bitmart extends bitmart$1 {
2680
2680
  * @param {string} type 'market' or 'limit'
2681
2681
  * @param {string} side 'buy' or 'sell'
2682
2682
  * @param {float} amount how much of currency you want to trade in units of base currency
2683
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
2683
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
2684
2684
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2685
2685
  * @param {string} [params.marginMode] 'cross' or 'isolated'
2686
2686
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1862,7 +1862,7 @@ class bitmex extends bitmex$1 {
1862
1862
  * @param {string} type 'market' or 'limit'
1863
1863
  * @param {string} side 'buy' or 'sell'
1864
1864
  * @param {float} amount how much of currency you want to trade in units of base currency
1865
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1865
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1866
1866
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1867
1867
  * @param {object} [params.triggerPrice] the price at which a trigger order is triggered at
1868
1868
  * @param {object} [params.triggerDirection] the direction whenever the trigger happens with relation to price - 'above' or 'below'
@@ -1001,7 +1001,7 @@ class bitopro extends bitopro$1 {
1001
1001
  * @param {string} type 'market' or 'limit'
1002
1002
  * @param {string} side 'buy' or 'sell'
1003
1003
  * @param {float} amount how much of currency you want to trade in units of base currency
1004
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1004
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1005
1005
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1006
1006
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1007
1007
  */
@@ -1085,6 +1085,22 @@ class bitopro extends bitopro$1 {
1085
1085
  //
1086
1086
  return this.parseOrder(response, market);
1087
1087
  }
1088
+ parseCancelOrders(data) {
1089
+ const dataKeys = Object.keys(data);
1090
+ const orders = [];
1091
+ for (let i = 0; i < dataKeys.length; i++) {
1092
+ const marketId = dataKeys[i];
1093
+ const orderIds = data[marketId];
1094
+ for (let j = 0; j < orderIds.length; j++) {
1095
+ orders.push(this.safeOrder({
1096
+ 'info': orderIds[j],
1097
+ 'id': orderIds[j],
1098
+ 'symbol': this.safeSymbol(marketId),
1099
+ }));
1100
+ }
1101
+ }
1102
+ return orders;
1103
+ }
1088
1104
  async cancelOrders(ids, symbol = undefined, params = {}) {
1089
1105
  /**
1090
1106
  * @method
@@ -1115,7 +1131,8 @@ class bitopro extends bitopro$1 {
1115
1131
  // }
1116
1132
  // }
1117
1133
  //
1118
- return response;
1134
+ const data = this.safeDict(response, 'data');
1135
+ return this.parseCancelOrders(data);
1119
1136
  }
1120
1137
  async cancelAllOrders(symbol = undefined, params = {}) {
1121
1138
  /**
@@ -1140,7 +1157,7 @@ class bitopro extends bitopro$1 {
1140
1157
  else {
1141
1158
  response = await this.privateDeleteOrdersAll(this.extend(request, params));
1142
1159
  }
1143
- const result = this.safeValue(response, 'data', {});
1160
+ const data = this.safeValue(response, 'data', {});
1144
1161
  //
1145
1162
  // {
1146
1163
  // "data":{
@@ -1151,7 +1168,7 @@ class bitopro extends bitopro$1 {
1151
1168
  // }
1152
1169
  // }
1153
1170
  //
1154
- return result;
1171
+ return this.parseCancelOrders(data);
1155
1172
  }
1156
1173
  async fetchOrder(id, symbol = undefined, params = {}) {
1157
1174
  /**
@@ -1907,7 +1907,7 @@ class bitrue extends bitrue$1 {
1907
1907
  * @param {string} type 'market' or 'limit'
1908
1908
  * @param {string} side 'buy' or 'sell'
1909
1909
  * @param {float} amount how much of currency you want to trade in units of base currency
1910
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1910
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1911
1911
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1912
1912
  * @param {float} [params.triggerPrice] *spot only* the price at which a trigger order is triggered at
1913
1913
  * @param {string} [params.clientOrderId] a unique id for the order, automatically generated if not sent
@@ -965,7 +965,7 @@ class bitso extends bitso$1 {
965
965
  * @param {string} type 'market' or 'limit'
966
966
  * @param {string} side 'buy' or 'sell'
967
967
  * @param {float} amount how much of currency you want to trade in units of base currency
968
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
968
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
969
969
  * @param {object} [params] extra parameters specific to the exchange API endpoint
970
970
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
971
971
  */
@@ -1398,7 +1398,7 @@ class bitstamp extends bitstamp$1 {
1398
1398
  * @param {string} type 'market' or 'limit'
1399
1399
  * @param {string} side 'buy' or 'sell'
1400
1400
  * @param {float} amount how much of currency you want to trade in units of base currency
1401
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1401
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1402
1402
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1403
1403
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1404
1404
  */
@@ -981,7 +981,7 @@ class bitteam extends bitteam$1 {
981
981
  * @param {string} type 'market' or 'limit'
982
982
  * @param {string} side 'buy' or 'sell'
983
983
  * @param {float} amount how much of currency you want to trade in units of base currency
984
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
984
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
985
985
  * @param {object} [params] extra parameters specific to the bitteam api endpoint
986
986
  * @returns {object} an [order structure]{@link https://github.com/ccxt/ccxt/wiki/Manual#order-structure}
987
987
  */
@@ -1126,7 +1126,7 @@ class bitvavo extends bitvavo$1 {
1126
1126
  * @param {string} type 'market' or 'limit'
1127
1127
  * @param {string} side 'buy' or 'sell'
1128
1128
  * @param {float} amount how much of currency you want to trade in units of base currency
1129
- * @param {float} price the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1129
+ * @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1130
1130
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
1131
1131
  * @param {string} [params.timeInForce] "GTC", "IOC", or "PO"
1132
1132
  * @param {float} [params.stopPrice] The price at which a trigger order is triggered at
@@ -1227,7 +1227,7 @@ class bitvavo extends bitvavo$1 {
1227
1227
  * @param {string} type 'market' or 'limit'
1228
1228
  * @param {string} side 'buy' or 'sell'
1229
1229
  * @param {float} [amount] how much of currency you want to trade in units of base currency
1230
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
1230
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1231
1231
  * @param {object} [params] extra parameters specific to the bitvavo api endpoint
1232
1232
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
1233
1233
  */
@@ -387,7 +387,7 @@ class bl3p extends bl3p$1 {
387
387
  * @param {string} type 'market' or 'limit'
388
388
  * @param {string} side 'buy' or 'sell'
389
389
  * @param {float} amount how much of currency you want to trade in units of base currency
390
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
390
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
391
391
  * @param {object} [params] extra parameters specific to the exchange API endpoint
392
392
  *
393
393
  * EXCHANGE SPECIFIC PARAMETERS