ccxt 4.1.51 → 4.1.53

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 (319) hide show
  1. package/README.md +108 -113
  2. package/dist/ccxt.browser.js +2295 -5268
  3. package/dist/ccxt.browser.min.js +3 -3
  4. package/dist/cjs/ccxt.js +1 -13
  5. package/dist/cjs/src/ace.js +56 -59
  6. package/dist/cjs/src/alpaca.js +62 -64
  7. package/dist/cjs/src/ascendex.js +1 -0
  8. package/dist/cjs/src/base/Exchange.js +11 -11
  9. package/dist/cjs/src/bigone.js +60 -77
  10. package/dist/cjs/src/binance.js +1 -0
  11. package/dist/cjs/src/bingx.js +52 -19
  12. package/dist/cjs/src/bitbank.js +58 -59
  13. package/dist/cjs/src/bitbns.js +1 -0
  14. package/dist/cjs/src/bitfinex.js +1 -0
  15. package/dist/cjs/src/bitfinex2.js +1 -0
  16. package/dist/cjs/src/bitflyer.js +1 -0
  17. package/dist/cjs/src/bitget.js +3 -8
  18. package/dist/cjs/src/bithumb.js +1 -0
  19. package/dist/cjs/src/bitmart.js +10 -1
  20. package/dist/cjs/src/bitmex.js +114 -119
  21. package/dist/cjs/src/bitopro.js +63 -65
  22. package/dist/cjs/src/bitpanda.js +60 -60
  23. package/dist/cjs/src/bitrue.js +67 -71
  24. package/dist/cjs/src/bitso.js +1 -0
  25. package/dist/cjs/src/bitstamp.js +1 -0
  26. package/dist/cjs/src/bittrex.js +57 -57
  27. package/dist/cjs/src/bitvavo.js +10 -2
  28. package/dist/cjs/src/blockchaincom.js +2 -2
  29. package/dist/cjs/src/btcalpha.js +59 -60
  30. package/dist/cjs/src/btcmarkets.js +68 -69
  31. package/dist/cjs/src/btcturk.js +72 -74
  32. package/dist/cjs/src/bybit.js +5 -12
  33. package/dist/cjs/src/coinbase.js +7 -2
  34. package/dist/cjs/src/coinbasepro.js +1 -0
  35. package/dist/cjs/src/coincheck.js +1 -0
  36. package/dist/cjs/src/coinex.js +4 -0
  37. package/dist/cjs/src/coinlist.js +60 -60
  38. package/dist/cjs/src/coinmate.js +1 -0
  39. package/dist/cjs/src/coinsph.js +2 -4
  40. package/dist/cjs/src/cryptocom.js +2 -0
  41. package/dist/cjs/src/currencycom.js +2 -2
  42. package/dist/cjs/src/deribit.js +2 -0
  43. package/dist/cjs/src/digifinex.js +11 -5
  44. package/dist/cjs/src/exmo.js +1 -0
  45. package/dist/cjs/src/gate.js +2 -0
  46. package/dist/cjs/src/gemini.js +2 -0
  47. package/dist/cjs/src/hitbtc.js +4 -0
  48. package/dist/cjs/src/hollaex.js +2 -0
  49. package/dist/cjs/src/htx.js +4 -0
  50. package/dist/cjs/src/huobijp.js +2 -0
  51. package/dist/cjs/src/idex.js +2 -0
  52. package/dist/cjs/src/indodax.js +1 -0
  53. package/dist/cjs/src/kraken.js +3 -3
  54. package/dist/cjs/src/kucoin.js +6 -5
  55. package/dist/cjs/src/kuna.js +3 -1
  56. package/dist/cjs/src/latoken.js +1 -0
  57. package/dist/cjs/src/lbank.js +2333 -442
  58. package/dist/cjs/src/lykke.js +2 -0
  59. package/dist/cjs/src/mercado.js +1 -0
  60. package/dist/cjs/src/mexc.js +2 -0
  61. package/dist/cjs/src/ndax.js +61 -61
  62. package/dist/cjs/src/novadax.js +58 -59
  63. package/dist/cjs/src/oceanex.js +58 -60
  64. package/dist/cjs/src/okcoin.js +3 -9
  65. package/dist/cjs/src/okx.js +2 -7
  66. package/dist/cjs/src/phemex.js +2 -0
  67. package/dist/cjs/src/poloniex.js +56 -57
  68. package/dist/cjs/src/poloniexfutures.js +67 -70
  69. package/dist/cjs/src/pro/binance.js +5 -3
  70. package/dist/cjs/src/pro/bingx.js +18 -11
  71. package/dist/cjs/src/pro/coinbase.js +12 -3
  72. package/dist/cjs/src/pro/cryptocom.js +17 -17
  73. package/dist/cjs/src/pro/krakenfutures.js +15 -15
  74. package/dist/cjs/src/pro/poloniexfutures.js +9 -0
  75. package/dist/cjs/src/probit.js +64 -65
  76. package/dist/cjs/src/tidex.js +1 -0
  77. package/dist/cjs/src/timex.js +3 -5
  78. package/dist/cjs/src/upbit.js +58 -58
  79. package/dist/cjs/src/wavesexchange.js +2 -1
  80. package/dist/cjs/src/wazirx.js +72 -74
  81. package/dist/cjs/src/whitebit.js +89 -91
  82. package/dist/cjs/src/woo.js +76 -77
  83. package/dist/cjs/src/zaif.js +58 -71
  84. package/dist/cjs/src/zonda.js +68 -70
  85. package/js/ccxt.d.ts +2 -14
  86. package/js/ccxt.js +2 -10
  87. package/js/src/abstract/bybit.d.ts +1 -0
  88. package/js/src/abstract/lbank.d.ts +57 -15
  89. package/js/src/ace.d.ts +8 -7
  90. package/js/src/ace.js +56 -59
  91. package/js/src/alpaca.d.ts +6 -5
  92. package/js/src/alpaca.js +62 -64
  93. package/js/src/ascendex.d.ts +12 -12
  94. package/js/src/ascendex.js +1 -0
  95. package/js/src/base/Exchange.d.ts +2 -0
  96. package/js/src/base/Exchange.js +11 -11
  97. package/js/src/base/types.d.ts +76 -71
  98. package/js/src/bigone.d.ts +12 -12
  99. package/js/src/bigone.js +60 -77
  100. package/js/src/binance.d.ts +27 -27
  101. package/js/src/binance.js +1 -0
  102. package/js/src/bingx.d.ts +17 -17
  103. package/js/src/bingx.js +52 -19
  104. package/js/src/bit2c.d.ts +5 -5
  105. package/js/src/bitbank.d.ts +7 -6
  106. package/js/src/bitbank.js +58 -59
  107. package/js/src/bitbns.d.ts +7 -7
  108. package/js/src/bitbns.js +1 -0
  109. package/js/src/bitfinex.d.ts +8 -8
  110. package/js/src/bitfinex.js +1 -0
  111. package/js/src/bitfinex2.d.ts +12 -12
  112. package/js/src/bitfinex2.js +1 -0
  113. package/js/src/bitflyer.d.ts +9 -9
  114. package/js/src/bitflyer.js +1 -0
  115. package/js/src/bitforex.d.ts +6 -6
  116. package/js/src/bitget.d.ts +25 -26
  117. package/js/src/bitget.js +3 -8
  118. package/js/src/bithumb.d.ts +4 -4
  119. package/js/src/bithumb.js +1 -0
  120. package/js/src/bitmart.d.ts +21 -21
  121. package/js/src/bitmart.js +10 -1
  122. package/js/src/bitmex.d.ts +16 -15
  123. package/js/src/bitmex.js +114 -119
  124. package/js/src/bitopro.d.ts +14 -13
  125. package/js/src/bitopro.js +63 -65
  126. package/js/src/bitpanda.d.ts +13 -12
  127. package/js/src/bitpanda.js +60 -60
  128. package/js/src/bitrue.d.ts +10 -9
  129. package/js/src/bitrue.js +67 -71
  130. package/js/src/bitso.d.ts +11 -11
  131. package/js/src/bitso.js +1 -0
  132. package/js/src/bitstamp.d.ts +10 -10
  133. package/js/src/bitstamp.js +1 -0
  134. package/js/src/bitstamp1.d.ts +4 -4
  135. package/js/src/bittrex.d.ts +16 -15
  136. package/js/src/bittrex.js +57 -57
  137. package/js/src/bitvavo.d.ts +9 -9
  138. package/js/src/bitvavo.js +10 -2
  139. package/js/src/bl3p.d.ts +2 -2
  140. package/js/src/blockchaincom.d.ts +13 -13
  141. package/js/src/blockchaincom.js +2 -2
  142. package/js/src/btcalpha.d.ts +11 -10
  143. package/js/src/btcalpha.js +59 -60
  144. package/js/src/btcbox.d.ts +6 -6
  145. package/js/src/btcmarkets.d.ts +14 -13
  146. package/js/src/btcmarkets.js +68 -69
  147. package/js/src/btcturk.d.ts +7 -6
  148. package/js/src/btcturk.js +72 -74
  149. package/js/src/bybit.d.ts +28 -28
  150. package/js/src/bybit.js +5 -12
  151. package/js/src/cex.d.ts +6 -6
  152. package/js/src/coinbase.d.ts +17 -17
  153. package/js/src/coinbase.js +7 -2
  154. package/js/src/coinbasepro.d.ts +13 -13
  155. package/js/src/coinbasepro.js +1 -0
  156. package/js/src/coincheck.d.ts +6 -6
  157. package/js/src/coincheck.js +1 -0
  158. package/js/src/coinex.d.ts +18 -18
  159. package/js/src/coinex.js +4 -0
  160. package/js/src/coinlist.d.ts +16 -15
  161. package/js/src/coinlist.js +60 -60
  162. package/js/src/coinmate.d.ts +7 -7
  163. package/js/src/coinmate.js +1 -0
  164. package/js/src/coinone.d.ts +5 -5
  165. package/js/src/coinsph.d.ts +10 -10
  166. package/js/src/coinsph.js +2 -4
  167. package/js/src/coinspot.d.ts +3 -3
  168. package/js/src/cryptocom.d.ts +16 -16
  169. package/js/src/cryptocom.js +2 -0
  170. package/js/src/currencycom.d.ts +10 -10
  171. package/js/src/currencycom.js +2 -2
  172. package/js/src/delta.d.ts +10 -10
  173. package/js/src/deribit.d.ts +13 -13
  174. package/js/src/deribit.js +2 -0
  175. package/js/src/digifinex.d.ts +17 -17
  176. package/js/src/digifinex.js +11 -5
  177. package/js/src/exmo.d.ts +12 -12
  178. package/js/src/exmo.js +1 -0
  179. package/js/src/gate.d.ts +20 -20
  180. package/js/src/gate.js +2 -0
  181. package/js/src/gemini.d.ts +6 -6
  182. package/js/src/gemini.js +2 -0
  183. package/js/src/hitbtc.d.ts +15 -15
  184. package/js/src/hitbtc.js +4 -0
  185. package/js/src/hollaex.d.ts +12 -12
  186. package/js/src/hollaex.js +2 -0
  187. package/js/src/htx.d.ts +27 -27
  188. package/js/src/htx.js +4 -0
  189. package/js/src/huobijp.d.ts +16 -16
  190. package/js/src/huobijp.js +2 -0
  191. package/js/src/idex.d.ts +13 -13
  192. package/js/src/idex.js +2 -0
  193. package/js/src/independentreserve.d.ts +6 -6
  194. package/js/src/indodax.d.ts +6 -6
  195. package/js/src/indodax.js +1 -0
  196. package/js/src/kraken.d.ts +16 -16
  197. package/js/src/kraken.js +3 -3
  198. package/js/src/krakenfutures.d.ts +9 -9
  199. package/js/src/kucoin.d.ts +15 -15
  200. package/js/src/kucoin.js +6 -5
  201. package/js/src/kucoinfutures.d.ts +11 -11
  202. package/js/src/kuna.d.ts +12 -12
  203. package/js/src/kuna.js +3 -1
  204. package/js/src/latoken.d.ts +9 -9
  205. package/js/src/latoken.js +1 -0
  206. package/js/src/lbank.d.ts +65 -12
  207. package/js/src/lbank.js +2334 -443
  208. package/js/src/lbank2.d.ts +11 -11
  209. package/js/src/luno.d.ts +10 -10
  210. package/js/src/lykke.d.ts +8 -8
  211. package/js/src/lykke.js +2 -0
  212. package/js/src/mercado.d.ts +6 -6
  213. package/js/src/mercado.js +1 -0
  214. package/js/src/mexc.d.ts +23 -23
  215. package/js/src/mexc.js +2 -0
  216. package/js/src/ndax.d.ts +13 -12
  217. package/js/src/ndax.js +61 -61
  218. package/js/src/novadax.d.ts +13 -12
  219. package/js/src/novadax.js +58 -59
  220. package/js/src/oceanex.d.ts +10 -9
  221. package/js/src/oceanex.js +58 -60
  222. package/js/src/okcoin.d.ts +12 -13
  223. package/js/src/okcoin.js +3 -9
  224. package/js/src/okx.d.ts +26 -27
  225. package/js/src/okx.js +2 -7
  226. package/js/src/paymium.d.ts +2 -2
  227. package/js/src/phemex.d.ts +16 -16
  228. package/js/src/phemex.js +2 -0
  229. package/js/src/poloniex.d.ts +15 -14
  230. package/js/src/poloniex.js +56 -57
  231. package/js/src/poloniexfutures.d.ts +11 -10
  232. package/js/src/poloniexfutures.js +67 -70
  233. package/js/src/pro/alpaca.d.ts +3 -3
  234. package/js/src/pro/ascendex.d.ts +2 -2
  235. package/js/src/pro/binance.d.ts +9 -9
  236. package/js/src/pro/binance.js +5 -3
  237. package/js/src/pro/bingx.d.ts +3 -3
  238. package/js/src/pro/bingx.js +19 -12
  239. package/js/src/pro/bitfinex.d.ts +3 -3
  240. package/js/src/pro/bitfinex2.d.ts +3 -3
  241. package/js/src/pro/bitget.d.ts +3 -3
  242. package/js/src/pro/bitmart.d.ts +2 -2
  243. package/js/src/pro/bitmex.d.ts +3 -3
  244. package/js/src/pro/bitpanda.d.ts +3 -3
  245. package/js/src/pro/bitrue.d.ts +2 -2
  246. package/js/src/pro/bitstamp.d.ts +2 -2
  247. package/js/src/pro/bittrex.d.ts +3 -3
  248. package/js/src/pro/bitvavo.d.ts +3 -3
  249. package/js/src/pro/blockchaincom.d.ts +2 -2
  250. package/js/src/pro/bybit.d.ts +4 -4
  251. package/js/src/pro/cex.d.ts +3 -3
  252. package/js/src/pro/coinbase.js +12 -3
  253. package/js/src/pro/coinbasepro.d.ts +3 -3
  254. package/js/src/pro/coinex.d.ts +2 -2
  255. package/js/src/pro/cryptocom.d.ts +5 -5
  256. package/js/src/pro/cryptocom.js +17 -17
  257. package/js/src/pro/deribit.d.ts +3 -3
  258. package/js/src/pro/exmo.d.ts +2 -2
  259. package/js/src/pro/gate.d.ts +3 -3
  260. package/js/src/pro/gemini.d.ts +2 -2
  261. package/js/src/pro/hitbtc.d.ts +3 -3
  262. package/js/src/pro/hollaex.d.ts +3 -3
  263. package/js/src/pro/htx.d.ts +3 -3
  264. package/js/src/pro/idex.d.ts +3 -3
  265. package/js/src/pro/kraken.d.ts +7 -7
  266. package/js/src/pro/krakenfutures.d.ts +4 -4
  267. package/js/src/pro/krakenfutures.js +15 -15
  268. package/js/src/pro/kucoin.d.ts +3 -3
  269. package/js/src/pro/kucoinfutures.d.ts +3 -3
  270. package/js/src/pro/mexc.d.ts +3 -3
  271. package/js/src/pro/okcoin.d.ts +2 -2
  272. package/js/src/pro/okx.d.ts +6 -6
  273. package/js/src/pro/phemex.d.ts +3 -3
  274. package/js/src/pro/poloniex.d.ts +3 -3
  275. package/js/src/pro/poloniexfutures.d.ts +3 -3
  276. package/js/src/pro/poloniexfutures.js +9 -0
  277. package/js/src/pro/probit.d.ts +3 -3
  278. package/js/src/pro/wazirx.d.ts +3 -3
  279. package/js/src/pro/whitebit.d.ts +3 -3
  280. package/js/src/pro/woo.d.ts +2 -2
  281. package/js/src/probit.d.ts +11 -10
  282. package/js/src/probit.js +64 -65
  283. package/js/src/tidex.d.ts +5 -5
  284. package/js/src/tidex.js +1 -0
  285. package/js/src/timex.d.ts +10 -10
  286. package/js/src/timex.js +3 -5
  287. package/js/src/tokocrypto.d.ts +9 -9
  288. package/js/src/upbit.d.ts +11 -10
  289. package/js/src/upbit.js +58 -58
  290. package/js/src/wavesexchange.d.ts +7 -7
  291. package/js/src/wavesexchange.js +2 -1
  292. package/js/src/wazirx.d.ts +7 -6
  293. package/js/src/wazirx.js +72 -74
  294. package/js/src/whitebit.d.ts +12 -11
  295. package/js/src/whitebit.js +89 -91
  296. package/js/src/woo.d.ts +20 -19
  297. package/js/src/woo.js +76 -77
  298. package/js/src/yobit.d.ts +5 -5
  299. package/js/src/zaif.d.ts +6 -5
  300. package/js/src/zaif.js +58 -71
  301. package/js/src/zonda.d.ts +7 -6
  302. package/js/src/zonda.js +68 -70
  303. package/package.json +1 -1
  304. package/skip-tests.json +2 -18
  305. package/test.ts +0 -0
  306. package/dist/cjs/src/btctradeua.js +0 -571
  307. package/dist/cjs/src/coinfalcon.js +0 -1012
  308. package/js/src/abstract/bitstamp1.d.ts +0 -26
  309. package/js/src/abstract/bitstamp1.js +0 -11
  310. package/js/src/abstract/btctradeua.d.ts +0 -20
  311. package/js/src/abstract/btctradeua.js +0 -11
  312. package/js/src/abstract/coinfalcon.d.ts +0 -26
  313. package/js/src/abstract/coinfalcon.js +0 -11
  314. package/js/src/abstract/lbank2.d.ts +0 -64
  315. package/js/src/abstract/lbank2.js +0 -11
  316. package/js/src/btctradeua.d.ts +0 -30
  317. package/js/src/btctradeua.js +0 -572
  318. package/js/src/coinfalcon.d.ts +0 -53
  319. package/js/src/coinfalcon.js +0 -1013
@@ -883,7 +883,7 @@ class blockchaincom extends blockchaincom$1 {
883
883
  }
884
884
  const address = this.safeString(transaction, 'address');
885
885
  const txid = this.safeString(transaction, 'txhash');
886
- const result = {
886
+ return {
887
887
  'info': transaction,
888
888
  'id': id,
889
889
  'txid': txid,
@@ -902,9 +902,9 @@ class blockchaincom extends blockchaincom$1 {
902
902
  'status': this.parseTransactionState(state),
903
903
  'updated': undefined,
904
904
  'comment': undefined,
905
+ 'internal': undefined,
905
906
  'fee': fee,
906
907
  };
907
- return result;
908
908
  }
909
909
  async fetchWithdrawalWhitelist(params = {}) {
910
910
  /**
@@ -169,68 +169,66 @@ class btcalpha extends btcalpha$1 {
169
169
  // },
170
170
  // ]
171
171
  //
172
- const result = [];
173
- for (let i = 0; i < response.length; i++) {
174
- const market = response[i];
175
- const id = this.safeString(market, 'name');
176
- const baseId = this.safeString(market, 'currency1');
177
- const quoteId = this.safeString(market, 'currency2');
178
- const base = this.safeCurrencyCode(baseId);
179
- const quote = this.safeCurrencyCode(quoteId);
180
- const pricePrecision = this.safeString(market, 'price_precision');
181
- const priceLimit = this.parsePrecision(pricePrecision);
182
- const amountLimit = this.safeString(market, 'minimum_order_size');
183
- result.push({
184
- 'id': id,
185
- 'symbol': base + '/' + quote,
186
- 'base': base,
187
- 'quote': quote,
188
- 'settle': undefined,
189
- 'baseId': baseId,
190
- 'quoteId': quoteId,
191
- 'settleId': undefined,
192
- 'type': 'spot',
193
- 'spot': true,
194
- 'margin': false,
195
- 'swap': false,
196
- 'future': false,
197
- 'option': false,
198
- 'active': true,
199
- 'contract': false,
200
- 'linear': undefined,
201
- 'inverse': undefined,
202
- 'contractSize': undefined,
203
- 'expiry': undefined,
204
- 'expiryDatetime': undefined,
205
- 'strike': undefined,
206
- 'optionType': undefined,
207
- 'precision': {
208
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amount_precision'))),
209
- 'price': this.parseNumber(this.parsePrecision((pricePrecision))),
172
+ return this.parseMarkets(response);
173
+ }
174
+ parseMarket(market) {
175
+ const id = this.safeString(market, 'name');
176
+ const baseId = this.safeString(market, 'currency1');
177
+ const quoteId = this.safeString(market, 'currency2');
178
+ const base = this.safeCurrencyCode(baseId);
179
+ const quote = this.safeCurrencyCode(quoteId);
180
+ const pricePrecision = this.safeString(market, 'price_precision');
181
+ const priceLimit = this.parsePrecision(pricePrecision);
182
+ const amountLimit = this.safeString(market, 'minimum_order_size');
183
+ return {
184
+ 'id': id,
185
+ 'symbol': base + '/' + quote,
186
+ 'base': base,
187
+ 'quote': quote,
188
+ 'settle': undefined,
189
+ 'baseId': baseId,
190
+ 'quoteId': quoteId,
191
+ 'settleId': undefined,
192
+ 'type': 'spot',
193
+ 'spot': true,
194
+ 'margin': false,
195
+ 'swap': false,
196
+ 'future': false,
197
+ 'option': false,
198
+ 'active': true,
199
+ 'contract': false,
200
+ 'linear': undefined,
201
+ 'inverse': undefined,
202
+ 'contractSize': undefined,
203
+ 'expiry': undefined,
204
+ 'expiryDatetime': undefined,
205
+ 'strike': undefined,
206
+ 'optionType': undefined,
207
+ 'precision': {
208
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amount_precision'))),
209
+ 'price': this.parseNumber(this.parsePrecision((pricePrecision))),
210
+ },
211
+ 'limits': {
212
+ 'leverage': {
213
+ 'min': undefined,
214
+ 'max': undefined,
210
215
  },
211
- 'limits': {
212
- 'leverage': {
213
- 'min': undefined,
214
- 'max': undefined,
215
- },
216
- 'amount': {
217
- 'min': this.parseNumber(amountLimit),
218
- 'max': this.safeNumber(market, 'maximum_order_size'),
219
- },
220
- 'price': {
221
- 'min': this.parseNumber(priceLimit),
222
- 'max': undefined,
223
- },
224
- 'cost': {
225
- 'min': this.parseNumber(Precise["default"].stringMul(priceLimit, amountLimit)),
226
- 'max': undefined,
227
- },
216
+ 'amount': {
217
+ 'min': this.parseNumber(amountLimit),
218
+ 'max': this.safeNumber(market, 'maximum_order_size'),
228
219
  },
229
- 'created': undefined,
230
- 'info': market,
231
- });
232
- }
233
- return result;
220
+ 'price': {
221
+ 'min': this.parseNumber(priceLimit),
222
+ 'max': undefined,
223
+ },
224
+ 'cost': {
225
+ 'min': this.parseNumber(Precise["default"].stringMul(priceLimit, amountLimit)),
226
+ 'max': undefined,
227
+ },
228
+ },
229
+ 'created': undefined,
230
+ 'info': market,
231
+ };
234
232
  }
235
233
  async fetchTickers(symbols = undefined, params = {}) {
236
234
  /**
@@ -542,6 +540,7 @@ class btcalpha extends btcalpha$1 {
542
540
  'type': undefined,
543
541
  'status': this.parseTransactionStatus(statusId),
544
542
  'comment': undefined,
543
+ 'internal': undefined,
545
544
  'fee': undefined,
546
545
  'updated': undefined,
547
546
  };
@@ -335,7 +335,8 @@ class btcmarkets extends btcmarkets$1 {
335
335
  'currency': code,
336
336
  'status': status,
337
337
  'updated': lastUpdate,
338
- 'comment': undefined,
338
+ 'comment': this.safeString(transaction, 'description'),
339
+ 'internal': undefined,
339
340
  'fee': {
340
341
  'currency': code,
341
342
  'cost': this.parseNumber(fee),
@@ -366,76 +367,74 @@ class btcmarkets extends btcmarkets$1 {
366
367
  // }
367
368
  // ]
368
369
  //
369
- const result = [];
370
- for (let i = 0; i < response.length; i++) {
371
- const market = response[i];
372
- const baseId = this.safeString(market, 'baseAssetName');
373
- const quoteId = this.safeString(market, 'quoteAssetName');
374
- const id = this.safeString(market, 'marketId');
375
- const base = this.safeCurrencyCode(baseId);
376
- const quote = this.safeCurrencyCode(quoteId);
377
- const symbol = base + '/' + quote;
378
- const fees = this.safeValue(this.safeValue(this.options, 'fees', {}), quote, this.fees);
379
- const pricePrecision = this.parseNumber(this.parsePrecision(this.safeString(market, 'priceDecimals')));
380
- const minAmount = this.safeNumber(market, 'minOrderAmount');
381
- const maxAmount = this.safeNumber(market, 'maxOrderAmount');
382
- let minPrice = undefined;
383
- if (quote === 'AUD') {
384
- minPrice = pricePrecision;
385
- }
386
- result.push({
387
- 'id': id,
388
- 'symbol': symbol,
389
- 'base': base,
390
- 'quote': quote,
391
- 'settle': undefined,
392
- 'baseId': baseId,
393
- 'quoteId': quoteId,
394
- 'settleId': undefined,
395
- 'type': 'spot',
396
- 'spot': true,
397
- 'margin': false,
398
- 'swap': false,
399
- 'future': false,
400
- 'option': false,
401
- 'active': undefined,
402
- 'contract': false,
403
- 'linear': undefined,
404
- 'inverse': undefined,
405
- 'taker': fees['taker'],
406
- 'maker': fees['maker'],
407
- 'contractSize': undefined,
408
- 'expiry': undefined,
409
- 'expiryDatetime': undefined,
410
- 'strike': undefined,
411
- 'optionType': undefined,
412
- 'precision': {
413
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amountDecimals'))),
414
- 'price': pricePrecision,
370
+ return this.parseMarkets(response);
371
+ }
372
+ parseMarket(market) {
373
+ const baseId = this.safeString(market, 'baseAssetName');
374
+ const quoteId = this.safeString(market, 'quoteAssetName');
375
+ const id = this.safeString(market, 'marketId');
376
+ const base = this.safeCurrencyCode(baseId);
377
+ const quote = this.safeCurrencyCode(quoteId);
378
+ const symbol = base + '/' + quote;
379
+ const fees = this.safeValue(this.safeValue(this.options, 'fees', {}), quote, this.fees);
380
+ const pricePrecision = this.parseNumber(this.parsePrecision(this.safeString(market, 'priceDecimals')));
381
+ const minAmount = this.safeNumber(market, 'minOrderAmount');
382
+ const maxAmount = this.safeNumber(market, 'maxOrderAmount');
383
+ let minPrice = undefined;
384
+ if (quote === 'AUD') {
385
+ minPrice = pricePrecision;
386
+ }
387
+ return {
388
+ 'id': id,
389
+ 'symbol': symbol,
390
+ 'base': base,
391
+ 'quote': quote,
392
+ 'settle': undefined,
393
+ 'baseId': baseId,
394
+ 'quoteId': quoteId,
395
+ 'settleId': undefined,
396
+ 'type': 'spot',
397
+ 'spot': true,
398
+ 'margin': false,
399
+ 'swap': false,
400
+ 'future': false,
401
+ 'option': false,
402
+ 'active': undefined,
403
+ 'contract': false,
404
+ 'linear': undefined,
405
+ 'inverse': undefined,
406
+ 'taker': fees['taker'],
407
+ 'maker': fees['maker'],
408
+ 'contractSize': undefined,
409
+ 'expiry': undefined,
410
+ 'expiryDatetime': undefined,
411
+ 'strike': undefined,
412
+ 'optionType': undefined,
413
+ 'precision': {
414
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'amountDecimals'))),
415
+ 'price': pricePrecision,
416
+ },
417
+ 'limits': {
418
+ 'leverage': {
419
+ 'min': undefined,
420
+ 'max': undefined,
415
421
  },
416
- 'limits': {
417
- 'leverage': {
418
- 'min': undefined,
419
- 'max': undefined,
420
- },
421
- 'amount': {
422
- 'min': minAmount,
423
- 'max': maxAmount,
424
- },
425
- 'price': {
426
- 'min': minPrice,
427
- 'max': undefined,
428
- },
429
- 'cost': {
430
- 'min': undefined,
431
- 'max': undefined,
432
- },
422
+ 'amount': {
423
+ 'min': minAmount,
424
+ 'max': maxAmount,
433
425
  },
434
- 'created': undefined,
435
- 'info': market,
436
- });
437
- }
438
- return result;
426
+ 'price': {
427
+ 'min': minPrice,
428
+ 'max': undefined,
429
+ },
430
+ 'cost': {
431
+ 'min': undefined,
432
+ 'max': undefined,
433
+ },
434
+ },
435
+ 'created': undefined,
436
+ 'info': market,
437
+ };
439
438
  }
440
439
  async fetchTime(params = {}) {
441
440
  /**
@@ -190,83 +190,81 @@ class btcturk extends btcturk$1 {
190
190
  //
191
191
  const data = this.safeValue(response, 'data');
192
192
  const markets = this.safeValue(data, 'symbols', []);
193
- const result = [];
194
- for (let i = 0; i < markets.length; i++) {
195
- const entry = markets[i];
196
- const id = this.safeString(entry, 'name');
197
- const baseId = this.safeString(entry, 'numerator');
198
- const quoteId = this.safeString(entry, 'denominator');
199
- const base = this.safeCurrencyCode(baseId);
200
- const quote = this.safeCurrencyCode(quoteId);
201
- const filters = this.safeValue(entry, 'filters', []);
202
- let minPrice = undefined;
203
- let maxPrice = undefined;
204
- let minAmount = undefined;
205
- let maxAmount = undefined;
206
- let minCost = undefined;
207
- for (let j = 0; j < filters.length; j++) {
208
- const filter = filters[j];
209
- const filterType = this.safeString(filter, 'filterType');
210
- if (filterType === 'PRICE_FILTER') {
211
- minPrice = this.safeNumber(filter, 'minPrice');
212
- maxPrice = this.safeNumber(filter, 'maxPrice');
213
- minAmount = this.safeNumber(filter, 'minAmount');
214
- maxAmount = this.safeNumber(filter, 'maxAmount');
215
- minCost = this.safeNumber(filter, 'minExchangeValue');
216
- }
193
+ return this.parseMarkets(markets);
194
+ }
195
+ parseMarket(entry) {
196
+ const id = this.safeString(entry, 'name');
197
+ const baseId = this.safeString(entry, 'numerator');
198
+ const quoteId = this.safeString(entry, 'denominator');
199
+ const base = this.safeCurrencyCode(baseId);
200
+ const quote = this.safeCurrencyCode(quoteId);
201
+ const filters = this.safeValue(entry, 'filters', []);
202
+ let minPrice = undefined;
203
+ let maxPrice = undefined;
204
+ let minAmount = undefined;
205
+ let maxAmount = undefined;
206
+ let minCost = undefined;
207
+ for (let j = 0; j < filters.length; j++) {
208
+ const filter = filters[j];
209
+ const filterType = this.safeString(filter, 'filterType');
210
+ if (filterType === 'PRICE_FILTER') {
211
+ minPrice = this.safeNumber(filter, 'minPrice');
212
+ maxPrice = this.safeNumber(filter, 'maxPrice');
213
+ minAmount = this.safeNumber(filter, 'minAmount');
214
+ maxAmount = this.safeNumber(filter, 'maxAmount');
215
+ minCost = this.safeNumber(filter, 'minExchangeValue');
217
216
  }
218
- const status = this.safeString(entry, 'status');
219
- result.push({
220
- 'id': id,
221
- 'symbol': base + '/' + quote,
222
- 'base': base,
223
- 'quote': quote,
224
- 'settle': undefined,
225
- 'baseId': baseId,
226
- 'quoteId': quoteId,
227
- 'settleId': undefined,
228
- 'type': 'spot',
229
- 'spot': true,
230
- 'margin': false,
231
- 'swap': false,
232
- 'future': false,
233
- 'option': false,
234
- 'active': (status === 'TRADING'),
235
- 'contract': false,
236
- 'linear': undefined,
237
- 'inverse': undefined,
238
- 'contractSize': undefined,
239
- 'expiry': undefined,
240
- 'expiryDatetime': undefined,
241
- 'strike': undefined,
242
- 'optionType': undefined,
243
- 'precision': {
244
- 'amount': this.parseNumber(this.parsePrecision(this.safeString(entry, 'numeratorScale'))),
245
- 'price': this.parseNumber(this.parsePrecision(this.safeString(entry, 'denominatorScale'))),
217
+ }
218
+ const status = this.safeString(entry, 'status');
219
+ return {
220
+ 'id': id,
221
+ 'symbol': base + '/' + quote,
222
+ 'base': base,
223
+ 'quote': quote,
224
+ 'settle': undefined,
225
+ 'baseId': baseId,
226
+ 'quoteId': quoteId,
227
+ 'settleId': undefined,
228
+ 'type': 'spot',
229
+ 'spot': true,
230
+ 'margin': false,
231
+ 'swap': false,
232
+ 'future': false,
233
+ 'option': false,
234
+ 'active': (status === 'TRADING'),
235
+ 'contract': false,
236
+ 'linear': undefined,
237
+ 'inverse': undefined,
238
+ 'contractSize': undefined,
239
+ 'expiry': undefined,
240
+ 'expiryDatetime': undefined,
241
+ 'strike': undefined,
242
+ 'optionType': undefined,
243
+ 'precision': {
244
+ 'amount': this.parseNumber(this.parsePrecision(this.safeString(entry, 'numeratorScale'))),
245
+ 'price': this.parseNumber(this.parsePrecision(this.safeString(entry, 'denominatorScale'))),
246
+ },
247
+ 'limits': {
248
+ 'leverage': {
249
+ 'min': undefined,
250
+ 'max': undefined,
246
251
  },
247
- 'limits': {
248
- 'leverage': {
249
- 'min': undefined,
250
- 'max': undefined,
251
- },
252
- 'amount': {
253
- 'min': minAmount,
254
- 'max': maxAmount,
255
- },
256
- 'price': {
257
- 'min': minPrice,
258
- 'max': maxPrice,
259
- },
260
- 'cost': {
261
- 'min': minCost,
262
- 'max': undefined,
263
- },
252
+ 'amount': {
253
+ 'min': minAmount,
254
+ 'max': maxAmount,
264
255
  },
265
- 'created': undefined,
266
- 'info': entry,
267
- });
268
- }
269
- return result;
256
+ 'price': {
257
+ 'min': minPrice,
258
+ 'max': maxPrice,
259
+ },
260
+ 'cost': {
261
+ 'min': minCost,
262
+ 'max': undefined,
263
+ },
264
+ },
265
+ 'created': undefined,
266
+ 'info': entry,
267
+ };
270
268
  }
271
269
  parseBalance(response) {
272
270
  const data = this.safeValue(response, 'data', []);
@@ -312,6 +312,7 @@ class bybit extends bybit$1 {
312
312
  // user
313
313
  'v5/user/query-sub-members': 5,
314
314
  'v5/user/query-api': 5,
315
+ 'v5/user/sub-apikeys': 5,
315
316
  'v5/user/get-member-type': 5,
316
317
  'v5/user/aff-customer-info': 5,
317
318
  'v5/user/del-submember': 5,
@@ -443,7 +444,7 @@ class bybit extends bybit$1 {
443
444
  'v5/asset/transfer/save-transfer-sub-member': 150,
444
445
  'v5/asset/transfer/universal-transfer': 10,
445
446
  'v5/asset/deposit/deposit-to-account': 5,
446
- 'v5/asset/withdraw/create': 300,
447
+ 'v5/asset/withdraw/create': 50,
447
448
  'v5/asset/withdraw/cancel': 50,
448
449
  // user
449
450
  'v5/user/create-sub-member': 10,
@@ -3592,7 +3593,7 @@ class bybit extends bybit$1 {
3592
3593
  request['triggerPrice'] = this.priceToPrecision(symbol, triggerPrice);
3593
3594
  request['reduceOnly'] = true;
3594
3595
  }
3595
- else if (isStopLoss || isTakeProfit) {
3596
+ if (isStopLoss || isTakeProfit) {
3596
3597
  if (isStopLoss) {
3597
3598
  const slTriggerPrice = this.safeValue2(stopLoss, 'triggerPrice', 'stopPrice', stopLoss);
3598
3599
  request['stopLoss'] = this.priceToPrecision(symbol, slTriggerPrice);
@@ -4401,11 +4402,6 @@ class bybit extends bybit$1 {
4401
4402
  if (endTime !== undefined) {
4402
4403
  request['endTime'] = endTime;
4403
4404
  }
4404
- else {
4405
- if (since !== undefined) {
4406
- throw new errors.BadRequest(this.id + ' fetchOrders() requires until/endTime when since is provided.');
4407
- }
4408
- }
4409
4405
  const response = await this.privateGetV5OrderHistory(this.extend(request, params));
4410
4406
  //
4411
4407
  // {
@@ -4781,11 +4777,6 @@ class bybit extends bybit$1 {
4781
4777
  if (endTime !== undefined) {
4782
4778
  request['endTime'] = endTime;
4783
4779
  }
4784
- else {
4785
- if (since !== undefined) {
4786
- throw new errors.BadRequest(this.id + ' fetchOrders() requires until/endTime when since is provided.');
4787
- }
4788
- }
4789
4780
  const response = await this.privateGetV5ExecutionList(this.extend(request, params));
4790
4781
  //
4791
4782
  // {
@@ -5190,6 +5181,8 @@ class bybit extends bybit$1 {
5190
5181
  'status': status,
5191
5182
  'updated': updated,
5192
5183
  'fee': fee,
5184
+ 'internal': undefined,
5185
+ 'comment': undefined,
5193
5186
  };
5194
5187
  }
5195
5188
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
@@ -858,8 +858,13 @@ class coinbase extends coinbase$1 {
858
858
  }
859
859
  const sizeInQuote = this.safeValue(trade, 'size_in_quote');
860
860
  const v3Price = this.safeString(trade, 'price');
861
- const v3Amount = (sizeInQuote) ? undefined : this.safeString(trade, 'size');
862
- const v3Cost = (sizeInQuote) ? this.safeString(trade, 'size') : undefined;
861
+ let v3Cost = undefined;
862
+ let v3Amount = this.safeString(trade, 'size');
863
+ if (sizeInQuote) {
864
+ // calculate base size
865
+ v3Cost = v3Amount;
866
+ v3Amount = Precise["default"].stringDiv(v3Amount, v3Price);
867
+ }
863
868
  const v3FeeCost = this.safeString(trade, 'commission');
864
869
  const amountString = this.safeString(amountObject, 'amount', v3Amount);
865
870
  const costString = this.safeString(subtotalObject, 'amount', v3Cost);
@@ -1787,6 +1787,7 @@ class coinbasepro extends coinbasepro$1 {
1787
1787
  'tagTo': undefined,
1788
1788
  'updated': this.parse8601(this.safeString(transaction, 'processed_at')),
1789
1789
  'comment': undefined,
1790
+ 'internal': false,
1790
1791
  'fee': fee,
1791
1792
  };
1792
1793
  }
@@ -776,6 +776,7 @@ class coincheck extends coincheck$1 {
776
776
  'currency': code,
777
777
  'status': status,
778
778
  'updated': updated,
779
+ 'comment': undefined,
779
780
  'internal': undefined,
780
781
  'fee': fee,
781
782
  };
@@ -4016,6 +4016,8 @@ class coinex extends coinex$1 {
4016
4016
  const networkId = this.safeString(transaction, 'smart_contract_name');
4017
4017
  const amount = this.safeNumber(transaction, 'actual_amount');
4018
4018
  let feeCost = this.safeString(transaction, 'tx_fee');
4019
+ const transferMethod = this.safeString(transaction, 'transfer_method');
4020
+ const internal = transferMethod === 'local';
4019
4021
  let addressTo = undefined;
4020
4022
  let addressFrom = undefined;
4021
4023
  if (type === 'deposit') {
@@ -4048,6 +4050,8 @@ class coinex extends coinex$1 {
4048
4050
  'status': status,
4049
4051
  'updated': undefined,
4050
4052
  'fee': fee,
4053
+ 'comment': undefined,
4054
+ 'internal': internal,
4051
4055
  };
4052
4056
  }
4053
4057
  async transfer(code, amount, fromAccount, toAccount, params = {}) {