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
@@ -134,9 +134,9 @@ class blockchaincom extends blockchaincom$1 {
134
134
  'percentage': true,
135
135
  'tiers': {
136
136
  'taker': [
137
- [this.parseNumber('0'), this.parseNumber('0.004')],
138
- [this.parseNumber('10000'), this.parseNumber('0.0022')],
139
- [this.parseNumber('50000'), this.parseNumber('0.002')],
137
+ [this.parseNumber('0'), this.parseNumber('0.0045')],
138
+ [this.parseNumber('10000'), this.parseNumber('0.0035')],
139
+ [this.parseNumber('50000'), this.parseNumber('0.0018')],
140
140
  [this.parseNumber('100000'), this.parseNumber('0.0018')],
141
141
  [this.parseNumber('500000'), this.parseNumber('0.0018')],
142
142
  [this.parseNumber('1000000'), this.parseNumber('0.0018')],
@@ -148,11 +148,11 @@ class blockchaincom extends blockchaincom$1 {
148
148
  [this.parseNumber('1000000000'), this.parseNumber('0.0006')],
149
149
  ],
150
150
  'maker': [
151
- [this.parseNumber('0'), this.parseNumber('0.002')],
152
- [this.parseNumber('10000'), this.parseNumber('0.0012')],
153
- [this.parseNumber('50000'), this.parseNumber('0.001')],
151
+ [this.parseNumber('0'), this.parseNumber('0.004')],
152
+ [this.parseNumber('10000'), this.parseNumber('0.0017')],
153
+ [this.parseNumber('50000'), this.parseNumber('0.0015')],
154
154
  [this.parseNumber('100000'), this.parseNumber('0.0008')],
155
- [this.parseNumber('500000'), this.parseNumber('0.0007000000000000001')],
155
+ [this.parseNumber('500000'), this.parseNumber('0.0007')],
156
156
  [this.parseNumber('1000000'), this.parseNumber('0.0006')],
157
157
  [this.parseNumber('2500000'), this.parseNumber('0.0005')],
158
158
  [this.parseNumber('5000000'), this.parseNumber('0.0004')],
@@ -226,7 +226,7 @@ class blockchaincom extends blockchaincom$1 {
226
226
  * @method
227
227
  * @name blockchaincom#fetchMarkets
228
228
  * @description retrieves data on all markets for blockchaincom
229
- * @see https://api.blockchain.com/v3/#/unauthenticated/getSymbols
229
+ * @see https://api.blockchain.com/v3/#getsymbols
230
230
  * @param {object} [params] extra parameters specific to the exchange API endpoint
231
231
  * @returns {object[]} an array of objects representing market data
232
232
  */
@@ -357,7 +357,7 @@ class blockchaincom extends blockchaincom$1 {
357
357
  * @method
358
358
  * @name blockchaincom#fetchOrderBook
359
359
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
360
- * @see https://api.blockchain.com/v3/#/unauthenticated/getL3OrderBook
360
+ * @see https://api.blockchain.com/v3/#getl3orderbook
361
361
  * @param {string} symbol unified symbol of the market to fetch the order book for
362
362
  * @param {int} [limit] the maximum amount of order book entries to return
363
363
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -370,7 +370,7 @@ class blockchaincom extends blockchaincom$1 {
370
370
  * @method
371
371
  * @name blockchaincom#fetchL3OrderBook
372
372
  * @description fetches level 3 information on open orders with bid (buy) and ask (sell) prices, volumes and other data
373
- * @see https://api.blockchain.com/v3/#/unauthenticated/getL3OrderBook
373
+ * @see https://api.blockchain.com/v3/#getl3orderbook
374
374
  * @param {string} symbol unified market symbol
375
375
  * @param {int} [limit] max number of orders to return, default is undefined
376
376
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -441,7 +441,7 @@ class blockchaincom extends blockchaincom$1 {
441
441
  * @method
442
442
  * @name blockchaincom#fetchTicker
443
443
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
444
- * @see https://api.blockchain.com/v3/#/unauthenticated/getTickerBySymbol
444
+ * @see https://api.blockchain.com/v3/#gettickerbysymbol
445
445
  * @param {string} symbol unified symbol of the market to fetch the ticker for
446
446
  * @param {object} [params] extra parameters specific to the exchange API endpoint
447
447
  * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -459,7 +459,7 @@ class blockchaincom extends blockchaincom$1 {
459
459
  * @method
460
460
  * @name blockchaincom#fetchTickers
461
461
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
462
- * @see https://api.blockchain.com/v3/#/unauthenticated/getTickers
462
+ * @see https://api.blockchain.com/v3/#gettickers
463
463
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
464
464
  * @param {object} [params] extra parameters specific to the exchange API endpoint
465
465
  * @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/#/?id=ticker-structure}
@@ -540,12 +540,12 @@ class blockchaincom extends blockchaincom$1 {
540
540
  * @method
541
541
  * @name blockchaincom#createOrder
542
542
  * @description create a trade order
543
- * @see https://api.blockchain.com/v3/#/trading/createOrder
543
+ * @see https://api.blockchain.com/v3/#createorder
544
544
  * @param {string} symbol unified symbol of the market to create an order in
545
545
  * @param {string} type 'market' or 'limit'
546
546
  * @param {string} side 'buy' or 'sell'
547
547
  * @param {float} amount how much of currency you want to trade in units of base currency
548
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
548
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
549
549
  * @param {object} [params] extra parameters specific to the exchange API endpoint
550
550
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
551
551
  */
@@ -603,7 +603,7 @@ class blockchaincom extends blockchaincom$1 {
603
603
  * @method
604
604
  * @name blockchaincom#cancelOrder
605
605
  * @description cancels an open order
606
- * @see https://api.blockchain.com/v3/#/trading/deleteOrder
606
+ * @see https://api.blockchain.com/v3/#deleteorder
607
607
  * @param {string} id order id
608
608
  * @param {string} symbol unified symbol of the market the order was made in
609
609
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -653,7 +653,7 @@ class blockchaincom extends blockchaincom$1 {
653
653
  * @method
654
654
  * @name blockchaincom#fetchTradingFees
655
655
  * @description fetch the trading fees for multiple markets
656
- * @see https://api.blockchain.com/v3/#/trading/getFees
656
+ * @see https://api.blockchain.com/v3/#getfees
657
657
  * @param {object} [params] extra parameters specific to the exchange API endpoint
658
658
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure} indexed by market symbols
659
659
  */
@@ -685,7 +685,7 @@ class blockchaincom extends blockchaincom$1 {
685
685
  * @method
686
686
  * @name blockchaincom#fetchCanceledOrders
687
687
  * @description fetches information on multiple canceled orders made by the user
688
- * @see https://api.blockchain.com/v3/#/trading/getOrders
688
+ * @see https://api.blockchain.com/v3/#getorders
689
689
  * @param {string} symbol unified market symbol of the market orders were made in
690
690
  * @param {int} [since] timestamp in ms of the earliest order, default is undefined
691
691
  * @param {int} [limit] max number of orders to return, default is undefined
@@ -700,7 +700,7 @@ class blockchaincom extends blockchaincom$1 {
700
700
  * @method
701
701
  * @name blockchaincom#fetchClosedOrders
702
702
  * @description fetches information on multiple closed orders made by the user
703
- * @see https://api.blockchain.com/v3/#/trading/getOrders
703
+ * @see https://api.blockchain.com/v3/#getorders
704
704
  * @param {string} symbol unified market symbol of the market orders were made in
705
705
  * @param {int} [since] the earliest time in ms to fetch orders for
706
706
  * @param {int} [limit] the maximum number of order structures to retrieve
@@ -715,7 +715,7 @@ class blockchaincom extends blockchaincom$1 {
715
715
  * @method
716
716
  * @name blockchaincom#fetchOpenOrders
717
717
  * @description fetch all unfilled currently open orders
718
- * @see https://api.blockchain.com/v3/#/trading/getOrders
718
+ * @see https://api.blockchain.com/v3/#getorders
719
719
  * @param {string} symbol unified market symbol
720
720
  * @param {int} [since] the earliest time in ms to fetch open orders for
721
721
  * @param {int} [limit] the maximum number of open orders structures to retrieve
@@ -792,7 +792,7 @@ class blockchaincom extends blockchaincom$1 {
792
792
  * @method
793
793
  * @name blockchaincom#fetchMyTrades
794
794
  * @description fetch all trades made by the user
795
- * @see https://api.blockchain.com/v3/#/trading/getFills
795
+ * @see https://api.blockchain.com/v3/#getfills
796
796
  * @param {string} symbol unified market symbol
797
797
  * @param {int} [since] the earliest time in ms to fetch trades for
798
798
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -817,7 +817,7 @@ class blockchaincom extends blockchaincom$1 {
817
817
  * @method
818
818
  * @name blockchaincom#fetchDepositAddress
819
819
  * @description fetch the deposit address for a currency associated with this account
820
- * @see https://api.blockchain.com/v3/#/payments/getDepositAddress
820
+ * @see https://api.blockchain.com/v3/#getdepositaddress
821
821
  * @param {string} code unified currency code
822
822
  * @param {object} [params] extra parameters specific to the exchange API endpoint
823
823
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -931,7 +931,7 @@ class blockchaincom extends blockchaincom$1 {
931
931
  * @method
932
932
  * @name blockchaincom#withdraw
933
933
  * @description make a withdrawal
934
- * @see https://api.blockchain.com/v3/#/payments/createWithdrawal
934
+ * @see https://api.blockchain.com/v3/#createwithdrawal
935
935
  * @param {string} code unified currency code
936
936
  * @param {float} amount the amount to withdraw
937
937
  * @param {string} address the address to withdraw to
@@ -966,7 +966,7 @@ class blockchaincom extends blockchaincom$1 {
966
966
  * @method
967
967
  * @name blockchaincom#fetchWithdrawals
968
968
  * @description fetch all withdrawals made from an account
969
- * @see https://api.blockchain.com/v3/#/payments/getWithdrawals
969
+ * @see https://api.blockchain.com/v3/#getwithdrawals
970
970
  * @param {string} code unified currency code
971
971
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
972
972
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -993,7 +993,7 @@ class blockchaincom extends blockchaincom$1 {
993
993
  * @method
994
994
  * @name blockchaincom#fetchWithdrawal
995
995
  * @description fetch data on a currency withdrawal via the withdrawal id
996
- * @see https://api.blockchain.com/v3/#/payments/getWithdrawalById
996
+ * @see https://api.blockchain.com/v3/#getwithdrawalbyid
997
997
  * @param {string} id withdrawal id
998
998
  * @param {string} code not used by blockchaincom.fetchWithdrawal
999
999
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1011,7 +1011,7 @@ class blockchaincom extends blockchaincom$1 {
1011
1011
  * @method
1012
1012
  * @name blockchaincom#fetchDeposits
1013
1013
  * @description fetch all deposits made to an account
1014
- * @see https://api.blockchain.com/v3/#/payments/getDeposits
1014
+ * @see https://api.blockchain.com/v3/#getdeposits
1015
1015
  * @param {string} code unified currency code
1016
1016
  * @param {int} [since] the earliest time in ms to fetch deposits for
1017
1017
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -1038,7 +1038,7 @@ class blockchaincom extends blockchaincom$1 {
1038
1038
  * @method
1039
1039
  * @name blockchaincom#fetchDeposit
1040
1040
  * @description fetch information on a deposit
1041
- * @see https://api.blockchain.com/v3/#/payments/getDepositById
1041
+ * @see https://api.blockchain.com/v3/#getdepositbyid
1042
1042
  * @param {string} id deposit id
1043
1043
  * @param {string} code not used by blockchaincom fetchDeposit ()
1044
1044
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1057,7 +1057,7 @@ class blockchaincom extends blockchaincom$1 {
1057
1057
  * @method
1058
1058
  * @name blockchaincom#fetchBalance
1059
1059
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
1060
- * @see https://api.blockchain.com/v3/#/payments/getAccounts
1060
+ * @see https://api.blockchain.com/v3/#getaccounts
1061
1061
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1062
1062
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/#/?id=balance-structure}
1063
1063
  */
@@ -1104,7 +1104,7 @@ class blockchaincom extends blockchaincom$1 {
1104
1104
  * @method
1105
1105
  * @name blockchaincom#fetchOrder
1106
1106
  * @description fetches information on an order made by the user
1107
- * @see https://api.blockchain.com/v3/#/trading/getOrderById
1107
+ * @see https://api.blockchain.com/v3/#getorderbyid
1108
1108
  * @param {string} symbol not used by blockchaincom fetchOrder
1109
1109
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1110
1110
  * @returns {object} An [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1163,7 +1163,7 @@ class blofin extends blofin$1 {
1163
1163
  * @param {string} type 'market' or 'limit' or 'post_only' or 'ioc' or 'fok'
1164
1164
  * @param {string} side 'buy' or 'sell'
1165
1165
  * @param {float} amount how much of currency you want to trade in units of base currency
1166
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1166
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1167
1167
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1168
1168
  * @param {bool} [params.reduceOnly] a mark to reduce the position size for margin, swap and future orders
1169
1169
  * @param {bool} [params.postOnly] true to place a post only order
@@ -741,7 +741,7 @@ class btcalpha extends btcalpha$1 {
741
741
  * @param {string} type 'limit'
742
742
  * @param {string} side 'buy' or 'sell'
743
743
  * @param {float} amount how much of currency you want to trade in units of base currency
744
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
744
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
745
745
  * @param {object} [params] extra parameters specific to the exchange API endpoint
746
746
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
747
747
  */
@@ -929,21 +929,13 @@ class btcalpha extends btcalpha$1 {
929
929
  // {"date":1570599531.4814300537,"error":"Out of balance -9.99243661 BTC"}
930
930
  //
931
931
  const error = this.safeString(response, 'error');
932
- const feedback = this.id + ' ' + body;
933
932
  if (error !== undefined) {
933
+ const feedback = this.id + ' ' + body;
934
934
  this.throwExactlyMatchedException(this.exceptions['exact'], error, feedback);
935
935
  this.throwBroadlyMatchedException(this.exceptions['broad'], error, feedback);
936
+ throw new errors.ExchangeError(feedback); // unknown error
936
937
  }
937
- if (code === 401 || code === 403) {
938
- throw new errors.AuthenticationError(feedback);
939
- }
940
- else if (code === 429) {
941
- throw new errors.DDoSProtection(feedback);
942
- }
943
- if (code < 400) {
944
- return undefined;
945
- }
946
- throw new errors.ExchangeError(feedback);
938
+ return undefined;
947
939
  }
948
940
  }
949
941
 
@@ -302,7 +302,7 @@ class btcbox extends btcbox$1 {
302
302
  * @param {string} type 'market' or 'limit'
303
303
  * @param {string} side 'buy' or 'sell'
304
304
  * @param {float} amount how much of currency you want to trade in units of base currency
305
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
305
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
306
306
  * @param {object} [params] extra parameters specific to the exchange API endpoint
307
307
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
308
308
  */
@@ -153,16 +153,17 @@ class btcmarkets extends btcmarkets$1 {
153
153
  },
154
154
  'precisionMode': number.TICK_SIZE,
155
155
  'exceptions': {
156
- '3': errors.InvalidOrder,
157
- '6': errors.DDoSProtection,
158
- 'InsufficientFund': errors.InsufficientFunds,
159
- 'InvalidPrice': errors.InvalidOrder,
160
- 'InvalidAmount': errors.InvalidOrder,
161
- 'MissingArgument': errors.InvalidOrder,
162
- 'OrderAlreadyCancelled': errors.InvalidOrder,
163
- 'OrderNotFound': errors.OrderNotFound,
164
- 'OrderStatusIsFinal': errors.InvalidOrder,
165
- 'InvalidPaginationParameter': errors.BadRequest,
156
+ 'exact': {
157
+ 'InsufficientFund': errors.InsufficientFunds,
158
+ 'InvalidPrice': errors.InvalidOrder,
159
+ 'InvalidAmount': errors.InvalidOrder,
160
+ 'MissingArgument': errors.BadRequest,
161
+ 'OrderAlreadyCancelled': errors.InvalidOrder,
162
+ 'OrderNotFound': errors.OrderNotFound,
163
+ 'OrderStatusIsFinal': errors.InvalidOrder,
164
+ 'InvalidPaginationParameter': errors.BadRequest,
165
+ },
166
+ 'broad': {},
166
167
  },
167
168
  'fees': {
168
169
  'percentage': true,
@@ -377,7 +378,8 @@ class btcmarkets extends btcmarkets$1 {
377
378
  // "minOrderAmount":"0.00007",
378
379
  // "maxOrderAmount":"1000000",
379
380
  // "amountDecimals":"8",
380
- // "priceDecimals":"2"
381
+ // "priceDecimals":"2",
382
+ // "status": "Online"
381
383
  // }
382
384
  // ]
383
385
  //
@@ -394,6 +396,7 @@ class btcmarkets extends btcmarkets$1 {
394
396
  const pricePrecision = this.parseNumber(this.parsePrecision(this.safeString(market, 'priceDecimals')));
395
397
  const minAmount = this.safeNumber(market, 'minOrderAmount');
396
398
  const maxAmount = this.safeNumber(market, 'maxOrderAmount');
399
+ const status = this.safeString(market, 'status');
397
400
  let minPrice = undefined;
398
401
  if (quote === 'AUD') {
399
402
  minPrice = pricePrecision;
@@ -413,7 +416,7 @@ class btcmarkets extends btcmarkets$1 {
413
416
  'swap': false,
414
417
  'future': false,
415
418
  'option': false,
416
- 'active': undefined,
419
+ 'active': (status === 'Online'),
417
420
  'contract': false,
418
421
  'linear': undefined,
419
422
  'inverse': undefined,
@@ -788,7 +791,7 @@ class btcmarkets extends btcmarkets$1 {
788
791
  * @param {string} type 'market' or 'limit'
789
792
  * @param {string} side 'buy' or 'sell'
790
793
  * @param {float} amount how much of currency you want to trade in units of base currency
791
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
794
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
792
795
  * @param {object} [params] extra parameters specific to the exchange API endpoint
793
796
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
794
797
  */
@@ -1280,22 +1283,18 @@ class btcmarkets extends btcmarkets$1 {
1280
1283
  if (response === undefined) {
1281
1284
  return undefined; // fallback to default error handler
1282
1285
  }
1283
- if ('success' in response) {
1284
- if (!response['success']) {
1285
- const error = this.safeString(response, 'errorCode');
1286
- const feedback = this.id + ' ' + body;
1287
- this.throwExactlyMatchedException(this.exceptions, error, feedback);
1288
- throw new errors.ExchangeError(feedback);
1289
- }
1290
- }
1291
- // v3 api errors
1292
- if (code >= 400) {
1293
- const errorCode = this.safeString(response, 'code');
1294
- const message = this.safeString(response, 'message');
1286
+ //
1287
+ // {"code":"UnAuthorized","message":"invalid access token"}
1288
+ // {"code":"MarketNotFound","message":"invalid marketId"}
1289
+ //
1290
+ const errorCode = this.safeString(response, 'code');
1291
+ const message = this.safeString(response, 'message');
1292
+ if (errorCode !== undefined) {
1295
1293
  const feedback = this.id + ' ' + body;
1296
- this.throwExactlyMatchedException(this.exceptions, errorCode, feedback);
1297
- this.throwExactlyMatchedException(this.exceptions, message, feedback);
1298
- throw new errors.ExchangeError(feedback);
1294
+ this.throwExactlyMatchedException(this.exceptions['exact'], message, feedback);
1295
+ this.throwExactlyMatchedException(this.exceptions['exact'], errorCode, feedback);
1296
+ this.throwBroadlyMatchedException(this.exceptions['broad'], message, feedback);
1297
+ throw new errors.ExchangeError(feedback); // unknown message
1299
1298
  }
1300
1299
  return undefined;
1301
1300
  }
@@ -672,7 +672,7 @@ class btcturk extends btcturk$1 {
672
672
  * @param {string} type 'market' or 'limit'
673
673
  * @param {string} side 'buy' or 'sell'
674
674
  * @param {float} amount how much of currency you want to trade in units of base currency
675
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
675
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
676
676
  * @param {object} [params] extra parameters specific to the exchange API endpoint
677
677
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
678
678
  */
@@ -3058,16 +3058,20 @@ class bybit extends bybit$1 {
3058
3058
  const [enableUnifiedMargin, enableUnifiedAccount] = await this.isUnifiedEnabled();
3059
3059
  const isUnifiedAccount = (enableUnifiedMargin || enableUnifiedAccount);
3060
3060
  let type = undefined;
3061
- [type, params] = this.handleMarketTypeAndParams('fetchBalance', undefined, params);
3061
+ [type, params] = this.getBybitType('fetchBalance', undefined, params);
3062
3062
  const isSpot = (type === 'spot');
3063
- const isSwap = (type === 'swap');
3063
+ const isLinear = (type === 'linear');
3064
+ const isInverse = (type === 'inverse');
3064
3065
  if (isUnifiedAccount) {
3065
- if (isSpot || isSwap) {
3066
+ if (isInverse) {
3067
+ type = 'contract';
3068
+ }
3069
+ else {
3066
3070
  type = 'unified';
3067
3071
  }
3068
3072
  }
3069
3073
  else {
3070
- if (isSwap) {
3074
+ if (isLinear || isInverse) {
3071
3075
  type = 'contract';
3072
3076
  }
3073
3077
  }
@@ -3387,7 +3391,7 @@ class bybit extends bybit$1 {
3387
3391
  feeCurrencyCode = market['inverse'] ? market['base'] : market['settle'];
3388
3392
  }
3389
3393
  fee = {
3390
- 'cost': feeCostString,
3394
+ 'cost': this.parseNumber(feeCostString),
3391
3395
  'currency': feeCurrencyCode,
3392
3396
  };
3393
3397
  }
@@ -3508,7 +3512,7 @@ class bybit extends bybit$1 {
3508
3512
  * @param {string} type 'market' or 'limit'
3509
3513
  * @param {string} side 'buy' or 'sell'
3510
3514
  * @param {float} amount how much of currency you want to trade in units of base currency
3511
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
3515
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
3512
3516
  * @param {object} [params] extra parameters specific to the exchange API endpoint
3513
3517
  * @param {string} [params.timeInForce] "GTC", "IOC", "FOK"
3514
3518
  * @param {bool} [params.postOnly] true or false whether the order is post-only
@@ -4164,7 +4168,7 @@ class bybit extends bybit$1 {
4164
4168
  * @param {string} type 'market' or 'limit'
4165
4169
  * @param {string} side 'buy' or 'sell'
4166
4170
  * @param {float} amount how much of currency you want to trade in units of base currency
4167
- * @param {float} price the price at which the order is to be fullfilled, in units of the base currency, ignored in market orders
4171
+ * @param {float} price the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
4168
4172
  * @param {object} [params] extra parameters specific to the exchange API endpoint
4169
4173
  * @param {float} [params.triggerPrice] The price that a trigger order is triggered at
4170
4174
  * @param {float} [params.stopLossPrice] The price that a stop loss order is triggered at
@@ -757,7 +757,7 @@ class cex extends cex$1 {
757
757
  * @param {string} type 'market' or 'limit'
758
758
  * @param {string} side 'buy' or 'sell'
759
759
  * @param {float} amount how much of currency you want to trade in units of base currency
760
- * @param {float} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
760
+ * @param {float} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
761
761
  * @param {object} [params] extra parameters specific to the exchange API endpoint
762
762
  * @param {float} [params.cost] the quote quantity that can be used as an alternative for the amount for market buy orders
763
763
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/#/?id=order-structure}
@@ -1565,7 +1565,7 @@ class cex extends cex$1 {
1565
1565
  * @param {string} type 'market' or 'limit'
1566
1566
  * @param {string} side 'buy' or 'sell'
1567
1567
  * @param {float} amount how much of the currency you want to trade in units of the base currency
1568
- * @param {float|undefined} [price] the price at which the order is to be fullfilled, in units of the quote currency, ignored in market orders
1568
+ * @param {float|undefined} [price] the price at which the order is to be fulfilled, in units of the quote currency, ignored in market orders
1569
1569
  * @param {object} [params] extra parameters specific to the cex api endpoint
1570
1570
  * @returns {object} an [order structure]{@link https://docs.ccxt.com/en/latest/manual.html#order-structure}
1571
1571
  */