ccxt 4.5.56 → 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 (261) hide show
  1. package/README.md +10 -9
  2. package/dist/ccxt.browser.min.js +10 -10
  3. package/dist/cjs/ccxt.js +6 -11
  4. package/dist/cjs/src/apex.js +1 -1
  5. package/dist/cjs/src/arkham.js +3 -3
  6. package/dist/cjs/src/ascendex.js +2 -2
  7. package/dist/cjs/src/aster.js +7 -4
  8. package/dist/cjs/src/backpack.js +4 -4
  9. package/dist/cjs/src/base/Exchange.js +69 -32
  10. package/dist/cjs/src/base/functions/io.js +25 -0
  11. package/dist/cjs/src/base/functions.js +1 -0
  12. package/dist/cjs/src/bigone.js +3 -3
  13. package/dist/cjs/src/binance.js +192 -194
  14. package/dist/cjs/src/bingx.js +3 -3
  15. package/dist/cjs/src/bitfinex.js +71 -58
  16. package/dist/cjs/src/bitget.js +2 -2
  17. package/dist/cjs/src/bitmart.js +13 -6
  18. package/dist/cjs/src/bitmex.js +1 -1
  19. package/dist/cjs/src/bitopro.js +1 -1
  20. package/dist/cjs/src/bitrue.js +2 -2
  21. package/dist/cjs/src/bitso.js +1 -1
  22. package/dist/cjs/src/bitstamp.js +2 -1
  23. package/dist/cjs/src/bitteam.js +1 -1
  24. package/dist/cjs/src/bittrade.js +0 -1
  25. package/dist/cjs/src/bitvavo.js +457 -34
  26. package/dist/cjs/src/blofin.js +26 -3
  27. package/dist/cjs/src/bullish.js +6 -5
  28. package/dist/cjs/src/bydfi.js +1 -1
  29. package/dist/cjs/src/cex.js +3 -3
  30. package/dist/cjs/src/coinbase.js +75 -65
  31. package/dist/cjs/src/coinbaseexchange.js +2 -2
  32. package/dist/cjs/src/coinbaseinternational.js +2 -1
  33. package/dist/cjs/src/coinex.js +74 -74
  34. package/dist/cjs/src/coinmetro.js +1 -1
  35. package/dist/cjs/src/coinsph.js +1 -1
  36. package/dist/cjs/src/cryptocom.js +46 -48
  37. package/dist/cjs/src/cryptomus.js +43 -39
  38. package/dist/cjs/src/deepcoin.js +3 -2
  39. package/dist/cjs/src/delta.js +51 -52
  40. package/dist/cjs/src/deribit.js +31 -33
  41. package/dist/cjs/src/derive.js +26 -28
  42. package/dist/cjs/src/digifinex.js +43 -44
  43. package/dist/cjs/src/exmo.js +92 -83
  44. package/dist/cjs/src/extended.js +3497 -0
  45. package/dist/cjs/src/foxbit.js +71 -75
  46. package/dist/cjs/src/gate.js +53 -53
  47. package/dist/cjs/src/gemini.js +41 -43
  48. package/dist/cjs/src/grvt.js +4 -4
  49. package/dist/cjs/src/hashkey.js +52 -54
  50. package/dist/cjs/src/hitbtc.js +3 -13
  51. package/dist/cjs/src/hollaex.js +51 -54
  52. package/dist/cjs/src/htx.js +75 -67
  53. package/dist/cjs/src/hyperliquid.js +41 -42
  54. package/dist/cjs/src/indodax.js +2 -2
  55. package/dist/cjs/src/kraken.js +57 -58
  56. package/dist/cjs/src/kucoin.js +3 -2
  57. package/dist/cjs/src/latoken.js +30 -32
  58. package/dist/cjs/src/lbank.js +56 -56
  59. package/dist/cjs/src/lighter.js +35 -37
  60. package/dist/cjs/src/luno.js +35 -43
  61. package/dist/cjs/src/mexc.js +48 -49
  62. package/dist/cjs/src/modetrade.js +50 -52
  63. package/dist/cjs/src/ndax.js +35 -37
  64. package/dist/cjs/src/okx.js +17 -2
  65. package/dist/cjs/src/onetrading.js +21 -23
  66. package/dist/cjs/src/phemex.js +43 -45
  67. package/dist/cjs/src/poloniex.js +17 -12
  68. package/dist/cjs/src/pro/alpaca.js +1 -1
  69. package/dist/cjs/src/pro/apex.js +1 -1
  70. package/dist/cjs/src/pro/arkham.js +1 -1
  71. package/dist/cjs/src/pro/backpack.js +1 -1
  72. package/dist/cjs/src/pro/binance.js +3 -3
  73. package/dist/cjs/src/pro/bitget.js +1 -1
  74. package/dist/cjs/src/pro/bithumb.js +1 -1
  75. package/dist/cjs/src/pro/bitstamp.js +1 -1
  76. package/dist/cjs/src/pro/blockchaincom.js +1 -1
  77. package/dist/cjs/src/pro/bybit.js +1 -1
  78. package/dist/cjs/src/pro/cex.js +1 -1
  79. package/dist/cjs/src/pro/coinex.js +1 -1
  80. package/dist/cjs/src/pro/coinone.js +1 -1
  81. package/dist/cjs/src/pro/cryptocom.js +3 -1
  82. package/dist/cjs/src/pro/dydx.js +1 -1
  83. package/dist/cjs/src/pro/exmo.js +1 -1
  84. package/dist/cjs/src/pro/extended.js +865 -0
  85. package/dist/cjs/src/pro/gate.js +1 -1
  86. package/dist/cjs/src/pro/independentreserve.js +1 -1
  87. package/dist/cjs/src/pro/kucoin.js +1 -1
  88. package/dist/cjs/src/pro/luno.js +3 -3
  89. package/dist/cjs/src/pro/onetrading.js +1 -1
  90. package/dist/cjs/src/pro/toobit.js +1 -1
  91. package/dist/cjs/src/pro/weex.js +1 -1
  92. package/dist/cjs/src/static_dependencies/starknet/utils/hash/classHash.js +7 -7
  93. package/dist/cjs/src/tokocrypto.js +1 -1
  94. package/dist/cjs/src/toobit.js +2 -2
  95. package/dist/cjs/src/upbit.js +3 -3
  96. package/dist/cjs/src/weex.js +57 -62
  97. package/dist/cjs/src/whitebit.js +61 -63
  98. package/dist/cjs/src/woo.js +65 -54
  99. package/dist/cjs/src/woofipro.js +53 -47
  100. package/dist/cjs/src/xt.js +1 -1
  101. package/dist/cjs/src/zebpay.js +70 -72
  102. package/js/ccxt.d.ts +8 -14
  103. package/js/ccxt.js +6 -10
  104. package/js/src/abstract/bitvavo.d.ts +15 -7
  105. package/js/src/abstract/extended.d.ts +58 -0
  106. package/js/src/apex.js +1 -1
  107. package/js/src/arkham.js +3 -3
  108. package/js/src/ascendex.js +2 -2
  109. package/js/src/aster.js +7 -4
  110. package/js/src/backpack.js +4 -4
  111. package/js/src/base/Exchange.d.ts +10 -6
  112. package/js/src/base/Exchange.js +69 -32
  113. package/js/src/base/functions/io.d.ts +7 -0
  114. package/js/src/base/functions/io.js +24 -0
  115. package/js/src/bigone.js +3 -3
  116. package/js/src/binance.d.ts +2 -0
  117. package/js/src/binance.js +196 -198
  118. package/js/src/bingx.js +3 -3
  119. package/js/src/bitfinex.d.ts +2 -0
  120. package/js/src/bitfinex.js +71 -58
  121. package/js/src/bitget.js +2 -2
  122. package/js/src/bitmart.js +13 -6
  123. package/js/src/bitmex.js +1 -1
  124. package/js/src/bitopro.js +1 -1
  125. package/js/src/bitrue.js +2 -2
  126. package/js/src/bitso.js +1 -1
  127. package/js/src/bitstamp.js +2 -1
  128. package/js/src/bitteam.js +1 -1
  129. package/js/src/bittrade.js +0 -1
  130. package/js/src/bitvavo.d.ts +114 -21
  131. package/js/src/bitvavo.js +457 -34
  132. package/js/src/blofin.d.ts +1 -0
  133. package/js/src/blofin.js +26 -3
  134. package/js/src/bullish.js +6 -5
  135. package/js/src/bydfi.js +1 -1
  136. package/js/src/cex.js +3 -3
  137. package/js/src/coinbase.d.ts +63 -56
  138. package/js/src/coinbase.js +75 -65
  139. package/js/src/coinbaseexchange.js +2 -2
  140. package/js/src/coinbaseinternational.js +2 -1
  141. package/js/src/coinex.d.ts +1 -0
  142. package/js/src/coinex.js +74 -74
  143. package/js/src/coinmetro.d.ts +1 -1
  144. package/js/src/coinmetro.js +1 -1
  145. package/js/src/coinsph.js +1 -1
  146. package/js/src/cryptocom.d.ts +1 -0
  147. package/js/src/cryptocom.js +46 -48
  148. package/js/src/cryptomus.d.ts +2 -1
  149. package/js/src/cryptomus.js +43 -39
  150. package/js/src/deepcoin.js +3 -2
  151. package/js/src/delta.d.ts +1 -0
  152. package/js/src/delta.js +51 -52
  153. package/js/src/deribit.d.ts +1 -0
  154. package/js/src/deribit.js +31 -33
  155. package/js/src/derive.d.ts +1 -0
  156. package/js/src/derive.js +26 -28
  157. package/js/src/digifinex.d.ts +1 -0
  158. package/js/src/digifinex.js +43 -44
  159. package/js/src/exmo.d.ts +1 -0
  160. package/js/src/exmo.js +92 -83
  161. package/js/src/extended.d.ts +554 -0
  162. package/js/src/extended.js +3490 -0
  163. package/js/src/foxbit.d.ts +1 -0
  164. package/js/src/foxbit.js +71 -75
  165. package/js/src/gate.d.ts +1 -0
  166. package/js/src/gate.js +53 -53
  167. package/js/src/gemini.d.ts +2 -1
  168. package/js/src/gemini.js +41 -43
  169. package/js/src/grvt.js +4 -4
  170. package/js/src/hashkey.d.ts +1 -0
  171. package/js/src/hashkey.js +52 -54
  172. package/js/src/hitbtc.d.ts +0 -1
  173. package/js/src/hitbtc.js +3 -13
  174. package/js/src/hollaex.d.ts +1 -0
  175. package/js/src/hollaex.js +51 -54
  176. package/js/src/htx.d.ts +1 -0
  177. package/js/src/htx.js +75 -67
  178. package/js/src/hyperliquid.d.ts +1 -0
  179. package/js/src/hyperliquid.js +41 -42
  180. package/js/src/indodax.js +2 -2
  181. package/js/src/kraken.d.ts +2 -1
  182. package/js/src/kraken.js +57 -58
  183. package/js/src/kucoin.js +3 -2
  184. package/js/src/latoken.d.ts +1 -0
  185. package/js/src/latoken.js +30 -32
  186. package/js/src/lbank.d.ts +1 -0
  187. package/js/src/lbank.js +56 -56
  188. package/js/src/lighter.d.ts +1 -0
  189. package/js/src/lighter.js +35 -37
  190. package/js/src/luno.d.ts +1 -0
  191. package/js/src/luno.js +35 -43
  192. package/js/src/mexc.d.ts +2 -1
  193. package/js/src/mexc.js +48 -49
  194. package/js/src/modetrade.d.ts +1 -0
  195. package/js/src/modetrade.js +50 -52
  196. package/js/src/ndax.d.ts +1 -0
  197. package/js/src/ndax.js +35 -37
  198. package/js/src/okx.js +17 -2
  199. package/js/src/onetrading.d.ts +2 -1
  200. package/js/src/onetrading.js +21 -23
  201. package/js/src/phemex.d.ts +1 -0
  202. package/js/src/phemex.js +43 -45
  203. package/js/src/poloniex.js +17 -12
  204. package/js/src/pro/alpaca.js +1 -1
  205. package/js/src/pro/apex.js +1 -1
  206. package/js/src/pro/arkham.js +1 -1
  207. package/js/src/pro/backpack.js +1 -1
  208. package/js/src/pro/binance.js +3 -3
  209. package/js/src/pro/bitget.js +1 -1
  210. package/js/src/pro/bithumb.js +1 -1
  211. package/js/src/pro/bitstamp.js +1 -1
  212. package/js/src/pro/blockchaincom.js +1 -1
  213. package/js/src/pro/bybit.js +1 -1
  214. package/js/src/pro/cex.js +1 -1
  215. package/js/src/pro/coinex.js +1 -1
  216. package/js/src/pro/coinone.js +1 -1
  217. package/js/src/pro/cryptocom.js +3 -1
  218. package/js/src/pro/dydx.js +1 -1
  219. package/js/src/pro/exmo.js +1 -1
  220. package/js/src/pro/extended.d.ts +126 -0
  221. package/js/src/pro/extended.js +858 -0
  222. package/js/src/pro/gate.js +1 -1
  223. package/js/src/pro/independentreserve.js +1 -1
  224. package/js/src/pro/kucoin.js +1 -1
  225. package/js/src/pro/luno.d.ts +1 -1
  226. package/js/src/pro/luno.js +3 -3
  227. package/js/src/pro/onetrading.js +1 -1
  228. package/js/src/pro/toobit.js +1 -1
  229. package/js/src/pro/weex.js +1 -1
  230. package/js/src/tokocrypto.js +1 -1
  231. package/js/src/toobit.js +2 -2
  232. package/js/src/upbit.js +3 -3
  233. package/js/src/weex.d.ts +1 -0
  234. package/js/src/weex.js +57 -62
  235. package/js/src/whitebit.d.ts +1 -0
  236. package/js/src/whitebit.js +61 -63
  237. package/js/src/woo.d.ts +1 -0
  238. package/js/src/woo.js +65 -54
  239. package/js/src/woofipro.d.ts +1 -0
  240. package/js/src/woofipro.js +53 -47
  241. package/js/src/xt.js +1 -1
  242. package/js/src/zebpay.d.ts +2 -1
  243. package/js/src/zebpay.js +70 -72
  244. package/package.json +7 -7
  245. package/dist/cjs/src/gateio.js +0 -18
  246. package/dist/cjs/src/oxfun.js +0 -2933
  247. package/dist/cjs/src/pro/gateio.js +0 -18
  248. package/dist/cjs/src/pro/oxfun.js +0 -1113
  249. package/js/src/abstract/gateio.d.ts +0 -346
  250. package/js/src/abstract/gateio.js +0 -5
  251. package/js/src/abstract/oxfun.d.ts +0 -37
  252. package/js/src/gateio.d.ts +0 -4
  253. package/js/src/gateio.js +0 -11
  254. package/js/src/oxfun.d.ts +0 -442
  255. package/js/src/oxfun.js +0 -2926
  256. package/js/src/pro/gateio.d.ts +0 -4
  257. package/js/src/pro/gateio.js +0 -11
  258. package/js/src/pro/oxfun.d.ts +0 -234
  259. package/js/src/pro/oxfun.js +0 -1106
  260. /package/dist/cjs/src/abstract/{oxfun.js → extended.js} +0 -0
  261. /package/js/src/abstract/{oxfun.js → extended.js} +0 -0
package/js/src/bitmart.js CHANGED
@@ -1256,7 +1256,7 @@ export default class bitmart extends Exchange {
1256
1256
  'type': isNtf ? 'other' : 'crypto',
1257
1257
  };
1258
1258
  }
1259
- const networkCode = this.networkIdToCode(networkId);
1259
+ const networkCode = this.networkIdToCode(networkId, currencyCode);
1260
1260
  const withdraw = this.safeBool(currency, 'withdraw_enabled');
1261
1261
  const deposit = this.safeBool(currency, 'deposit_enabled');
1262
1262
  entry['networks'][networkCode] = {
@@ -2974,8 +2974,10 @@ export default class bitmart extends Exchange {
2974
2974
  }
2975
2975
  const request = {
2976
2976
  'symbol': market['id'],
2977
- 'size': parseInt(this.amountToPrecision(symbol, amount)),
2978
2977
  };
2978
+ if (amount !== undefined) {
2979
+ request['size'] = parseInt(this.amountToPrecision(symbol, amount));
2980
+ }
2979
2981
  const timeInForce = this.safeString(params, 'timeInForce');
2980
2982
  const mode = this.safeInteger(params, 'mode'); // only for swap
2981
2983
  const isMarketOrder = type === 'market';
@@ -3039,7 +3041,11 @@ export default class bitmart extends Exchange {
3039
3041
  if (isStopLoss || isTakeProfit) {
3040
3042
  reduceOnly = true;
3041
3043
  request['price_type'] = this.safeInteger(params, 'price_type', 1);
3042
- request['executive_price'] = this.priceToPrecision(symbol, price);
3044
+ if (price !== undefined) {
3045
+ request['executive_price'] = this.priceToPrecision(symbol, price);
3046
+ }
3047
+ const marketOrLimitStr = isLimitOrder ? 'limit' : 'market';
3048
+ request['category'] = this.safeString(params, 'category', marketOrLimitStr);
3043
3049
  if (isStopLoss) {
3044
3050
  request['trigger_price'] = this.priceToPrecision(symbol, stopLossPrice);
3045
3051
  }
@@ -3921,11 +3927,12 @@ export default class bitmart extends Exchange {
3921
3927
  }
3922
3928
  const address = this.safeString(depositAddress, 'address');
3923
3929
  currency = this.safeCurrency(currencyId, currency);
3930
+ const code = this.safeString(currency, 'code');
3924
3931
  this.checkAddress(address);
3925
3932
  return {
3926
3933
  'info': depositAddress,
3927
- 'currency': this.safeString(currency, 'code'),
3928
- 'network': this.networkIdToCode(network),
3934
+ 'currency': code,
3935
+ 'network': this.networkIdToCode(network, code),
3929
3936
  'address': address,
3930
3937
  'tag': this.safeString2(depositAddress, 'address_memo', 'memo'),
3931
3938
  };
@@ -4217,7 +4224,7 @@ export default class bitmart extends Exchange {
4217
4224
  'id': id,
4218
4225
  'currency': code,
4219
4226
  'amount': amount,
4220
- 'network': this.networkIdToCode(networkId),
4227
+ 'network': this.networkIdToCode(networkId, code),
4221
4228
  'address': address,
4222
4229
  'addressFrom': undefined,
4223
4230
  'addressTo': undefined,
package/js/src/bitmex.js CHANGED
@@ -477,7 +477,7 @@ export default class bitmex extends Exchange {
477
477
  for (let j = 0; j < chains.length; j++) {
478
478
  const chain = chains[j];
479
479
  const networkId = this.safeString(chain, 'asset');
480
- const network = this.networkIdToCode(networkId);
480
+ const network = this.networkIdToCode(networkId, code);
481
481
  const withdrawalFeeRaw = this.safeString(chain, 'withdrawalFee');
482
482
  const withdrawalFee = this.parseNumber(Precise.stringMul(withdrawalFeeRaw, precisionString));
483
483
  const isDepositEnabled = this.safeBool(chain, 'depositEnabled', false);
package/js/src/bitopro.js CHANGED
@@ -1552,7 +1552,7 @@ export default class bitopro extends Exchange {
1552
1552
  'txid': this.safeString(transaction, 'txid'),
1553
1553
  'type': undefined,
1554
1554
  'currency': code,
1555
- 'network': this.networkIdToCode(networkId),
1555
+ 'network': this.networkIdToCode(networkId, code),
1556
1556
  'amount': this.safeNumber(transaction, 'total'),
1557
1557
  'status': this.parseTransactionStatus(status),
1558
1558
  'timestamp': timestamp,
package/js/src/bitrue.js CHANGED
@@ -442,7 +442,6 @@ export default class bitrue extends Exchange {
442
442
  'XML': 'Stellar Lumens',
443
443
  'XYM': 'Symbol',
444
444
  'XTZ': 'Tezos',
445
- 'theta': 'theta',
446
445
  'THETA': 'THETA',
447
446
  'VECHAIN': 'VeChain',
448
447
  'WANCHAIN': 'Wanchain',
@@ -593,6 +592,7 @@ export default class bitrue extends Exchange {
593
592
  "You don't have permission.": PermissionDenied,
594
593
  'Market is closed.': ExchangeNotAvailable,
595
594
  'Too many requests. Please try again later.': DDoSProtection,
595
+ 'quantity less then minQty': InvalidOrder,
596
596
  '-1000': ExchangeNotAvailable,
597
597
  '-1001': ExchangeNotAvailable,
598
598
  '-1002': AuthenticationError,
@@ -2902,7 +2902,7 @@ export default class bitrue extends Exchange {
2902
2902
  let networkCode = undefined;
2903
2903
  [networkCode, params] = this.handleNetworkCodeAndParams(params);
2904
2904
  if (networkCode !== undefined) {
2905
- request['chainName'] = this.networkCodeToId(networkCode);
2905
+ request['chainName'] = this.networkCodeToId(networkCode, currency['code']);
2906
2906
  }
2907
2907
  if (tag !== undefined) {
2908
2908
  request['tag'] = tag;
package/js/src/bitso.js CHANGED
@@ -1779,7 +1779,7 @@ export default class bitso extends Exchange {
1779
1779
  const networkId = this.safeString2(transaction, 'network', 'method');
1780
1780
  const status = this.safeString(transaction, 'status');
1781
1781
  const withdrawId = this.safeString(transaction, 'wid');
1782
- const networkCode = this.networkIdToCode(networkId);
1782
+ const networkCode = this.networkIdToCode(networkId, currency['code']);
1783
1783
  const networkCodeUpper = (networkCode !== undefined) ? networkCode.toUpperCase() : undefined;
1784
1784
  return {
1785
1785
  'id': this.safeString2(transaction, 'wid', 'fid'),
@@ -1531,10 +1531,11 @@ export default class bitstamp extends Exchange {
1531
1531
  }
1532
1532
  parseDepositWithdrawFee(fee, currency = undefined) {
1533
1533
  const result = this.depositWithdrawFee(fee);
1534
+ const code = this.safeString(currency, 'code');
1534
1535
  for (let j = 0; j < fee.length; j++) {
1535
1536
  const networkEntry = fee[j];
1536
1537
  const networkId = this.safeString(networkEntry, 'network');
1537
- const networkCode = this.networkIdToCode(networkId);
1538
+ const networkCode = this.networkIdToCode(networkId, code);
1538
1539
  const withdrawFee = this.safeNumber(networkEntry, 'fee');
1539
1540
  result['withdraw'] = {
1540
1541
  'fee': withdrawFee,
package/js/src/bitteam.js CHANGED
@@ -2330,7 +2330,7 @@ export default class bitteam extends Exchange {
2330
2330
  'txid': txid,
2331
2331
  'timestamp': timestamp,
2332
2332
  'datetime': this.iso8601(timestamp),
2333
- 'network': this.networkIdToCode(networkId),
2333
+ 'network': this.networkIdToCode(networkId, code),
2334
2334
  'addressFrom': addressFrom,
2335
2335
  'address': undefined,
2336
2336
  'addressTo': addressTo,
@@ -373,7 +373,6 @@ export default class bittrade extends Exchange {
373
373
  'HECO': 'hrc20',
374
374
  'HT': 'hrc20',
375
375
  'ALGO': 'algo',
376
- 'OMNI': '',
377
376
  },
378
377
  // https://github.com/ccxt/ccxt/issues/5376
379
378
  'fetchOrdersByStatesMethod': 'private_get_order_orders',
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitvavo.js';
2
- import type { Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFees, Transaction, int, DepositAddress } from './base/types.js';
2
+ import type { Account, Balances, Currencies, Currency, Dict, Int, LedgerEntry, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry, int, DepositAddress } from './base/types.js';
3
3
  /**
4
4
  * @class bitvavo
5
5
  * @augments Exchange
@@ -9,6 +9,7 @@ export default class bitvavo extends Exchange {
9
9
  /**
10
10
  * @method
11
11
  * @name bitvavo#fetchTime
12
+ * @see https://docs.bitvavo.com/docs/rest-api/get-server-time/
12
13
  * @description fetches the current integer timestamp in milliseconds from the exchange server
13
14
  * @param {object} [params] extra parameters specific to the exchange API endpoint
14
15
  * @returns {int} the current integer timestamp in milliseconds from the exchange server
@@ -17,7 +18,7 @@ export default class bitvavo extends Exchange {
17
18
  /**
18
19
  * @method
19
20
  * @name bitvavo#fetchMarkets
20
- * @see https://docs.bitvavo.com/#tag/General/paths/~1markets/get
21
+ * @see https://docs.bitvavo.com/docs/rest-api/get-markets/
21
22
  * @description retrieves data on all markets for bitvavo
22
23
  * @param {object} [params] extra parameters specific to the exchange API endpoint
23
24
  * @returns {object[]} an array of objects representing market data
@@ -27,7 +28,7 @@ export default class bitvavo extends Exchange {
27
28
  /**
28
29
  * @method
29
30
  * @name bitvavo#fetchCurrencies
30
- * @see https://docs.bitvavo.com/#tag/General/paths/~1assets/get
31
+ * @see https://docs.bitvavo.com/docs/rest-api/get-asset-data/
31
32
  * @description fetches all available currencies on an exchange
32
33
  * @param {object} [params] extra parameters specific to the exchange API endpoint
33
34
  * @returns {object} an associative dictionary of currencies
@@ -37,7 +38,7 @@ export default class bitvavo extends Exchange {
37
38
  /**
38
39
  * @method
39
40
  * @name bitvavo#fetchTicker
40
- * @see https://docs.bitvavo.com/#tag/Market-Data/paths/~1ticker~124h/get
41
+ * @see https://docs.bitvavo.com/docs/rest-api/get-candlestick-data-24-h/
41
42
  * @description fetches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
42
43
  * @param {string} symbol unified symbol of the market to fetch the ticker for
43
44
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -48,6 +49,7 @@ export default class bitvavo extends Exchange {
48
49
  /**
49
50
  * @method
50
51
  * @name bitvavo#fetchTickers
52
+ * @see https://docs.bitvavo.com/docs/rest-api/get-candlestick-data-24-h/
51
53
  * @description fetches price tickers for multiple markets, statistical information calculated over the past 24 hours for each market
52
54
  * @param {string[]|undefined} symbols unified symbols of the markets to fetch the ticker for, all market tickers are returned if not assigned
53
55
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -57,7 +59,7 @@ export default class bitvavo extends Exchange {
57
59
  /**
58
60
  * @method
59
61
  * @name bitvavo#fetchTrades
60
- * @see https://docs.bitvavo.com/#tag/Market-Data/paths/~1{market}~1trades/get
62
+ * @see https://docs.bitvavo.com/docs/rest-api/get-trades/
61
63
  * @description get the list of most recent trades for a particular symbol
62
64
  * @param {string} symbol unified symbol of the market to fetch trades for
63
65
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
@@ -72,17 +74,28 @@ export default class bitvavo extends Exchange {
72
74
  /**
73
75
  * @method
74
76
  * @name bitvavo#fetchTradingFees
75
- * @see https://docs.bitvavo.com/#tag/Account/paths/~1account/get
77
+ * @see https://docs.bitvavo.com/docs/rest-api/get-account-fees/
76
78
  * @description fetch the trading fees for multiple markets
77
79
  * @param {object} [params] extra parameters specific to the exchange API endpoint
78
80
  * @returns {object} a dictionary of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure} indexed by market symbols
79
81
  */
80
82
  fetchTradingFees(params?: {}): Promise<TradingFees>;
81
83
  parseTradingFees(fees: any, market?: any): Dict;
84
+ /**
85
+ * @method
86
+ * @name bitvavo#fetchTradingFee
87
+ * @see https://docs.bitvavo.com/docs/rest-api/get-market-fees/
88
+ * @description fetch the trading fees for a market
89
+ * @param {string} symbol unified market symbol
90
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
91
+ * @returns {object} a [fee structure]{@link https://docs.ccxt.com/?id=fee-structure}
92
+ */
93
+ fetchTradingFee(symbol: string, params?: {}): Promise<TradingFeeInterface>;
94
+ parseTradingFee(fee: Dict, market?: Market): TradingFeeInterface;
82
95
  /**
83
96
  * @method
84
97
  * @name bitvavo#fetchOrderBook
85
- * @see https://docs.bitvavo.com/#tag/Market-Data/paths/~1{market}~1book/get
98
+ * @see https://docs.bitvavo.com/docs/rest-api/get-order-book/
86
99
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
87
100
  * @param {string} symbol unified symbol of the market to fetch the order book for
88
101
  * @param {int} [limit] the maximum amount of order book entries to return
@@ -95,7 +108,7 @@ export default class bitvavo extends Exchange {
95
108
  /**
96
109
  * @method
97
110
  * @name bitvavo#fetchOHLCV
98
- * @see https://docs.bitvavo.com/#tag/Market-Data/paths/~1{market}~1candles/get
111
+ * @see https://docs.bitvavo.com/docs/rest-api/get-candlestick-data/
99
112
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
100
113
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
101
114
  * @param {string} timeframe the length of time each candle represents
@@ -111,15 +124,68 @@ export default class bitvavo extends Exchange {
111
124
  /**
112
125
  * @method
113
126
  * @name bitvavo#fetchBalance
114
- * @see https://docs.bitvavo.com/#tag/Account/paths/~1balance/get
127
+ * @see https://docs.bitvavo.com/docs/rest-api/get-account-balance/
115
128
  * @description query for balance and get the amount of funds available for trading or funds locked in orders
116
129
  * @param {object} [params] extra parameters specific to the exchange API endpoint
117
130
  * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
118
131
  */
119
132
  fetchBalance(params?: {}): Promise<Balances>;
133
+ /**
134
+ * @method
135
+ * @name bitvavo#fetchAccounts
136
+ * @see https://docs.bitvavo.com/docs/institutional-api/get-subaccounts/
137
+ * @description fetch all the accounts associated with a profile
138
+ * @param {object} [params] extra parameters specific to the bitvavo api endpoint
139
+ * @returns {object[]} a list of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure}
140
+ */
141
+ fetchAccounts(params?: {}): Promise<Account[]>;
142
+ parseAccount(account: Dict): Account;
143
+ /**
144
+ * @method
145
+ * @name bitvavo#transfer
146
+ * @see https://docs.bitvavo.com/docs/institutional-api/create-transfer/
147
+ * @description transfer currency internally between the master account and a subaccount
148
+ * @param {string} code unified currency code
149
+ * @param {float} amount amount to transfer
150
+ * @param {string} fromAccount account to transfer from, either 'master' or the subaccount id
151
+ * @param {string} toAccount account to transfer to, either 'master' or the subaccount id
152
+ * @param {object} [params] extra parameters specific to the bitvavo api endpoint
153
+ * @param {string} [params.subaccountId] the unique identifier for the subaccount
154
+ * @param {string} [params.clientRequestId] client defined unique id
155
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
156
+ */
157
+ transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
158
+ /**
159
+ * @method
160
+ * @name bitvavo#fetchTransfers
161
+ * @see https://docs.bitvavo.com/docs/institutional-api/get-transfers/
162
+ * @description fetch a history of internal transfers made on an account
163
+ * @param {string} [code] unified currency code of the currency transferred
164
+ * @param {int} [since] the earliest time in ms to fetch transfers for
165
+ * @param {int} [limit] the maximum number of transfers structures to retrieve
166
+ * @param {object} [params] extra parameters specific to the bitvavo api endpoint
167
+ * @param {string} [params.subaccountId] the unique identifier for the subaccount
168
+ * @param {int} [params.until] the latest time in ms to fetch transfers for
169
+ * @returns {object[]} a list of [transfer structures]{@link https://docs.ccxt.com/#/?id=transfer-structure}
170
+ */
171
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntry[]>;
172
+ /**
173
+ * @method
174
+ * @name bitvavo#fetchTransfer
175
+ * @see https://docs.bitvavo.com/docs/institutional-api/get-transfer/
176
+ * @description fetches a transfer
177
+ * @param {string} id transfer id
178
+ * @param {string} [code] unified currency code of the currency transferred
179
+ * @param {object} [params] extra parameters specific to the bitvavo api endpoint
180
+ * @returns {object} a [transfer structure]{@link https://docs.ccxt.com/#/?id=transfer-structure}
181
+ */
182
+ fetchTransfer(id: string, code?: Str, params?: {}): Promise<TransferEntry>;
183
+ parseTransferStatus(status: Str): Str;
184
+ parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
120
185
  /**
121
186
  * @method
122
187
  * @name bitvavo#fetchDepositAddress
188
+ * @see https://docs.bitvavo.com/docs/rest-api/get-deposit-data/
123
189
  * @description fetch the deposit address for a currency associated with this account
124
190
  * @param {string} code unified currency code
125
191
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -131,7 +197,7 @@ export default class bitvavo extends Exchange {
131
197
  * @method
132
198
  * @name bitvavo#createOrder
133
199
  * @description create a trade order
134
- * @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1order/post
200
+ * @see https://docs.bitvavo.com/docs/rest-api/create-order/
135
201
  * @param {string} symbol unified symbol of the market to create an order in
136
202
  * @param {string} type 'market' or 'limit'
137
203
  * @param {string} side 'buy' or 'sell'
@@ -157,7 +223,7 @@ export default class bitvavo extends Exchange {
157
223
  * @method
158
224
  * @name bitvavo#editOrder
159
225
  * @description edit a trade order
160
- * @see https://docs.bitvavo.com/#tag/Orders/paths/~1order/put
226
+ * @see https://docs.bitvavo.com/docs/rest-api/update-order/
161
227
  * @param {string} id cancel order id
162
228
  * @param {string} symbol unified symbol of the market to create an order in
163
229
  * @param {string} type 'market' or 'limit'
@@ -172,9 +238,8 @@ export default class bitvavo extends Exchange {
172
238
  /**
173
239
  * @method
174
240
  * @name bitvavo#cancelOrder
175
- * @see https://docs.bitvavo.com/#tag/Orders/paths/~1order/delete
176
241
  * @description cancels an open order
177
- * @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1order/delete
242
+ * @see https://docs.bitvavo.com/docs/rest-api/cancel-order/
178
243
  * @param {string} id order id
179
244
  * @param {string} symbol unified symbol of the market the order was made in
180
245
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -184,18 +249,29 @@ export default class bitvavo extends Exchange {
184
249
  /**
185
250
  * @method
186
251
  * @name bitvavo#cancelAllOrders
187
- * @see https://docs.bitvavo.com/#tag/Orders/paths/~1orders/delete
252
+ * @see https://docs.bitvavo.com/docs/rest-api/cancel-orders/
188
253
  * @description cancel all open orders
189
254
  * @param {string} symbol unified market symbol, only orders in the market of this symbol are cancelled when symbol is not undefined
190
255
  * @param {object} [params] extra parameters specific to the exchange API endpoint
191
256
  * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
192
257
  */
193
258
  cancelAllOrders(symbol?: Str, params?: {}): Promise<Order[]>;
259
+ /**
260
+ * @method
261
+ * @name bitvavo#cancelAllOrdersAfter
262
+ * @description dead man's switch, cancel all orders after the given timeout
263
+ * @see https://docs.bitvavo.com/docs/rest-api/cancel-orders-after/
264
+ * @param {number} timeout time in milliseconds, 0 represents cancel the timer
265
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
266
+ * @param {int} [params.codGroupId] your identifier for a group of orders, default is 1
267
+ * @returns {object} the api result
268
+ */
269
+ cancelAllOrdersAfter(timeout: Int, params?: {}): Promise<any>;
194
270
  /**
195
271
  * @method
196
272
  * @name bitvavo#fetchOrder
197
273
  * @description fetches information on an order made by the user
198
- * @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1order/get
274
+ * @see https://docs.bitvavo.com/docs/rest-api/get-order/
199
275
  * @param {string} id the order id
200
276
  * @param {string} symbol unified symbol of the market the order was made in
201
277
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -206,7 +282,7 @@ export default class bitvavo extends Exchange {
206
282
  /**
207
283
  * @method
208
284
  * @name bitvavo#fetchOrders
209
- * @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1orders/get
285
+ * @see https://docs.bitvavo.com/docs/rest-api/get-orders/
210
286
  * @description fetches information on multiple orders made by the user
211
287
  * @param {string} symbol unified market symbol of the market orders were made in
212
288
  * @param {int} [since] the earliest time in ms to fetch orders for
@@ -220,7 +296,7 @@ export default class bitvavo extends Exchange {
220
296
  /**
221
297
  * @method
222
298
  * @name bitvavo#fetchOpenOrders
223
- * @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1ordersOpen/get
299
+ * @see https://docs.bitvavo.com/docs/rest-api/get-open-orders/
224
300
  * @description fetch all unfilled currently open orders
225
301
  * @param {string} symbol unified market symbol
226
302
  * @param {int} [since] the earliest time in ms to fetch open orders for
@@ -235,7 +311,7 @@ export default class bitvavo extends Exchange {
235
311
  /**
236
312
  * @method
237
313
  * @name bitvavo#fetchMyTrades
238
- * @see https://docs.bitvavo.com/#tag/Trading-endpoints/paths/~1trades/get
314
+ * @see https://docs.bitvavo.com/docs/rest-api/get-trade-history/
239
315
  * @description fetch all trades made by the user
240
316
  * @param {string} symbol unified market symbol
241
317
  * @param {int} [since] the earliest time in ms to fetch trades for
@@ -246,10 +322,27 @@ export default class bitvavo extends Exchange {
246
322
  * @returns {Trade[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
247
323
  */
248
324
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
325
+ /**
326
+ * @method
327
+ * @name bitvavo#fetchLedger
328
+ * @see https://docs.bitvavo.com/docs/rest-api/get-transaction-history/
329
+ * @description fetch the history of changes, actions done by the user or operations that altered the balance of the user
330
+ * @param {string} [code] unified currency code
331
+ * @param {int} [since] timestamp in ms of the earliest ledger entry
332
+ * @param {int} [limit] max number of ledger entries to return
333
+ * @param {object} [params] extra parameters specific to the bitvavo api endpoint
334
+ * @param {int} [params.until] timestamp in ms of the latest ledger entry
335
+ * @param {int} [params.page] the page number for the transaction history
336
+ * @returns {object[]} a list of [ledger structures]{@link https://docs.ccxt.com/?id=ledger}
337
+ */
338
+ fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<LedgerEntry[]>;
339
+ parseLedgerEntryType(type: Str): string;
340
+ parseLedgerEntry(item: Dict, currency?: Currency): LedgerEntry;
249
341
  withdrawRequest(code: Str, amount: any, address: any, tag?: any, params?: {}): any;
250
342
  /**
251
343
  * @method
252
344
  * @name bitvavo#withdraw
345
+ * @see https://docs.bitvavo.com/docs/rest-api/withdraw-assets/
253
346
  * @description make a withdrawal
254
347
  * @param {string} code unified currency code
255
348
  * @param {float} amount the amount to withdraw
@@ -263,7 +356,7 @@ export default class bitvavo extends Exchange {
263
356
  /**
264
357
  * @method
265
358
  * @name bitvavo#fetchWithdrawals
266
- * @see https://docs.bitvavo.com/#tag/Account/paths/~1withdrawalHistory/get
359
+ * @see https://docs.bitvavo.com/docs/rest-api/get-withdrawal-history/
267
360
  * @description fetch all withdrawals made from an account
268
361
  * @param {string} code unified currency code
269
362
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
@@ -276,7 +369,7 @@ export default class bitvavo extends Exchange {
276
369
  /**
277
370
  * @method
278
371
  * @name bitvavo#fetchDeposits
279
- * @see https://docs.bitvavo.com/#tag/Account/paths/~1depositHistory/get
372
+ * @see https://docs.bitvavo.com/docs/rest-api/get-deposit-history/
280
373
  * @description fetch all deposits made to an account
281
374
  * @param {string} code unified currency code
282
375
  * @param {int} [since] the earliest time in ms to fetch deposits for
@@ -292,7 +385,7 @@ export default class bitvavo extends Exchange {
292
385
  * @method
293
386
  * @name bitvavo#fetchDepositWithdrawFees
294
387
  * @description fetch deposit and withdraw fees
295
- * @see https://docs.bitvavo.com/#tag/General/paths/~1assets/get
388
+ * @see https://docs.bitvavo.com/docs/rest-api/get-asset-data/
296
389
  * @param {string[]|undefined} codes list of unified currency codes
297
390
  * @param {object} [params] extra parameters specific to the exchange API endpoint
298
391
  * @returns {object} a list of [fee structures]{@link https://docs.ccxt.com/?id=fee-structure}