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
@@ -412,68 +412,66 @@ class coinlist extends coinlist$1 {
412
412
  // }
413
413
  //
414
414
  const markets = this.safeValue(response, 'symbols', []);
415
- const result = [];
416
- for (let i = 0; i < markets.length; i++) {
417
- const market = markets[i];
418
- const id = this.safeString(market, 'symbol');
419
- const baseId = this.safeString(market, 'base_currency');
420
- const quoteId = this.safeString(market, 'quote_currency');
421
- const base = this.safeCurrencyCode(baseId);
422
- const quote = this.safeCurrencyCode(quoteId);
423
- const amountPrecision = this.safeString(market, 'minimum_size_increment');
424
- const pricePrecision = this.safeString(market, 'minimum_price_increment');
425
- const created = this.safeString(market, 'list_time');
426
- result.push({
427
- 'id': id,
428
- 'symbol': base + '/' + quote,
429
- 'base': base,
430
- 'quote': quote,
431
- 'settle': undefined,
432
- 'baseId': baseId,
433
- 'quoteId': quoteId,
434
- 'settleId': undefined,
435
- 'type': 'spot',
436
- 'spot': true,
437
- 'margin': false,
438
- 'swap': false,
439
- 'future': false,
440
- 'option': false,
441
- 'active': true,
442
- 'contract': false,
443
- 'linear': undefined,
444
- 'inverse': undefined,
445
- 'contractSize': undefined,
446
- 'expiry': undefined,
447
- 'expiryDatetime': undefined,
448
- 'strike': undefined,
449
- 'optionType': undefined,
450
- 'precision': {
451
- 'amount': this.parseNumber(amountPrecision),
452
- 'price': this.parseNumber(pricePrecision),
415
+ return this.parseMarkets(markets);
416
+ }
417
+ parseMarket(market) {
418
+ const id = this.safeString(market, 'symbol');
419
+ const baseId = this.safeString(market, 'base_currency');
420
+ const quoteId = this.safeString(market, 'quote_currency');
421
+ const base = this.safeCurrencyCode(baseId);
422
+ const quote = this.safeCurrencyCode(quoteId);
423
+ const amountPrecision = this.safeString(market, 'minimum_size_increment');
424
+ const pricePrecision = this.safeString(market, 'minimum_price_increment');
425
+ const created = this.safeString(market, 'list_time');
426
+ return {
427
+ 'id': id,
428
+ 'symbol': base + '/' + quote,
429
+ 'base': base,
430
+ 'quote': quote,
431
+ 'settle': undefined,
432
+ 'baseId': baseId,
433
+ 'quoteId': quoteId,
434
+ 'settleId': undefined,
435
+ 'type': 'spot',
436
+ 'spot': true,
437
+ 'margin': false,
438
+ 'swap': false,
439
+ 'future': false,
440
+ 'option': false,
441
+ 'active': true,
442
+ 'contract': false,
443
+ 'linear': undefined,
444
+ 'inverse': undefined,
445
+ 'contractSize': undefined,
446
+ 'expiry': undefined,
447
+ 'expiryDatetime': undefined,
448
+ 'strike': undefined,
449
+ 'optionType': undefined,
450
+ 'precision': {
451
+ 'amount': this.parseNumber(amountPrecision),
452
+ 'price': this.parseNumber(pricePrecision),
453
+ },
454
+ 'limits': {
455
+ 'leverage': {
456
+ 'min': undefined,
457
+ 'max': undefined,
453
458
  },
454
- 'limits': {
455
- 'leverage': {
456
- 'min': undefined,
457
- 'max': undefined,
458
- },
459
- 'amount': {
460
- 'min': undefined,
461
- 'max': undefined,
462
- },
463
- 'price': {
464
- 'min': undefined,
465
- 'max': undefined,
466
- },
467
- 'cost': {
468
- 'min': undefined,
469
- 'max': undefined,
470
- },
459
+ 'amount': {
460
+ 'min': undefined,
461
+ 'max': undefined,
471
462
  },
472
- 'created': this.parse8601(created),
473
- 'info': market,
474
- });
475
- }
476
- return result;
463
+ 'price': {
464
+ 'min': undefined,
465
+ 'max': undefined,
466
+ },
467
+ 'cost': {
468
+ 'min': undefined,
469
+ 'max': undefined,
470
+ },
471
+ },
472
+ 'created': this.parse8601(created),
473
+ 'info': market,
474
+ };
477
475
  }
478
476
  async fetchTickers(symbols = undefined, params = {}) {
479
477
  /**
@@ -2036,6 +2034,8 @@ class coinlist extends coinlist$1 {
2036
2034
  'status': undefined,
2037
2035
  'updated': undefined,
2038
2036
  'fee': fee,
2037
+ 'comment': this.safeString(transaction, 'description'),
2038
+ 'internal': undefined,
2039
2039
  };
2040
2040
  }
2041
2041
  parseTransactionType(type) {
@@ -488,6 +488,7 @@ class coinmate extends coinmate$1 {
488
488
  'tagTo': undefined,
489
489
  'updated': undefined,
490
490
  'comment': undefined,
491
+ 'internal': undefined,
491
492
  'fee': {
492
493
  'cost': this.safeNumber(transaction, 'fee'),
493
494
  'currency': code,
@@ -1761,11 +1761,8 @@ class coinsph extends coinsph$1 {
1761
1761
  if (feeCost !== undefined) {
1762
1762
  fee = { 'currency': code, 'cost': feeCost };
1763
1763
  }
1764
- let internal = this.safeInteger(transaction, 'transferType');
1765
- if (internal !== undefined) {
1766
- internal = internal ? true : false;
1767
- }
1768
1764
  const network = this.safeString(transaction, 'network');
1765
+ const internal = network === 'Internal';
1769
1766
  return {
1770
1767
  'info': transaction,
1771
1768
  'id': id,
@@ -1785,6 +1782,7 @@ class coinsph extends coinsph$1 {
1785
1782
  'status': status,
1786
1783
  'updated': updated,
1787
1784
  'internal': internal,
1785
+ 'comment': undefined,
1788
1786
  'fee': fee,
1789
1787
  };
1790
1788
  }
@@ -338,6 +338,7 @@ class cryptocom extends cryptocom$1 {
338
338
  'exceptions': {
339
339
  'exact': {
340
340
  '219': errors.InvalidOrder,
341
+ '314': errors.InvalidOrder,
341
342
  '10001': errors.ExchangeError,
342
343
  '10002': errors.PermissionDenied,
343
344
  '10003': errors.PermissionDenied,
@@ -2410,6 +2411,7 @@ class cryptocom extends cryptocom$1 {
2410
2411
  'status': status,
2411
2412
  'updated': this.safeInteger(transaction, 'update_time'),
2412
2413
  'internal': undefined,
2414
+ 'comment': this.safeString(transaction, 'client_wid'),
2413
2415
  'fee': fee,
2414
2416
  };
2415
2417
  }
@@ -1613,7 +1613,7 @@ class currencycom extends currencycom$1 {
1613
1613
  fee['currency'] = code;
1614
1614
  fee['cost'] = feeCost;
1615
1615
  }
1616
- const result = {
1616
+ return {
1617
1617
  'info': transaction,
1618
1618
  'id': this.safeString(transaction, 'id'),
1619
1619
  'txid': this.safeString(transaction, 'blockchainTransactionHash'),
@@ -1631,10 +1631,10 @@ class currencycom extends currencycom$1 {
1631
1631
  'tagFrom': undefined,
1632
1632
  'tagTo': undefined,
1633
1633
  'updated': undefined,
1634
+ 'internal': undefined,
1634
1635
  'comment': undefined,
1635
1636
  'fee': fee,
1636
1637
  };
1637
- return result;
1638
1638
  }
1639
1639
  parseTransactionStatus(status) {
1640
1640
  const statuses = {
@@ -2312,6 +2312,8 @@ class deribit extends deribit$1 {
2312
2312
  'status': status,
2313
2313
  'updated': updated,
2314
2314
  'network': undefined,
2315
+ 'internal': undefined,
2316
+ 'comment': undefined,
2315
2317
  'fee': fee,
2316
2318
  };
2317
2319
  }
@@ -1633,7 +1633,7 @@ class digifinex extends digifinex$1 {
1633
1633
  const amount = this.safeValue(rawOrder, 'amount');
1634
1634
  const price = this.safeValue(rawOrder, 'price');
1635
1635
  const orderParams = this.safeValue(rawOrder, 'params', {});
1636
- const marginResult = this.handleMarginModeAndParams('createOrders', params);
1636
+ const marginResult = this.handleMarginModeAndParams('createOrders', orderParams);
1637
1637
  const currentMarginMode = marginResult[0];
1638
1638
  if (currentMarginMode !== undefined) {
1639
1639
  if (marginMode === undefined) {
@@ -2809,6 +2809,8 @@ class digifinex extends digifinex$1 {
2809
2809
  'currency': code,
2810
2810
  'status': status,
2811
2811
  'updated': updated,
2812
+ 'internal': undefined,
2813
+ 'comment': undefined,
2812
2814
  'fee': fee,
2813
2815
  };
2814
2816
  }
@@ -4129,7 +4131,13 @@ class digifinex extends digifinex$1 {
4129
4131
  const payload = pathPart + request;
4130
4132
  let url = this.urls['api']['rest'] + payload;
4131
4133
  const query = this.omit(params, this.extractParams(path));
4132
- let urlencoded = this.urlencode(this.keysort(query));
4134
+ let urlencoded = undefined;
4135
+ if (signed && (pathPart === '/swap/v2') && (method === 'POST')) {
4136
+ urlencoded = JSON.stringify(params);
4137
+ }
4138
+ else {
4139
+ urlencoded = this.urlencode(this.keysort(query));
4140
+ }
4133
4141
  if (signed) {
4134
4142
  let auth = undefined;
4135
4143
  let nonce = undefined;
@@ -4142,9 +4150,7 @@ class digifinex extends digifinex$1 {
4142
4150
  }
4143
4151
  }
4144
4152
  else if (method === 'POST') {
4145
- const swapPostParams = JSON.stringify(params);
4146
- urlencoded = swapPostParams;
4147
- auth += swapPostParams;
4153
+ auth += urlencoded;
4148
4154
  }
4149
4155
  }
4150
4156
  else {
@@ -2294,6 +2294,7 @@ class exmo extends exmo$1 {
2294
2294
  'tagTo': undefined,
2295
2295
  'updated': this.safeTimestamp(transaction, 'updated'),
2296
2296
  'comment': comment,
2297
+ 'internal': undefined,
2297
2298
  'fee': fee,
2298
2299
  };
2299
2300
  }
@@ -3640,6 +3640,8 @@ class gate extends gate$1 {
3640
3640
  'timestamp': timestamp,
3641
3641
  'datetime': this.iso8601(timestamp),
3642
3642
  'updated': undefined,
3643
+ 'internal': undefined,
3644
+ 'comment': undefined,
3643
3645
  'fee': {
3644
3646
  'currency': code,
3645
3647
  'cost': this.parseNumber(feeCostString),
@@ -1598,6 +1598,8 @@ class gemini extends gemini$1 {
1598
1598
  'currency': code,
1599
1599
  'status': this.parseTransactionStatus(statusRaw),
1600
1600
  'updated': undefined,
1601
+ 'internal': undefined,
1602
+ 'comment': this.safeString(transaction, 'message'),
1601
1603
  'fee': fee,
1602
1604
  };
1603
1605
  }
@@ -1440,6 +1440,9 @@ class hitbtc extends hitbtc$1 {
1440
1440
  const sender = this.safeValue(native, 'senders');
1441
1441
  const addressFrom = this.safeString(sender, 0);
1442
1442
  const amount = this.safeNumber(native, 'amount');
1443
+ const subType = this.safeString(transaction, 'subtype');
1444
+ const internal = subType === 'OFFCHAIN';
1445
+ // https://api.hitbtc.com/#check-if-offchain-is-available
1443
1446
  const fee = {
1444
1447
  'currency': undefined,
1445
1448
  'cost': undefined,
@@ -1469,6 +1472,7 @@ class hitbtc extends hitbtc$1 {
1469
1472
  'tagTo': tagTo,
1470
1473
  'updated': updated,
1471
1474
  'comment': undefined,
1475
+ 'internal': internal,
1472
1476
  'fee': fee,
1473
1477
  };
1474
1478
  }
@@ -1651,6 +1651,8 @@ class hollaex extends hollaex$1 {
1651
1651
  'currency': currency['code'],
1652
1652
  'status': status,
1653
1653
  'updated': updated,
1654
+ 'comment': this.safeString(transaction, 'message'),
1655
+ 'internal': undefined,
1654
1656
  'fee': fee,
1655
1657
  };
1656
1658
  }
@@ -6069,6 +6069,8 @@ class htx extends htx$1 {
6069
6069
  if (networkId === 'ETH' && txHash.indexOf('0x') < 0) {
6070
6070
  txHash = '0x' + txHash;
6071
6071
  }
6072
+ const subType = this.safeString(transaction, 'sub-type');
6073
+ const internal = subType === 'FAST';
6072
6074
  return {
6073
6075
  'info': transaction,
6074
6076
  'id': this.safeString2(transaction, 'id', 'data'),
@@ -6087,6 +6089,8 @@ class htx extends htx$1 {
6087
6089
  'currency': code,
6088
6090
  'status': this.parseTransactionStatus(this.safeString(transaction, 'state')),
6089
6091
  'updated': this.safeInteger(transaction, 'updated-at'),
6092
+ 'comment': undefined,
6093
+ 'internal': internal,
6090
6094
  'fee': {
6091
6095
  'currency': code,
6092
6096
  'cost': this.parseNumber(feeCost),
@@ -1729,6 +1729,8 @@ class huobijp extends huobijp$1 {
1729
1729
  'currency': code,
1730
1730
  'status': this.parseTransactionStatus(this.safeString(transaction, 'state')),
1731
1731
  'updated': this.safeInteger(transaction, 'updated-at'),
1732
+ 'comment': undefined,
1733
+ 'internal': undefined,
1732
1734
  'fee': {
1733
1735
  'currency': code,
1734
1736
  'cost': this.parseNumber(feeCost),
@@ -1674,6 +1674,8 @@ class idex extends idex$1 {
1674
1674
  'currency': code,
1675
1675
  'status': status,
1676
1676
  'updated': updated,
1677
+ 'comment': undefined,
1678
+ 'internal': undefined,
1677
1679
  'fee': fee,
1678
1680
  };
1679
1681
  }
@@ -999,6 +999,7 @@ class indodax extends indodax$1 {
999
999
  'tag': undefined,
1000
1000
  'tagTo': undefined,
1001
1001
  'comment': this.safeString(transaction, 'withdraw_memo'),
1002
+ 'internal': undefined,
1002
1003
  'fee': fee,
1003
1004
  'info': transaction,
1004
1005
  };
@@ -1710,9 +1710,7 @@ class kraken extends kraken$1 {
1710
1710
  if (!(id in result)) {
1711
1711
  throw new errors.OrderNotFound(this.id + ' fetchOrder() could not find order id ' + id);
1712
1712
  }
1713
- const order = this.parseOrder(this.extend({ 'id': id }, result[id]));
1714
- order['info'] = order;
1715
- return order;
1713
+ return this.parseOrder(this.extend({ 'id': id }, result[id]));
1716
1714
  }
1717
1715
  async fetchOrderTrades(id, symbol = undefined, since = undefined, limit = undefined, params = {}) {
1718
1716
  /**
@@ -2159,6 +2157,8 @@ class kraken extends kraken$1 {
2159
2157
  'txid': txid,
2160
2158
  'timestamp': timestamp,
2161
2159
  'datetime': this.iso8601(timestamp),
2160
+ 'comment': undefined,
2161
+ 'internal': undefined,
2162
2162
  'fee': {
2163
2163
  'currency': code,
2164
2164
  'cost': feeCost,
@@ -1757,8 +1757,8 @@ class kucoin extends kucoin$1 {
1757
1757
  * @method
1758
1758
  * @name kucoin#fetchOrderBook
1759
1759
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1760
- * @see https://docs.kucoin.com/#get-part-order-book-aggregated
1761
- * @see https://docs.kucoin.com/#get-full-order-book-aggregated
1760
+ * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-part-order-book-aggregated-
1761
+ * @see https://www.kucoin.com/docs/rest/spot-trading/market-data/get-full-order-book-aggregated-
1762
1762
  * @param {string} symbol unified symbol of the market to fetch the order book for
1763
1763
  * @param {int} [limit] the maximum amount of order book entries to return
1764
1764
  * @param {object} [params] extra parameters specific to the kucoin api endpoint
@@ -1768,7 +1768,6 @@ class kucoin extends kucoin$1 {
1768
1768
  const market = this.market(symbol);
1769
1769
  const level = this.safeInteger(params, 'level', 2);
1770
1770
  const request = { 'symbol': market['id'] };
1771
- let method = 'publicGetMarketOrderbookLevelLevelLimit';
1772
1771
  const isAuthenticated = this.checkRequiredCredentials(false);
1773
1772
  let response = undefined;
1774
1773
  if (!isAuthenticated || limit !== undefined) {
@@ -1784,11 +1783,11 @@ class kucoin extends kucoin$1 {
1784
1783
  }
1785
1784
  request['limit'] = limit ? limit : 100;
1786
1785
  }
1786
+ response = await this.publicGetMarketOrderbookLevelLevelLimit(this.extend(request, params));
1787
1787
  }
1788
1788
  else {
1789
- method = 'privateGetMarketOrderbookLevel2'; // recommended (v3)
1789
+ response = await this.privateGetMarketOrderbookLevel2(this.extend(request, params));
1790
1790
  }
1791
- response = await this[method](this.extend(request, params));
1792
1791
  //
1793
1792
  // public (v1) market/orderbook/level2_20 and market/orderbook/level2_100
1794
1793
  //
@@ -3160,6 +3159,7 @@ class kucoin extends kucoin$1 {
3160
3159
  updated = updated * 1000;
3161
3160
  }
3162
3161
  }
3162
+ const internal = this.safeValue(transaction, 'isInner');
3163
3163
  const tag = this.safeString(transaction, 'memo');
3164
3164
  return {
3165
3165
  'info': transaction,
@@ -3179,6 +3179,7 @@ class kucoin extends kucoin$1 {
3179
3179
  'type': type,
3180
3180
  'status': this.parseTransactionStatus(rawStatus),
3181
3181
  'comment': this.safeString(transaction, 'remark'),
3182
+ 'internal': internal,
3182
3183
  'fee': fee,
3183
3184
  'updated': updated,
3184
3185
  };
@@ -1764,6 +1764,7 @@ class kuna extends kuna$1 {
1764
1764
  const type = this.safeStringLower(transaction, 'type');
1765
1765
  const address = this.safeString(transaction, 'address');
1766
1766
  const isDeposit = (type === 'deposit');
1767
+ const parsedType = isDeposit ? type : 'withdrawal';
1767
1768
  return {
1768
1769
  'info': transaction,
1769
1770
  'id': this.safeString(transaction, 'id'),
@@ -1776,13 +1777,14 @@ class kuna extends kuna$1 {
1776
1777
  'address': address,
1777
1778
  'addressTo': address,
1778
1779
  'amount': this.safeNumber(transaction, 'amount'),
1779
- 'type': !isDeposit ? 'withdrawal' : type,
1780
+ 'type': parsedType,
1780
1781
  'status': this.parseTransactionStatus(this.safeString(transaction, 'status')),
1781
1782
  'updated': this.parse8601(this.safeString(transaction, 'updatedAt')),
1782
1783
  'tagFrom': undefined,
1783
1784
  'tag': undefined,
1784
1785
  'tagTo': undefined,
1785
1786
  'comment': this.safeString(transaction, 'memo'),
1787
+ 'internal': undefined,
1786
1788
  'fee': {
1787
1789
  'cost': this.safeNumber(transaction, 'fee'),
1788
1790
  'currency': code,
@@ -1492,6 +1492,7 @@ class latoken extends latoken$1 {
1492
1492
  'status': status,
1493
1493
  'updated': undefined,
1494
1494
  'comment': undefined,
1495
+ 'internal': undefined,
1495
1496
  'fee': fee,
1496
1497
  };
1497
1498
  }