ccxt 4.5.55 → 4.5.57

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 (321) hide show
  1. package/README.md +215 -10
  2. package/dist/ccxt.browser.min.js +10 -10
  3. package/dist/cjs/ccxt.js +6 -11
  4. package/dist/cjs/src/aftermath.js +10 -5
  5. package/dist/cjs/src/alpaca.js +2 -2
  6. package/dist/cjs/src/apex.js +26 -17
  7. package/dist/cjs/src/arkham.js +10 -7
  8. package/dist/cjs/src/ascendex.js +8 -5
  9. package/dist/cjs/src/aster.js +7 -4
  10. package/dist/cjs/src/backpack.js +4 -4
  11. package/dist/cjs/src/base/Exchange.js +72 -35
  12. package/dist/cjs/src/base/functions/io.js +25 -0
  13. package/dist/cjs/src/base/functions.js +1 -0
  14. package/dist/cjs/src/bigone.js +10 -7
  15. package/dist/cjs/src/binance.js +196 -198
  16. package/dist/cjs/src/bingx.js +7 -7
  17. package/dist/cjs/src/bitfinex.js +71 -58
  18. package/dist/cjs/src/bitflyer.js +2 -1
  19. package/dist/cjs/src/bitget.js +16 -5
  20. package/dist/cjs/src/bitmart.js +18 -10
  21. package/dist/cjs/src/bitmex.js +8 -5
  22. package/dist/cjs/src/bitopro.js +2 -2
  23. package/dist/cjs/src/bitrue.js +4 -3
  24. package/dist/cjs/src/bitso.js +7 -4
  25. package/dist/cjs/src/bitstamp.js +7 -4
  26. package/dist/cjs/src/bitteam.js +1 -1
  27. package/dist/cjs/src/bittrade.js +2 -2
  28. package/dist/cjs/src/bitvavo.js +457 -34
  29. package/dist/cjs/src/blofin.js +28 -4
  30. package/dist/cjs/src/bullish.js +6 -5
  31. package/dist/cjs/src/bybit.js +19 -17
  32. package/dist/cjs/src/bybiteu.js +1 -0
  33. package/dist/cjs/src/bydfi.js +1 -1
  34. package/dist/cjs/src/cex.js +3 -3
  35. package/dist/cjs/src/coinbase.js +75 -65
  36. package/dist/cjs/src/coinbaseexchange.js +4 -3
  37. package/dist/cjs/src/coinbaseinternational.js +17 -10
  38. package/dist/cjs/src/coinex.js +79 -77
  39. package/dist/cjs/src/coinmetro.js +1 -1
  40. package/dist/cjs/src/coinsph.js +5 -5
  41. package/dist/cjs/src/cryptocom.js +52 -54
  42. package/dist/cjs/src/cryptomus.js +43 -39
  43. package/dist/cjs/src/deepcoin.js +9 -5
  44. package/dist/cjs/src/delta.js +53 -53
  45. package/dist/cjs/src/deribit.js +35 -35
  46. package/dist/cjs/src/derive.js +31 -31
  47. package/dist/cjs/src/digifinex.js +45 -45
  48. package/dist/cjs/src/exmo.js +104 -122
  49. package/dist/cjs/src/extended.js +3497 -0
  50. package/dist/cjs/src/foxbit.js +72 -76
  51. package/dist/cjs/src/gate.js +53 -53
  52. package/dist/cjs/src/gemini.js +45 -45
  53. package/dist/cjs/src/grvt.js +17 -11
  54. package/dist/cjs/src/hashkey.js +56 -58
  55. package/dist/cjs/src/hibachi.js +1 -1
  56. package/dist/cjs/src/hitbtc.js +5 -14
  57. package/dist/cjs/src/hollaex.js +51 -54
  58. package/dist/cjs/src/htx.js +84 -72
  59. package/dist/cjs/src/hyperliquid.js +60 -55
  60. package/dist/cjs/src/indodax.js +4 -3
  61. package/dist/cjs/src/kraken.js +71 -71
  62. package/dist/cjs/src/krakenfutures.js +2 -1
  63. package/dist/cjs/src/kucoin.js +3 -2
  64. package/dist/cjs/src/latoken.js +30 -32
  65. package/dist/cjs/src/lbank.js +64 -60
  66. package/dist/cjs/src/lighter.js +36 -38
  67. package/dist/cjs/src/luno.js +36 -44
  68. package/dist/cjs/src/mercado.js +2 -1
  69. package/dist/cjs/src/mexc.js +72 -63
  70. package/dist/cjs/src/modetrade.js +51 -53
  71. package/dist/cjs/src/ndax.js +35 -37
  72. package/dist/cjs/src/okx.js +23 -5
  73. package/dist/cjs/src/onetrading.js +21 -23
  74. package/dist/cjs/src/p2b.js +8 -4
  75. package/dist/cjs/src/paradex.js +3 -2
  76. package/dist/cjs/src/phemex.js +47 -47
  77. package/dist/cjs/src/poloniex.js +19 -13
  78. package/dist/cjs/src/pro/alpaca.js +1 -1
  79. package/dist/cjs/src/pro/apex.js +11 -2
  80. package/dist/cjs/src/pro/arkham.js +1 -1
  81. package/dist/cjs/src/pro/aster.js +10 -9
  82. package/dist/cjs/src/pro/backpack.js +1 -1
  83. package/dist/cjs/src/pro/binance.js +6 -6
  84. package/dist/cjs/src/pro/bingx.js +7 -2
  85. package/dist/cjs/src/pro/bitget.js +1 -1
  86. package/dist/cjs/src/pro/bithumb.js +1 -1
  87. package/dist/cjs/src/pro/bitmart.js +10 -0
  88. package/dist/cjs/src/pro/bitmex.js +1 -1
  89. package/dist/cjs/src/pro/bitstamp.js +1 -1
  90. package/dist/cjs/src/pro/blockchaincom.js +1 -1
  91. package/dist/cjs/src/pro/bybit.js +1 -1
  92. package/dist/cjs/src/pro/cex.js +1 -1
  93. package/dist/cjs/src/pro/coinex.js +1 -1
  94. package/dist/cjs/src/pro/coinone.js +1 -1
  95. package/dist/cjs/src/pro/cryptocom.js +3 -1
  96. package/dist/cjs/src/pro/dydx.js +1 -1
  97. package/dist/cjs/src/pro/exmo.js +1 -1
  98. package/dist/cjs/src/pro/extended.js +865 -0
  99. package/dist/cjs/src/pro/gate.js +1 -1
  100. package/dist/cjs/src/pro/grvt.js +8 -0
  101. package/dist/cjs/src/pro/htx.js +4 -4
  102. package/dist/cjs/src/pro/independentreserve.js +1 -1
  103. package/dist/cjs/src/pro/krakenfutures.js +16 -4
  104. package/dist/cjs/src/pro/kucoin.js +1 -1
  105. package/dist/cjs/src/pro/luno.js +3 -3
  106. package/dist/cjs/src/pro/modetrade.js +3 -3
  107. package/dist/cjs/src/pro/okx.js +4 -4
  108. package/dist/cjs/src/pro/onetrading.js +1 -1
  109. package/dist/cjs/src/pro/toobit.js +1 -1
  110. package/dist/cjs/src/pro/weex.js +1 -1
  111. package/dist/cjs/src/pro/woo.js +4 -4
  112. package/dist/cjs/src/pro/woofipro.js +3 -3
  113. package/dist/cjs/src/pro/xt.js +1 -1
  114. package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
  115. package/dist/cjs/src/tokocrypto.js +1 -1
  116. package/dist/cjs/src/toobit.js +3 -3
  117. package/dist/cjs/src/upbit.js +3 -3
  118. package/dist/cjs/src/weex.js +57 -62
  119. package/dist/cjs/src/whitebit.js +61 -63
  120. package/dist/cjs/src/woo.js +66 -55
  121. package/dist/cjs/src/woofipro.js +54 -48
  122. package/dist/cjs/src/xt.js +3 -2
  123. package/dist/cjs/src/yobit.js +4 -2
  124. package/dist/cjs/src/zebpay.js +73 -75
  125. package/js/ccxt.d.ts +8 -14
  126. package/js/ccxt.js +6 -10
  127. package/js/src/abstract/bitvavo.d.ts +15 -7
  128. package/js/src/abstract/extended.d.ts +58 -0
  129. package/js/src/abstract/mexc.d.ts +1 -0
  130. package/js/src/aftermath.js +10 -5
  131. package/js/src/alpaca.js +2 -2
  132. package/js/src/apex.d.ts +1 -1
  133. package/js/src/apex.js +26 -17
  134. package/js/src/arkham.js +10 -7
  135. package/js/src/ascendex.js +8 -5
  136. package/js/src/aster.js +7 -4
  137. package/js/src/backpack.js +4 -4
  138. package/js/src/base/Exchange.d.ts +10 -6
  139. package/js/src/base/Exchange.js +72 -35
  140. package/js/src/base/functions/io.d.ts +7 -0
  141. package/js/src/base/functions/io.js +24 -0
  142. package/js/src/bigone.js +10 -7
  143. package/js/src/binance.d.ts +2 -0
  144. package/js/src/binance.js +200 -202
  145. package/js/src/bingx.js +7 -7
  146. package/js/src/bitfinex.d.ts +2 -0
  147. package/js/src/bitfinex.js +71 -58
  148. package/js/src/bitflyer.js +2 -1
  149. package/js/src/bitget.js +16 -5
  150. package/js/src/bitmart.js +18 -10
  151. package/js/src/bitmex.js +8 -5
  152. package/js/src/bitopro.js +2 -2
  153. package/js/src/bitrue.js +4 -3
  154. package/js/src/bitso.js +7 -4
  155. package/js/src/bitstamp.js +7 -4
  156. package/js/src/bitteam.js +1 -1
  157. package/js/src/bittrade.js +2 -2
  158. package/js/src/bitvavo.d.ts +114 -21
  159. package/js/src/bitvavo.js +457 -34
  160. package/js/src/blofin.d.ts +1 -0
  161. package/js/src/blofin.js +28 -4
  162. package/js/src/bullish.js +6 -5
  163. package/js/src/bybit.d.ts +1 -1
  164. package/js/src/bybit.js +19 -17
  165. package/js/src/bybiteu.js +1 -0
  166. package/js/src/bydfi.js +1 -1
  167. package/js/src/cex.js +3 -3
  168. package/js/src/coinbase.d.ts +63 -56
  169. package/js/src/coinbase.js +75 -65
  170. package/js/src/coinbaseexchange.js +4 -3
  171. package/js/src/coinbaseinternational.d.ts +1 -1
  172. package/js/src/coinbaseinternational.js +17 -10
  173. package/js/src/coinex.d.ts +2 -1
  174. package/js/src/coinex.js +79 -77
  175. package/js/src/coinmetro.d.ts +1 -1
  176. package/js/src/coinmetro.js +1 -1
  177. package/js/src/coinsph.js +5 -5
  178. package/js/src/cryptocom.d.ts +1 -0
  179. package/js/src/cryptocom.js +52 -54
  180. package/js/src/cryptomus.d.ts +2 -1
  181. package/js/src/cryptomus.js +43 -39
  182. package/js/src/deepcoin.js +9 -5
  183. package/js/src/delta.d.ts +1 -0
  184. package/js/src/delta.js +53 -53
  185. package/js/src/deribit.d.ts +1 -0
  186. package/js/src/deribit.js +35 -35
  187. package/js/src/derive.d.ts +1 -0
  188. package/js/src/derive.js +31 -31
  189. package/js/src/digifinex.d.ts +1 -0
  190. package/js/src/digifinex.js +45 -45
  191. package/js/src/exmo.d.ts +1 -0
  192. package/js/src/exmo.js +104 -122
  193. package/js/src/extended.d.ts +554 -0
  194. package/js/src/extended.js +3490 -0
  195. package/js/src/foxbit.d.ts +1 -0
  196. package/js/src/foxbit.js +72 -76
  197. package/js/src/gate.d.ts +1 -0
  198. package/js/src/gate.js +53 -53
  199. package/js/src/gemini.d.ts +2 -1
  200. package/js/src/gemini.js +45 -45
  201. package/js/src/grvt.d.ts +1 -1
  202. package/js/src/grvt.js +17 -11
  203. package/js/src/hashkey.d.ts +1 -0
  204. package/js/src/hashkey.js +56 -58
  205. package/js/src/hibachi.d.ts +1 -1
  206. package/js/src/hibachi.js +1 -1
  207. package/js/src/hitbtc.d.ts +0 -1
  208. package/js/src/hitbtc.js +5 -14
  209. package/js/src/hollaex.d.ts +1 -0
  210. package/js/src/hollaex.js +51 -54
  211. package/js/src/htx.d.ts +1 -0
  212. package/js/src/htx.js +84 -72
  213. package/js/src/hyperliquid.d.ts +5 -4
  214. package/js/src/hyperliquid.js +60 -55
  215. package/js/src/indodax.js +4 -3
  216. package/js/src/kraken.d.ts +2 -1
  217. package/js/src/kraken.js +71 -71
  218. package/js/src/krakenfutures.js +2 -1
  219. package/js/src/kucoin.js +3 -2
  220. package/js/src/latoken.d.ts +1 -0
  221. package/js/src/latoken.js +30 -32
  222. package/js/src/lbank.d.ts +1 -0
  223. package/js/src/lbank.js +64 -60
  224. package/js/src/lighter.d.ts +2 -1
  225. package/js/src/lighter.js +36 -38
  226. package/js/src/luno.d.ts +1 -0
  227. package/js/src/luno.js +36 -44
  228. package/js/src/mercado.js +2 -1
  229. package/js/src/mexc.d.ts +4 -3
  230. package/js/src/mexc.js +72 -63
  231. package/js/src/modetrade.d.ts +1 -0
  232. package/js/src/modetrade.js +51 -53
  233. package/js/src/ndax.d.ts +1 -0
  234. package/js/src/ndax.js +35 -37
  235. package/js/src/okx.js +23 -5
  236. package/js/src/onetrading.d.ts +2 -1
  237. package/js/src/onetrading.js +21 -23
  238. package/js/src/p2b.js +8 -4
  239. package/js/src/paradex.js +3 -2
  240. package/js/src/phemex.d.ts +1 -0
  241. package/js/src/phemex.js +47 -47
  242. package/js/src/poloniex.js +19 -13
  243. package/js/src/pro/alpaca.js +1 -1
  244. package/js/src/pro/apex.js +11 -2
  245. package/js/src/pro/arkham.js +1 -1
  246. package/js/src/pro/aster.js +10 -9
  247. package/js/src/pro/backpack.js +1 -1
  248. package/js/src/pro/binance.d.ts +1 -1
  249. package/js/src/pro/binance.js +6 -6
  250. package/js/src/pro/bingx.js +7 -2
  251. package/js/src/pro/bitget.js +1 -1
  252. package/js/src/pro/bithumb.js +1 -1
  253. package/js/src/pro/bitmart.js +10 -0
  254. package/js/src/pro/bitmex.js +1 -1
  255. package/js/src/pro/bitstamp.js +1 -1
  256. package/js/src/pro/blockchaincom.js +1 -1
  257. package/js/src/pro/bybit.js +1 -1
  258. package/js/src/pro/cex.js +1 -1
  259. package/js/src/pro/coinex.js +1 -1
  260. package/js/src/pro/coinone.js +1 -1
  261. package/js/src/pro/cryptocom.js +3 -1
  262. package/js/src/pro/dydx.js +1 -1
  263. package/js/src/pro/exmo.js +1 -1
  264. package/js/src/pro/extended.d.ts +126 -0
  265. package/js/src/pro/extended.js +858 -0
  266. package/js/src/pro/gate.js +1 -1
  267. package/js/src/pro/grvt.js +8 -0
  268. package/js/src/pro/htx.d.ts +4 -4
  269. package/js/src/pro/htx.js +4 -4
  270. package/js/src/pro/independentreserve.js +1 -1
  271. package/js/src/pro/krakenfutures.d.ts +4 -4
  272. package/js/src/pro/krakenfutures.js +16 -4
  273. package/js/src/pro/kucoin.js +1 -1
  274. package/js/src/pro/luno.d.ts +1 -1
  275. package/js/src/pro/luno.js +3 -3
  276. package/js/src/pro/modetrade.d.ts +3 -3
  277. package/js/src/pro/modetrade.js +3 -3
  278. package/js/src/pro/okx.d.ts +4 -4
  279. package/js/src/pro/okx.js +4 -4
  280. package/js/src/pro/onetrading.js +1 -1
  281. package/js/src/pro/toobit.js +1 -1
  282. package/js/src/pro/weex.js +1 -1
  283. package/js/src/pro/woo.d.ts +4 -4
  284. package/js/src/pro/woo.js +4 -4
  285. package/js/src/pro/woofipro.d.ts +3 -3
  286. package/js/src/pro/woofipro.js +3 -3
  287. package/js/src/pro/xt.js +1 -1
  288. package/js/src/tokocrypto.js +1 -1
  289. package/js/src/toobit.d.ts +1 -1
  290. package/js/src/toobit.js +3 -3
  291. package/js/src/upbit.js +3 -3
  292. package/js/src/weex.d.ts +1 -0
  293. package/js/src/weex.js +57 -62
  294. package/js/src/whitebit.d.ts +1 -0
  295. package/js/src/whitebit.js +61 -63
  296. package/js/src/woo.d.ts +1 -0
  297. package/js/src/woo.js +66 -55
  298. package/js/src/woofipro.d.ts +1 -0
  299. package/js/src/woofipro.js +54 -48
  300. package/js/src/xt.js +3 -2
  301. package/js/src/yobit.js +4 -2
  302. package/js/src/zebpay.d.ts +2 -1
  303. package/js/src/zebpay.js +73 -75
  304. package/package.json +25 -11
  305. package/dist/cjs/src/gateio.js +0 -18
  306. package/dist/cjs/src/oxfun.js +0 -2931
  307. package/dist/cjs/src/pro/gateio.js +0 -18
  308. package/dist/cjs/src/pro/oxfun.js +0 -1113
  309. package/js/src/abstract/gateio.d.ts +0 -346
  310. package/js/src/abstract/gateio.js +0 -5
  311. package/js/src/abstract/oxfun.d.ts +0 -37
  312. package/js/src/gateio.d.ts +0 -4
  313. package/js/src/gateio.js +0 -11
  314. package/js/src/oxfun.d.ts +0 -442
  315. package/js/src/oxfun.js +0 -2924
  316. package/js/src/pro/gateio.d.ts +0 -4
  317. package/js/src/pro/gateio.js +0 -11
  318. package/js/src/pro/oxfun.d.ts +0 -234
  319. package/js/src/pro/oxfun.js +0 -1106
  320. /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
  321. /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
package/js/src/zebpay.js CHANGED
@@ -363,89 +363,87 @@ export default class zebpay extends Exchange {
363
363
  // }
364
364
  //
365
365
  const rows = this.safeList(response, 'data', []);
366
- const result = {};
367
- for (let i = 0; i < rows.length; i++) {
368
- const currency = rows[i];
369
- const currencyId = this.safeString(currency, 'currency');
370
- const code = this.safeCurrencyCode(currencyId);
371
- const name = this.safeString(currency, 'name');
372
- const precision = this.parseNumber(this.parsePrecision(this.safeString(currency, 'precision')));
373
- const chains = this.safeList(currency, 'chains', []);
374
- const networks = {};
375
- let minWithdrawFeeString = undefined;
376
- let minWithdrawString = undefined;
377
- let minDepositString = undefined;
378
- let deposit = false;
379
- let withdraw = false;
380
- for (let j = 0; j < chains.length; j++) {
381
- const chain = chains[j];
382
- const networkId = this.safeString(chain, 'chainId');
383
- const networkCode = this.networkIdToCode(networkId);
384
- const depositAllowed = this.safeBool(chain, 'isDepositEnabled') === true;
385
- deposit = (depositAllowed) ? depositAllowed : deposit;
386
- const withdrawAllowed = this.safeBool(chain, 'isWithdrawEnabled') === true;
387
- withdraw = (withdrawAllowed) ? withdrawAllowed : withdraw;
388
- const withdrawFeeString = this.safeString(chain, 'withdrawalFee');
389
- if (withdrawFeeString !== undefined) {
390
- minWithdrawFeeString = (minWithdrawFeeString === undefined) ? withdrawFeeString : Precise.stringMin(withdrawFeeString, minWithdrawFeeString);
391
- }
392
- const minNetworkWithdrawString = this.safeString(chain, 'withdrawalMinSize');
393
- if (minNetworkWithdrawString !== undefined) {
394
- minWithdrawString = (minWithdrawString === undefined) ? minNetworkWithdrawString : Precise.stringMin(minNetworkWithdrawString, minWithdrawString);
395
- }
396
- const minNetworkDepositString = this.safeString(chain, 'depositMinSize');
397
- if (minNetworkDepositString !== undefined) {
398
- minDepositString = (minDepositString === undefined) ? minNetworkDepositString : Precise.stringMin(minNetworkDepositString, minDepositString);
399
- }
400
- networks[networkCode] = {
401
- 'info': chain,
402
- 'id': networkId,
403
- 'network': networkCode,
404
- 'active': depositAllowed && withdrawAllowed,
405
- 'deposit': depositAllowed,
406
- 'withdraw': withdrawAllowed,
407
- 'fee': this.parseNumber(withdrawFeeString),
408
- 'precision': precision,
409
- 'limits': {
410
- 'withdraw': {
411
- 'min': this.parseNumber(minNetworkWithdrawString),
412
- 'max': undefined,
413
- },
414
- 'deposit': {
415
- 'min': this.parseNumber(minNetworkDepositString),
416
- 'max': undefined,
417
- },
418
- },
419
- };
366
+ return this.parseCurrencies(rows);
367
+ }
368
+ parseCurrency(rawCurrency) {
369
+ const currencyId = this.safeString(rawCurrency, 'currency');
370
+ const code = this.safeCurrencyCode(currencyId);
371
+ const name = this.safeString(rawCurrency, 'name');
372
+ const precision = this.parseNumber(this.parsePrecision(this.safeString(rawCurrency, 'precision')));
373
+ const chains = this.safeList(rawCurrency, 'chains', []);
374
+ const networks = {};
375
+ let minWithdrawFeeString = undefined;
376
+ let minWithdrawString = undefined;
377
+ let minDepositString = undefined;
378
+ let deposit = false;
379
+ let withdraw = false;
380
+ for (let j = 0; j < chains.length; j++) {
381
+ const chain = chains[j];
382
+ const networkId = this.safeString(chain, 'chainId');
383
+ const networkCode = this.networkIdToCode(networkId, code);
384
+ const depositAllowed = this.safeBool(chain, 'isDepositEnabled') === true;
385
+ deposit = (depositAllowed) ? depositAllowed : deposit;
386
+ const withdrawAllowed = this.safeBool(chain, 'isWithdrawEnabled') === true;
387
+ withdraw = (withdrawAllowed) ? withdrawAllowed : withdraw;
388
+ const withdrawFeeString = this.safeString(chain, 'withdrawalFee');
389
+ if (withdrawFeeString !== undefined) {
390
+ minWithdrawFeeString = (minWithdrawFeeString === undefined) ? withdrawFeeString : Precise.stringMin(withdrawFeeString, minWithdrawFeeString);
391
+ }
392
+ const minNetworkWithdrawString = this.safeString(chain, 'withdrawalMinSize');
393
+ if (minNetworkWithdrawString !== undefined) {
394
+ minWithdrawString = (minWithdrawString === undefined) ? minNetworkWithdrawString : Precise.stringMin(minNetworkWithdrawString, minWithdrawString);
395
+ }
396
+ const minNetworkDepositString = this.safeString(chain, 'depositMinSize');
397
+ if (minNetworkDepositString !== undefined) {
398
+ minDepositString = (minDepositString === undefined) ? minNetworkDepositString : Precise.stringMin(minNetworkDepositString, minDepositString);
420
399
  }
421
- result[code] = this.safeCurrencyStructure({
422
- 'info': currency,
423
- 'code': code,
424
- 'id': currencyId,
425
- 'name': name,
426
- 'active': deposit && withdraw,
427
- 'deposit': deposit,
428
- 'withdraw': withdraw,
429
- 'fee': this.parseNumber(minWithdrawFeeString),
400
+ networks[networkCode] = {
401
+ 'info': chain,
402
+ 'id': networkId,
403
+ 'network': networkCode,
404
+ 'active': depositAllowed && withdrawAllowed,
405
+ 'deposit': depositAllowed,
406
+ 'withdraw': withdrawAllowed,
407
+ 'fee': this.parseNumber(withdrawFeeString),
430
408
  'precision': precision,
431
409
  'limits': {
432
- 'amount': {
433
- 'min': undefined,
434
- 'max': undefined,
435
- },
436
410
  'withdraw': {
437
- 'min': this.parseNumber(minWithdrawString),
411
+ 'min': this.parseNumber(minNetworkWithdrawString),
438
412
  'max': undefined,
439
413
  },
440
414
  'deposit': {
441
- 'min': this.parseNumber(minDepositString),
415
+ 'min': this.parseNumber(minNetworkDepositString),
442
416
  'max': undefined,
443
417
  },
444
418
  },
445
- 'networks': networks,
446
- });
419
+ };
447
420
  }
448
- return result;
421
+ return this.safeCurrencyStructure({
422
+ 'info': rawCurrency,
423
+ 'code': code,
424
+ 'id': currencyId,
425
+ 'name': name,
426
+ 'active': deposit && withdraw,
427
+ 'deposit': deposit,
428
+ 'withdraw': withdraw,
429
+ 'fee': this.parseNumber(minWithdrawFeeString),
430
+ 'precision': precision,
431
+ 'limits': {
432
+ 'amount': {
433
+ 'min': undefined,
434
+ 'max': undefined,
435
+ },
436
+ 'withdraw': {
437
+ 'min': this.parseNumber(minWithdrawString),
438
+ 'max': undefined,
439
+ },
440
+ 'deposit': {
441
+ 'min': this.parseNumber(minDepositString),
442
+ 'max': undefined,
443
+ },
444
+ },
445
+ 'networks': networks,
446
+ });
449
447
  }
450
448
  /**
451
449
  * @method
@@ -1786,11 +1784,11 @@ export default class zebpay extends Exchange {
1786
1784
  // }
1787
1785
  // ]
1788
1786
  //
1789
- const timestamp = this.safeInteger2(ticker, 'timestamp', 'ts', undefined);
1787
+ const timestamp = this.safeInteger2(ticker, 'timestamp', 'ts');
1790
1788
  const marketId = this.safeString(ticker, 'symbol');
1791
1789
  market = this.safeMarket(marketId);
1792
- const close = this.safeString(ticker, 'close', undefined);
1793
- const last = this.safeString(ticker, 'last', undefined);
1790
+ const close = this.safeString(ticker, 'close');
1791
+ const last = this.safeString(ticker, 'last');
1794
1792
  const percentage = this.safeString(ticker, 'percentage');
1795
1793
  const bidVolume = this.safeString(ticker, 'bidVolume');
1796
1794
  const askVolume = this.safeString(ticker, 'askVolume');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccxt",
3
- "version": "4.5.55",
3
+ "version": "4.5.57",
4
4
  "description": "A cryptocurrency trading API with more than 100 exchanges in JavaScript / TypeScript / Python / C# / PHP / Go",
5
5
  "unpkg": "dist/ccxt.browser.min.js",
6
6
  "type": "module",
@@ -36,9 +36,14 @@
36
36
  "docker": "docker-compose run --rm ccxt",
37
37
  "fixTSBug": "node build/fixTSBug",
38
38
  "transpileCsSingle": "tsx build/csharpTranspiler.ts",
39
+ "transpileJavaSingle": "tsx build/javaTranspiler.ts",
39
40
  "transpileCS": "tsx build/csharpTranspiler.ts --multi",
41
+ "transpileJava": "tsx build/javaTranspiler.ts --multi && tsx build/javaTranspiler.ts --ws && tsx build/generateJavaWrappers.ts",
42
+ "transpileJavaWs": "tsx build/javaTranspiler.ts --ws",
40
43
  "transpileCSWs": "tsx build/csharpTranspiler.ts --ws",
41
44
  "buildCS": "dotnet build cs/ccxt.sln",
45
+ "buildJava": "cd java/ && ./gradlew build && cd ../",
46
+ "publishJava": "cd java && ./gradlew :lib:publishToMavenCentral --no-configuration-cache",
42
47
  "buildGO": "go build -C go ./v4 && go build -C go ./v4/pro",
43
48
  "build-go-cli": "go build -C go/cli",
44
49
  "formatGO": "go fmt -C go v4 tests",
@@ -48,9 +53,10 @@
48
53
  "buildCSTests": "dotnet build cs/tests/tests.csproj",
49
54
  "buildCSRelease": "dotnet build cs --configuration Release",
50
55
  "csharp": "npm run transpileCS && npm run transpileCSWs && npm run buildCS",
56
+ "java": "npm run transpileJava && npm run buildJava",
51
57
  "go": "npm run transpileGO && npm run buildGO",
52
58
  "force-build//WithoutGo": "npm run pre-transpile && npm run force-transpile-fast && npm run csharp && npm run post-transpile && npm run update-badges",
53
- "force-build": "npm run pre-transpile && npm run go && npm run force-transpile-fast && npm run csharp && npm run post-transpile && npm run update-badges",
59
+ "force-build": "npm run pre-transpile && npm run go && npm run force-transpile-fast && npm run csharp && npm run java && npm run post-transpile && npm run update-badges",
54
60
  "//TMPCommentforce-build": "npm run pre-transpile && npm run force-transpile-fast && npm run csharp && npm run go && npm run post-transpile && npm run update-badges",
55
61
  "build-docs": "node jsdoc2md.js && node examples2md.js",
56
62
  "serve-docs": "docsify serve ./wiki",
@@ -64,6 +70,7 @@
64
70
  "emitAPIPhp": "tsx build/generateImplicitAPI.ts -- --php",
65
71
  "emitAPIGo": "tsx build/generateImplicitAPI.ts -- --go",
66
72
  "emitAPICs": "tsx build/generateImplicitAPI.ts -- --csharp",
73
+ "emitAPIJava": "tsx build/generateImplicitAPI.ts -- --java",
67
74
  "build": "npm run pre-transpile && npm run transpile && npm run post-transpile && npm run update-badges && npm run build-docs",
68
75
  "force-build-slow": "npm run pre-transpile && npm run force-transpile && npm run post-transpile && npm run update-badges",
69
76
  "pre-transpile-js": "npm run export-exchanges && npm run vss && npm run emitAPITs && npm run tsBuild && npm run validate-types && npm run tsBuildExamples && npm run check-js-syntax && npm run bundle",
@@ -72,6 +79,7 @@
72
79
  "pre-transpile-go": "npm run export-exchanges && npm run emitAPIGo",
73
80
  "pre-transpile-js-simple": "npm run export-exchanges && npm run emitAPITs && tsc && npm run validate-types",
74
81
  "pre-transpile-cs": "npm run export-exchanges && npm run emitAPICs",
82
+ "pre-transpile-java": "npm run export-exchanges && npm run emitAPIJava",
75
83
  "pre-transpile": "npm run export-exchanges && npm run vss && npm run tsBuild && npm run emitAPI && npm run validate-types && npm run tsBuildExamples && npm run copy-python-files && npm run check-js-syntax && npm run bundle",
76
84
  "pre-transpile-pr": "npm run export-exchanges && npm run tsBuild && npm run emitAPI && npm run check-js-syntax",
77
85
  "post-transpile": "npm run check-python-syntax && npm run check-php-syntax",
@@ -81,6 +89,7 @@
81
89
  "cli.php": "php ./examples/php/cli.php",
82
90
  "cli.cs": "dotnet run --project \"./cs/cli/cli.csproj\"",
83
91
  "cli.go": "go run -C go ./cli/main.go",
92
+ "cli.java": "./utils/java-cli.sh",
84
93
  "export-exchanges": "node build/export-exchanges",
85
94
  "capabilities": "node ./examples/js/exchange-capabilities.js",
86
95
  "git-ignore-generated-files": "node build/git-ignore-generated-files.cjs",
@@ -138,6 +147,7 @@
138
147
  "live-tests-ws-php": "npm run live-tests -- --php --ws",
139
148
  "live-tests-rest-csharp": "npm run live-tests -- --csharp",
140
149
  "live-tests-rest-go": "npm run live-tests -- --go",
150
+ "live-tests-java": "npm run live-tests -- --java",
141
151
  "live-tests-ws-csharp": "npm run live-tests -- --csharp --ws",
142
152
  "live-tests-ws-go": "npm run live-tests -- --go --ws",
143
153
  "ti-ts": "tsx ts/src/test/tests.init.ts",
@@ -155,9 +165,10 @@
155
165
  "request-php-sync": "npm run ti-php -- --requestTests --sync",
156
166
  "request-php": "npm run request-php-sync && npm run request-php-async",
157
167
  "request-cs": "npm run ti-cs -- --requestTests",
168
+ "request-java": "./java/gradlew -p java :tests:run -- --args=\"--requestTests\"",
158
169
  "request-go": "npm run ti-go -- --requestTests",
159
170
  "request-tests//withoutGo": "npm run request-js && npm run request-py && npm run request-php && npm run request-cs",
160
- "request-tests": "npm run request-js && npm run request-py && npm run request-php && npm run request-cs && npm run request-go",
171
+ "request-tests": "npm run request-js && npm run request-py && npm run request-php && npm run request-cs && npm run request-go && npm run request-java",
161
172
  "response-ts": "npm run ti-ts -- --responseTests",
162
173
  "response-js": "npm run ti-js -- --responseTests",
163
174
  "response-py-sync": "npm run ti-py -- --responseTests --sync",
@@ -165,10 +176,11 @@
165
176
  "response-py": "npm run response-py-sync && npm run response-py-async",
166
177
  "response-cs": "npm run ti-cs -- --responseTests",
167
178
  "response-go": "npm run ti-go -- --responseTests",
179
+ "response-java": "./java/gradlew -p java :tests:run -- --args=\"--responseTests\"",
168
180
  "response-php-async": "npm run ti-php -- --responseTests",
169
181
  "response-php-sync": "npm run ti-php -- --responseTests --sync",
170
182
  "response-php": "npm run response-php-sync && npm run response-php-async",
171
- "response-tests": "npm run response-js && npm run response-py && npm run response-php && npm run response-cs && npm run response-go",
183
+ "response-tests": "npm run response-js && npm run response-py && npm run response-php && npm run response-cs && npm run response-go && npm run response-java",
172
184
  "response-tests//withoutGo": "npm run response-js && npm run response-py && npm run response-php && npm run response-cs",
173
185
  "static-updater": "tsx ./utils/update-static-json --update",
174
186
  "id-tests-js": "npm run ti-js -- --idTests",
@@ -176,7 +188,8 @@
176
188
  "id-tests-php": "npm run ti-php -- --idTests",
177
189
  "id-tests-cs": "npm run ti-cs -- --idTests",
178
190
  "id-tests-go": "npm run ti-go -- --idTests",
179
- "id-tests": "npm run id-tests-js && npm run id-tests-py && npm run id-tests-php && npm run id-tests-cs",
191
+ "id-tests-java": "cd java/ && ./gradlew :tests:run -- --args=\"--idTests\" && cd ../",
192
+ "id-tests": "npm run id-tests-js && npm run id-tests-py && npm run id-tests-php && npm run id-tests-cs && npm run id-tests-go && npm run id-tests-java",
180
193
  "id-tests//withGO": "npm run id-tests-js && npm run id-tests-py && npm run id-tests-php && npm run id-tests-cs && npm run id-tests-go",
181
194
  "test-base-rest-ts": "npm run ti-ts -- --baseTests",
182
195
  "test-base-rest-js": "npm run ti-js -- --baseTests",
@@ -184,13 +197,14 @@
184
197
  "test-base-rest-php": "npm run ti-php -- --baseTests",
185
198
  "test-base-rest-cs": "npm run ti-cs -- --baseTests",
186
199
  "test-base-rest-go": "npm run ti-go -- --baseTests && cd ../",
200
+ "test-base-rest-java": "cd java/ && ./gradlew :tests:run -- --args=\"--baseTests\" && cd ../",
187
201
  "test-base-ws-ts": "npm run ti-ts -- --baseTests --ws",
188
202
  "test-base-ws-js": "npm run ti-js -- --baseTests --ws",
189
203
  "test-base-ws-py": "npm run ti-py -- --baseTests --ws",
190
204
  "test-base-ws-php": "npm run ti-php -- --baseTests --ws",
191
205
  "test-base-ws-cs": "npm run ti-cs -- --baseTests --ws",
192
206
  "test-base-ws-go": "npm run ti-go -- --baseTests --ws",
193
- "test-base-rest": "npm run test-base-rest-js && npm run test-base-rest-py && npm run test-base-rest-php && npm run test-base-rest-cs",
207
+ "test-base-rest": "npm run test-base-rest-js && npm run test-base-rest-py && npm run test-base-rest-php && npm run test-base-rest-cs && npm run test-base-rest-go && npm run test-base-rest-java",
194
208
  "test-base-ws": "npm run test-base-ws-js && npm run test-base-ws-py && npm run test-base-ws-php && npm run test-base-ws-cs && npm run test-base-ws-go",
195
209
  "test": "npm run build && npm run commonjs-test && npm run id-tests && npm run request-tests && npm run response-tests && npm run live-tests",
196
210
  "commonjs-test": "node ./utils/test-commonjs.cjs",
@@ -214,15 +228,15 @@
214
228
  "as-table": "^1.0.55",
215
229
  "asciichart": "^1.5.25",
216
230
  "assert": "^2.0.0",
217
- "ast-transpiler": "^0.0.85",
231
+ "ast-transpiler": "0.0.86",
218
232
  "blessed": "^0.1.81",
219
233
  "clipboardy": "^5.0.0",
220
234
  "commander": "^14.0.1",
221
235
  "docsify": "^4.13.1",
236
+ "eslint": "8.22.0",
222
237
  "eslint-config-airbnb-base": "15.0.0",
223
238
  "eslint-plugin-import": "2.25.4",
224
239
  "eslint-plugin-jsdoc": "^46.9.0",
225
- "eslint": "8.22.0",
226
240
  "https-proxy-agent": "^5.0.1",
227
241
  "jsdoc-to-markdown": "^8.0.0",
228
242
  "ololog": "^1.1.175",
@@ -231,14 +245,14 @@
231
245
  "piscina": "^3.2.0",
232
246
  "protobufjs": "^7.5.3",
233
247
  "replace-in-file": "^6.3.5",
234
- "rollup-plugin-execute": "1.1.1",
235
248
  "rollup": "^2.70.1",
249
+ "rollup-plugin-execute": "1.1.1",
236
250
  "terser-webpack-plugin": "^5.3.9",
237
251
  "ts-loader": "^9.4.2",
238
252
  "tsx": "^4.7.2",
239
253
  "typescript": "4.7.4",
240
- "webpack-cli": "^5.0.1",
241
- "webpack": "^5.76.2"
254
+ "webpack": "^5.76.2",
255
+ "webpack-cli": "^5.0.1"
242
256
  },
243
257
  "author": {
244
258
  "name": "Igor Kroitor",
@@ -1,18 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var gate = require('./gate.js');
6
-
7
- // ---------------------------------------------------------------------------
8
- // ---------------------------------------------------------------------------
9
- class gateio extends gate["default"] {
10
- describe() {
11
- return this.deepExtend(super.describe(), {
12
- 'id': 'gateio',
13
- 'alias': true,
14
- });
15
- }
16
- }
17
-
18
- exports["default"] = gateio;