ccxt 4.1.45 → 4.1.47

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 (130) hide show
  1. package/README.md +3 -3
  2. package/dist/ccxt.browser.js +1692 -194
  3. package/dist/ccxt.browser.min.js +2 -2
  4. package/dist/cjs/ccxt.js +1 -1
  5. package/dist/cjs/src/base/Exchange.js +14 -3
  6. package/dist/cjs/src/base/ws/Cache.js +50 -0
  7. package/dist/cjs/src/binance.js +4 -0
  8. package/dist/cjs/src/bitmart.js +2 -2
  9. package/dist/cjs/src/bitvavo.js +6 -5
  10. package/dist/cjs/src/bybit.js +84 -132
  11. package/dist/cjs/src/cryptocom.js +1 -1
  12. package/dist/cjs/src/gate.js +3 -1
  13. package/dist/cjs/src/hitbtc.js +79 -1
  14. package/dist/cjs/src/huobi.js +1 -2
  15. package/dist/cjs/src/krakenfutures.js +13 -3
  16. package/dist/cjs/src/okx.js +19 -2
  17. package/dist/cjs/src/pro/binance.js +203 -1
  18. package/dist/cjs/src/pro/bitget.js +181 -0
  19. package/dist/cjs/src/pro/bybit.js +154 -10
  20. package/dist/cjs/src/pro/cryptocom.js +131 -1
  21. package/dist/cjs/src/pro/gate.js +161 -0
  22. package/dist/cjs/src/pro/huobi.js +128 -4
  23. package/dist/cjs/src/pro/krakenfutures.js +129 -0
  24. package/dist/cjs/src/pro/kucoinfutures.js +182 -0
  25. package/dist/cjs/src/pro/okx.js +121 -0
  26. package/js/ccxt.d.ts +3 -3
  27. package/js/ccxt.js +1 -1
  28. package/js/src/abstract/binance.d.ts +4 -0
  29. package/js/src/abstract/binancecoinm.d.ts +4 -0
  30. package/js/src/abstract/binanceus.d.ts +4 -0
  31. package/js/src/abstract/binanceusdm.d.ts +4 -0
  32. package/js/src/ascendex.d.ts +3 -3
  33. package/js/src/base/Exchange.d.ts +6 -2
  34. package/js/src/base/Exchange.js +14 -3
  35. package/js/src/base/types.d.ts +5 -0
  36. package/js/src/base/ws/Cache.d.ts +5 -1
  37. package/js/src/base/ws/Cache.js +50 -1
  38. package/js/src/bigone.d.ts +2 -2
  39. package/js/src/binance.d.ts +2 -2
  40. package/js/src/binance.js +4 -0
  41. package/js/src/bingx.d.ts +2 -2
  42. package/js/src/bitbns.d.ts +2 -2
  43. package/js/src/bitfinex.d.ts +3 -3
  44. package/js/src/bitfinex2.d.ts +3 -3
  45. package/js/src/bitflyer.d.ts +2 -2
  46. package/js/src/bitget.d.ts +2 -2
  47. package/js/src/bitmart.d.ts +2 -2
  48. package/js/src/bitmart.js +2 -2
  49. package/js/src/bitmex.d.ts +1 -1
  50. package/js/src/bitopro.d.ts +2 -2
  51. package/js/src/bitpanda.d.ts +2 -2
  52. package/js/src/bitrue.d.ts +2 -2
  53. package/js/src/bitso.d.ts +1 -1
  54. package/js/src/bitstamp.d.ts +2 -2
  55. package/js/src/bittrex.d.ts +4 -4
  56. package/js/src/bitvavo.d.ts +2 -2
  57. package/js/src/bitvavo.js +6 -5
  58. package/js/src/blockchaincom.d.ts +4 -4
  59. package/js/src/btcalpha.d.ts +2 -2
  60. package/js/src/btcmarkets.d.ts +3 -3
  61. package/js/src/bybit.d.ts +2 -4
  62. package/js/src/bybit.js +84 -132
  63. package/js/src/coinbase.d.ts +5 -5
  64. package/js/src/coinbasepro.d.ts +3 -3
  65. package/js/src/coincheck.d.ts +2 -2
  66. package/js/src/coinex.d.ts +8 -8
  67. package/js/src/coinfalcon.d.ts +2 -2
  68. package/js/src/coinlist.d.ts +1 -1
  69. package/js/src/coinmate.d.ts +1 -1
  70. package/js/src/coinsph.d.ts +2 -2
  71. package/js/src/cryptocom.d.ts +2 -2
  72. package/js/src/cryptocom.js +1 -1
  73. package/js/src/currencycom.d.ts +6 -6
  74. package/js/src/deribit.d.ts +2 -2
  75. package/js/src/digifinex.d.ts +2 -2
  76. package/js/src/exmo.d.ts +3 -3
  77. package/js/src/gate.d.ts +2 -2
  78. package/js/src/gate.js +3 -1
  79. package/js/src/gemini.d.ts +1 -1
  80. package/js/src/hitbtc.d.ts +5 -4
  81. package/js/src/hitbtc.js +79 -1
  82. package/js/src/hollaex.d.ts +2 -2
  83. package/js/src/huobi.d.ts +2 -2
  84. package/js/src/huobi.js +1 -2
  85. package/js/src/huobijp.d.ts +2 -2
  86. package/js/src/idex.d.ts +2 -2
  87. package/js/src/indodax.d.ts +1 -1
  88. package/js/src/kraken.d.ts +2 -2
  89. package/js/src/krakenfutures.js +14 -4
  90. package/js/src/kucoin.d.ts +2 -2
  91. package/js/src/kucoinfutures.d.ts +3 -3
  92. package/js/src/kuna.d.ts +2 -2
  93. package/js/src/latoken.d.ts +2 -2
  94. package/js/src/lbank2.d.ts +2 -2
  95. package/js/src/lykke.d.ts +1 -1
  96. package/js/src/mexc.d.ts +2 -2
  97. package/js/src/ndax.d.ts +2 -2
  98. package/js/src/novadax.d.ts +3 -3
  99. package/js/src/okcoin.d.ts +8 -8
  100. package/js/src/okx.d.ts +7 -7
  101. package/js/src/okx.js +19 -2
  102. package/js/src/phemex.d.ts +6 -6
  103. package/js/src/poloniex.d.ts +3 -3
  104. package/js/src/pro/binance.d.ts +6 -0
  105. package/js/src/pro/binance.js +204 -2
  106. package/js/src/pro/bitget.d.ts +3 -0
  107. package/js/src/pro/bitget.js +182 -1
  108. package/js/src/pro/bybit.d.ts +5 -1
  109. package/js/src/pro/bybit.js +156 -12
  110. package/js/src/pro/cryptocom.d.ts +4 -0
  111. package/js/src/pro/cryptocom.js +132 -2
  112. package/js/src/pro/gate.d.ts +5 -0
  113. package/js/src/pro/gate.js +162 -1
  114. package/js/src/pro/huobi.d.ts +2 -0
  115. package/js/src/pro/huobi.js +129 -5
  116. package/js/src/pro/krakenfutures.d.ts +3 -0
  117. package/js/src/pro/krakenfutures.js +129 -0
  118. package/js/src/pro/kucoinfutures.d.ts +5 -0
  119. package/js/src/pro/kucoinfutures.js +182 -0
  120. package/js/src/pro/okx.d.ts +2 -0
  121. package/js/src/pro/okx.js +123 -2
  122. package/js/src/probit.d.ts +2 -2
  123. package/js/src/timex.d.ts +2 -2
  124. package/js/src/tokocrypto.d.ts +5 -5
  125. package/js/src/upbit.d.ts +2 -2
  126. package/js/src/wavesexchange.d.ts +2 -2
  127. package/js/src/whitebit.d.ts +1 -1
  128. package/js/src/woo.d.ts +3 -3
  129. package/package.json +1 -1
  130. package/skip-tests.json +8 -1
package/js/ccxt.d.ts CHANGED
@@ -2,9 +2,9 @@ import { Exchange } from './src/base/Exchange.js';
2
2
  import { Precise } from './src/base/Precise.js';
3
3
  import * as functions from './src/base/functions.js';
4
4
  import * as errors from './src/base/errors.js';
5
- import { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory } from './src/base/types.js';
5
+ import { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode } from './src/base/types.js';
6
6
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
7
- declare const version = "4.1.44";
7
+ declare const version = "4.1.46";
8
8
  import ace from './src/ace.js';
9
9
  import alpaca from './src/alpaca.js';
10
10
  import ascendex from './src/ascendex.js';
@@ -516,5 +516,5 @@ declare const ccxt: {
516
516
  zaif: typeof zaif;
517
517
  zonda: typeof zonda;
518
518
  } & typeof functions & typeof errors;
519
- export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange, Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitforex, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitstamp1, bittrex, bitvavo, bl3p, blockchaincom, btcalpha, btcbox, btcmarkets, btctradeua, btcturk, bybit, cex, coinbase, coinbaseprime, coinbasepro, coincheck, coinex, coinfalcon, coinlist, coinmate, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, huobi, huobijp, huobipro, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, lbank2, luno, lykke, mercado, mexc, mexc3, ndax, novadax, oceanex, okcoin, okex, okex5, okx, paymium, phemex, poloniex, poloniexfutures, probit, tidex, timex, tokocrypto, upbit, wavesexchange, wazirx, whitebit, woo, yobit, zaif, zonda, };
519
+ export { version, Exchange, exchanges, pro, Precise, functions, errors, BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange, Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax, Position, FundingRateHistory, Liquidation, FundingHistory, MarginMode, ace, alpaca, ascendex, bequant, bigone, binance, binancecoinm, binanceus, binanceusdm, bingx, bit2c, bitbank, bitbay, bitbns, bitcoincom, bitfinex, bitfinex2, bitflyer, bitforex, bitget, bithumb, bitmart, bitmex, bitopro, bitpanda, bitrue, bitso, bitstamp, bitstamp1, bittrex, bitvavo, bl3p, blockchaincom, btcalpha, btcbox, btcmarkets, btctradeua, btcturk, bybit, cex, coinbase, coinbaseprime, coinbasepro, coincheck, coinex, coinfalcon, coinlist, coinmate, coinone, coinsph, coinspot, cryptocom, currencycom, delta, deribit, digifinex, exmo, fmfwio, gate, gateio, gemini, hitbtc, hitbtc3, hollaex, huobi, huobijp, huobipro, idex, independentreserve, indodax, kraken, krakenfutures, kucoin, kucoinfutures, kuna, latoken, lbank, lbank2, luno, lykke, mercado, mexc, mexc3, ndax, novadax, oceanex, okcoin, okex, okex5, okx, paymium, phemex, poloniex, poloniexfutures, probit, tidex, timex, tokocrypto, upbit, wavesexchange, wazirx, whitebit, woo, yobit, zaif, zonda, };
520
520
  export default ccxt;
package/js/ccxt.js CHANGED
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
38
38
  import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending, NoChange } from './src/base/errors.js';
39
39
  //-----------------------------------------------------------------------------
40
40
  // this is updated by vss.js when building
41
- const version = '4.1.45';
41
+ const version = '4.1.47';
42
42
  Exchange.ccxtVersion = version;
43
43
  //-----------------------------------------------------------------------------
44
44
  import ace from './src/ace.js';
@@ -628,7 +628,9 @@ interface Exchange {
628
628
  papiGetUmAdlQuantile(params?: {}): Promise<implicitReturnType>;
629
629
  papiGetCmAdlQuantile(params?: {}): Promise<implicitReturnType>;
630
630
  papiPostUmOrder(params?: {}): Promise<implicitReturnType>;
631
+ papiPostUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
631
632
  papiPostCmOrder(params?: {}): Promise<implicitReturnType>;
633
+ papiPostCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
632
634
  papiPostMarginOrder(params?: {}): Promise<implicitReturnType>;
633
635
  papiPostMarginLoan(params?: {}): Promise<implicitReturnType>;
634
636
  papiPostRepayLoan(params?: {}): Promise<implicitReturnType>;
@@ -645,8 +647,10 @@ interface Exchange {
645
647
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
646
648
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
647
649
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
650
+ papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
648
651
  papiDeleteUmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
649
652
  papiDeleteCmOrder(params?: {}): Promise<implicitReturnType>;
653
+ papiDeleteCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
650
654
  papiDeleteCmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
651
655
  papiDeleteMarginOrder(params?: {}): Promise<implicitReturnType>;
652
656
  papiDeleteMarginAllOpenOrders(params?: {}): Promise<implicitReturnType>;
@@ -628,7 +628,9 @@ interface binance {
628
628
  papiGetUmAdlQuantile(params?: {}): Promise<implicitReturnType>;
629
629
  papiGetCmAdlQuantile(params?: {}): Promise<implicitReturnType>;
630
630
  papiPostUmOrder(params?: {}): Promise<implicitReturnType>;
631
+ papiPostUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
631
632
  papiPostCmOrder(params?: {}): Promise<implicitReturnType>;
633
+ papiPostCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
632
634
  papiPostMarginOrder(params?: {}): Promise<implicitReturnType>;
633
635
  papiPostMarginLoan(params?: {}): Promise<implicitReturnType>;
634
636
  papiPostRepayLoan(params?: {}): Promise<implicitReturnType>;
@@ -645,8 +647,10 @@ interface binance {
645
647
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
646
648
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
647
649
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
650
+ papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
648
651
  papiDeleteUmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
649
652
  papiDeleteCmOrder(params?: {}): Promise<implicitReturnType>;
653
+ papiDeleteCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
650
654
  papiDeleteCmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
651
655
  papiDeleteMarginOrder(params?: {}): Promise<implicitReturnType>;
652
656
  papiDeleteMarginAllOpenOrders(params?: {}): Promise<implicitReturnType>;
@@ -628,7 +628,9 @@ interface binance {
628
628
  papiGetUmAdlQuantile(params?: {}): Promise<implicitReturnType>;
629
629
  papiGetCmAdlQuantile(params?: {}): Promise<implicitReturnType>;
630
630
  papiPostUmOrder(params?: {}): Promise<implicitReturnType>;
631
+ papiPostUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
631
632
  papiPostCmOrder(params?: {}): Promise<implicitReturnType>;
633
+ papiPostCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
632
634
  papiPostMarginOrder(params?: {}): Promise<implicitReturnType>;
633
635
  papiPostMarginLoan(params?: {}): Promise<implicitReturnType>;
634
636
  papiPostRepayLoan(params?: {}): Promise<implicitReturnType>;
@@ -645,8 +647,10 @@ interface binance {
645
647
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
646
648
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
647
649
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
650
+ papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
648
651
  papiDeleteUmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
649
652
  papiDeleteCmOrder(params?: {}): Promise<implicitReturnType>;
653
+ papiDeleteCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
650
654
  papiDeleteCmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
651
655
  papiDeleteMarginOrder(params?: {}): Promise<implicitReturnType>;
652
656
  papiDeleteMarginAllOpenOrders(params?: {}): Promise<implicitReturnType>;
@@ -628,7 +628,9 @@ interface binance {
628
628
  papiGetUmAdlQuantile(params?: {}): Promise<implicitReturnType>;
629
629
  papiGetCmAdlQuantile(params?: {}): Promise<implicitReturnType>;
630
630
  papiPostUmOrder(params?: {}): Promise<implicitReturnType>;
631
+ papiPostUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
631
632
  papiPostCmOrder(params?: {}): Promise<implicitReturnType>;
633
+ papiPostCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
632
634
  papiPostMarginOrder(params?: {}): Promise<implicitReturnType>;
633
635
  papiPostMarginLoan(params?: {}): Promise<implicitReturnType>;
634
636
  papiPostRepayLoan(params?: {}): Promise<implicitReturnType>;
@@ -645,8 +647,10 @@ interface binance {
645
647
  papiPostAssetCollection(params?: {}): Promise<implicitReturnType>;
646
648
  papiPutListenKey(params?: {}): Promise<implicitReturnType>;
647
649
  papiDeleteUmOrder(params?: {}): Promise<implicitReturnType>;
650
+ papiDeleteUmConditionalOrder(params?: {}): Promise<implicitReturnType>;
648
651
  papiDeleteUmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
649
652
  papiDeleteCmOrder(params?: {}): Promise<implicitReturnType>;
653
+ papiDeleteCmConditionalOrder(params?: {}): Promise<implicitReturnType>;
650
654
  papiDeleteCmAllOpenOrders(params?: {}): Promise<implicitReturnType>;
651
655
  papiDeleteMarginOrder(params?: {}): Promise<implicitReturnType>;
652
656
  papiDeleteMarginAllOpenOrders(params?: {}): Promise<implicitReturnType>;
@@ -48,9 +48,9 @@ export default class ascendex extends Exchange {
48
48
  };
49
49
  safeNetwork(networkId: any): string;
50
50
  fetchDepositAddress(code: string, params?: {}): Promise<any>;
51
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
52
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
53
- fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
51
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
52
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
53
+ fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
54
54
  parseTransactionStatus(status: any): string;
55
55
  parseTransaction(transaction: any, currency?: any): Transaction;
56
56
  fetchPositions(symbols?: string[], params?: {}): Promise<import("./base/types.js").Position[]>;
@@ -4,7 +4,7 @@ ExchangeError, AuthenticationError, DDoSProtection, RequestTimeout, ExchangeNotA
4
4
  import WsClient from './ws/WsClient.js';
5
5
  import { Future } from './ws/Future.js';
6
6
  import { OrderBook as WsOrderBook, IndexedOrderBook, CountedOrderBook } from './ws/OrderBook.js';
7
- import { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, FundingHistory } from './types.js';
7
+ import { Market, Trade, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, FundingHistory, MarginMode } from './types.js';
8
8
  export { Market, Trade, Fee, Ticker, OHLCV, OHLCVC, Order, OrderBook, Balance, Balances, Dictionary, Transaction, DepositAddressResponse, Currency, MinMax, IndexType, Int, OrderType, OrderSide, Position, FundingRateHistory, Liquidation, FundingHistory } from './types.js';
9
9
  /**
10
10
  * @class Exchange
@@ -72,7 +72,7 @@ export default class Exchange {
72
72
  transactions: {};
73
73
  ohlcvs: any;
74
74
  myTrades: any;
75
- positions: {};
75
+ positions: any;
76
76
  urls: {
77
77
  logo?: string;
78
78
  api?: string | Dictionary<string>;
@@ -548,6 +548,7 @@ export default class Exchange {
548
548
  watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
549
549
  fetchDepositAddresses(codes?: string[], params?: {}): Promise<any>;
550
550
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
551
+ fetchMarginMode(symbol?: string, params?: {}): Promise<MarginMode>;
551
552
  fetchRestOrderBookSafe(symbol: any, limit?: any, params?: {}): Promise<OrderBook>;
552
553
  watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
553
554
  fetchTime(params?: {}): Promise<number>;
@@ -675,6 +676,9 @@ export default class Exchange {
675
676
  editOrderWs(id: string, symbol: string, type: OrderType, side: OrderSide, amount: number, price?: number, params?: {}): Promise<Order>;
676
677
  fetchPermissions(params?: {}): Promise<void>;
677
678
  fetchPosition(symbol: string, params?: {}): Promise<Position>;
679
+ watchPosition(symbol?: string, params?: {}): Promise<Position>;
680
+ watchPositions(symbols?: string[], since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
681
+ watchPositionForSymbols(symbols?: string[], since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
678
682
  fetchPositionsBySymbol(symbol: string, params?: {}): Promise<Position[]>;
679
683
  fetchPositions(symbols?: string[], params?: {}): Promise<Position[]>;
680
684
  fetchPositionsRisk(symbols?: string[], params?: {}): Promise<Position[]>;
@@ -58,7 +58,6 @@ export default class Exchange {
58
58
  this.orders = undefined;
59
59
  this.triggerOrders = undefined;
60
60
  this.transactions = {};
61
- this.positions = {};
62
61
  this.requiresWeb3 = false;
63
62
  this.requiresEddsa = false;
64
63
  this.enableLastJsonResponse = true;
@@ -252,7 +251,7 @@ export default class Exchange {
252
251
  this.transactions = {};
253
252
  this.ohlcvs = {};
254
253
  this.myTrades = undefined;
255
- this.positions = {};
254
+ this.positions = undefined;
256
255
  // web3 and cryptography flags
257
256
  this.requiresWeb3 = false;
258
257
  this.requiresEddsa = false;
@@ -1346,6 +1345,9 @@ export default class Exchange {
1346
1345
  async fetchOrderBook(symbol, limit = undefined, params = {}) {
1347
1346
  throw new NotSupported(this.id + ' fetchOrderBook() is not supported yet');
1348
1347
  }
1348
+ async fetchMarginMode(symbol = undefined, params = {}) {
1349
+ throw new NotSupported(this.id + ' fetchMarginMode() is not supported yet');
1350
+ }
1349
1351
  async fetchRestOrderBookSafe(symbol, limit = undefined, params = {}) {
1350
1352
  const fetchSnapshotMaxRetries = this.handleOption('watchOrderBook', 'maxRetries', 3);
1351
1353
  for (let i = 0; i < fetchSnapshotMaxRetries; i++) {
@@ -2745,7 +2747,7 @@ export default class Exchange {
2745
2747
  const symbol = this.safeString(position, 'symbol');
2746
2748
  let market = undefined;
2747
2749
  if (symbol !== undefined) {
2748
- market = this.market(symbol);
2750
+ market = this.safeValue(this.markets, symbol);
2749
2751
  }
2750
2752
  if (contractSize === undefined && market !== undefined) {
2751
2753
  contractSize = this.safeNumber(market, 'contractSize');
@@ -2966,6 +2968,15 @@ export default class Exchange {
2966
2968
  async fetchPosition(symbol, params = {}) {
2967
2969
  throw new NotSupported(this.id + ' fetchPosition() is not supported yet');
2968
2970
  }
2971
+ async watchPosition(symbol = undefined, params = {}) {
2972
+ throw new NotSupported(this.id + ' watchPosition() is not supported yet');
2973
+ }
2974
+ async watchPositions(symbols = undefined, since = undefined, limit = undefined, params = {}) {
2975
+ throw new NotSupported(this.id + ' watchPositions() is not supported yet');
2976
+ }
2977
+ async watchPositionForSymbols(symbols = undefined, since = undefined, limit = undefined, params = {}) {
2978
+ return this.watchPositions(symbols, since, limit, params);
2979
+ }
2969
2980
  async fetchPositionsBySymbol(symbol, params = {}) {
2970
2981
  /**
2971
2982
  * @method
@@ -255,6 +255,11 @@ export interface FundingHistory {
255
255
  id: string;
256
256
  amount: number;
257
257
  }
258
+ export interface MarginMode {
259
+ infp: any;
260
+ symbol: string;
261
+ marginMode: 'isolated' | 'cross' | string;
262
+ }
258
263
  /** [ timestamp, open, high, low, close, volume ] */
259
264
  export declare type OHLCV = [number, number, number, number, number, number];
260
265
  /** [ timestamp, open, high, low, close, volume, count ] */
@@ -16,4 +16,8 @@ declare class ArrayCacheBySymbolById extends ArrayCache {
16
16
  constructor(maxSize?: any);
17
17
  append(item: any): void;
18
18
  }
19
- export { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById, };
19
+ declare class ArrayCacheBySymbolBySide extends ArrayCache {
20
+ constructor();
21
+ append(item: any): void;
22
+ }
23
+ export { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide, };
@@ -200,4 +200,53 @@ class ArrayCacheBySymbolById extends ArrayCache {
200
200
  this.allNewUpdates = (this.allNewUpdates || 0) + (afterLength - beforeLength);
201
201
  }
202
202
  }
203
- export { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById, };
203
+ class ArrayCacheBySymbolBySide extends ArrayCache {
204
+ constructor() {
205
+ super();
206
+ this.nestedNewUpdatesBySymbol = true;
207
+ Object.defineProperty(this, 'hashmap', {
208
+ __proto__: null,
209
+ value: {},
210
+ writable: true,
211
+ });
212
+ }
213
+ append(item) {
214
+ const bySide = this.hashmap[item.symbol] = this.hashmap[item.symbol] || {};
215
+ if (item.side in bySide) {
216
+ const reference = bySide[item.side];
217
+ if (reference !== item) {
218
+ for (const prop in item) {
219
+ reference[prop] = item[prop];
220
+ }
221
+ }
222
+ item = reference;
223
+ const index = this.findIndex((x) => x.symbol === item.symbol && x.side === item.side);
224
+ // move the order to the end of the array
225
+ this.splice(index, 1);
226
+ }
227
+ else {
228
+ bySide[item.side] = item;
229
+ }
230
+ this.push(item);
231
+ if (this.clearAllUpdates) {
232
+ this.clearAllUpdates = false;
233
+ this.clearUpdatesBySymbol = {};
234
+ this.allNewUpdates = 0;
235
+ this.newUpdatesBySymbol = {};
236
+ }
237
+ if (this.newUpdatesBySymbol[item.symbol] === undefined) {
238
+ this.newUpdatesBySymbol[item.symbol] = new Set();
239
+ }
240
+ if (this.clearUpdatesBySymbol[item.symbol]) {
241
+ this.clearUpdatesBySymbol[item.symbol] = false;
242
+ this.newUpdatesBySymbol[item.symbol].clear();
243
+ }
244
+ // in case an exchange updates the same order id twice
245
+ const sideSet = this.newUpdatesBySymbol[item.symbol];
246
+ const beforeLength = sideSet.size;
247
+ sideSet.add(item.side);
248
+ const afterLength = sideSet.size;
249
+ this.allNewUpdates = (this.allNewUpdates || 0) + (afterLength - beforeLength);
250
+ }
251
+ }
252
+ export { ArrayCache, ArrayCacheByTimestamp, ArrayCacheBySymbolById, ArrayCacheBySymbolBySide, };
@@ -47,8 +47,8 @@ export default class bigone extends Exchange {
47
47
  }>;
48
48
  parseTransactionStatus(status: any): string;
49
49
  parseTransaction(transaction: any, currency?: any): Transaction;
50
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
51
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
50
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
51
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
52
52
  transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<{
53
53
  info: any;
54
54
  id: any;
@@ -182,8 +182,8 @@ export default class binance extends Exchange {
182
182
  };
183
183
  info: any;
184
184
  };
185
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
186
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
185
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
186
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
187
187
  parseTransactionStatusByType(status: any, type?: any): string;
188
188
  parseTransaction(transaction: any, currency?: any): Transaction;
189
189
  parseTransferStatus(status: any): string;
package/js/src/binance.js CHANGED
@@ -963,7 +963,9 @@ export default class binance extends Exchange {
963
963
  },
964
964
  'post': {
965
965
  'um/order': 1,
966
+ 'um/conditional/order': 1,
966
967
  'cm/order': 1,
968
+ 'cm/conditional/order': 1,
967
969
  'margin/order': 0.0133,
968
970
  'marginLoan': 0.1333,
969
971
  'repayLoan': 0.1333,
@@ -984,8 +986,10 @@ export default class binance extends Exchange {
984
986
  },
985
987
  'delete': {
986
988
  'um/order': 1,
989
+ 'um/conditional/order': 1,
987
990
  'um/allOpenOrders': 1,
988
991
  'cm/order': 1,
992
+ 'cm/conditional/order': 1,
989
993
  'cm/allOpenOrders': 1,
990
994
  'margin/order': 1,
991
995
  'margin/allOpenOrders': 5,
package/js/src/bingx.d.ts CHANGED
@@ -156,8 +156,8 @@ export default class bingx extends Exchange {
156
156
  network: string;
157
157
  info: any;
158
158
  };
159
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
160
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
159
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
160
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
161
161
  parseTransaction(transaction: any, currency?: any): Transaction;
162
162
  parseTransactionStatus(status: any): string;
163
163
  setMarginMode(marginMode: string, symbol?: string, params?: {}): Promise<any>;
@@ -28,8 +28,8 @@ export default class bitbns extends Exchange {
28
28
  parseTrade(trade: any, market?: any): Trade;
29
29
  fetchMyTrades(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
30
30
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
31
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
32
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
31
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
32
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
33
33
  parseTransactionStatusByType(status: any, type?: any): string;
34
34
  parseTransaction(transaction: any, currency?: any): Transaction;
35
35
  fetchDepositAddress(code: string, params?: {}): Promise<{
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitfinex.js';
2
- import { Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
2
+ import { Balances, Int, OHLCV, Order, OrderBook, OrderSide, OrderType, Ticker, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class bitfinex
5
5
  * @extends Exchange
@@ -24,7 +24,7 @@ export default class bitfinex extends Exchange {
24
24
  fetchMarkets(params?: {}): Promise<any[]>;
25
25
  amountToPrecision(symbol: any, amount: any): any;
26
26
  priceToPrecision(symbol: any, price: any): any;
27
- fetchBalance(params?: {}): Promise<import("./base/types.js").Balances>;
27
+ fetchBalance(params?: {}): Promise<Balances>;
28
28
  transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<any>;
29
29
  parseTransfer(transfer: any, currency?: any): {
30
30
  info: any;
@@ -71,7 +71,7 @@ export default class bitfinex extends Exchange {
71
71
  network: any;
72
72
  info: any;
73
73
  }>;
74
- fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
74
+ fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
75
75
  parseTransaction(transaction: any, currency?: any): Transaction;
76
76
  parseTransactionStatus(status: any): string;
77
77
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/bitfinex2.js';
2
- import { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderBook, Transaction, Ticker } from './base/types.js';
2
+ import { Int, OrderSide, OrderType, Trade, OHLCV, Order, FundingRateHistory, OrderBook, Transaction, Ticker, Balances } from './base/types.js';
3
3
  /**
4
4
  * @class bitfinex2
5
5
  * @extends Exchange
@@ -21,7 +21,7 @@ export default class bitfinex2 extends Exchange {
21
21
  fetchMarkets(params?: {}): Promise<any[]>;
22
22
  fetchCurrencies(params?: {}): Promise<{}>;
23
23
  safeNetwork(networkId: any): string;
24
- fetchBalance(params?: {}): Promise<import("./base/types.js").Balances>;
24
+ fetchBalance(params?: {}): Promise<Balances>;
25
25
  transfer(code: string, amount: any, fromAccount: any, toAccount: any, params?: {}): Promise<{
26
26
  id: any;
27
27
  timestamp: number;
@@ -84,7 +84,7 @@ export default class bitfinex2 extends Exchange {
84
84
  parseTransactionStatus(status: any): string;
85
85
  parseTransaction(transaction: any, currency?: any): Transaction;
86
86
  fetchTradingFees(params?: {}): Promise<{}>;
87
- fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
87
+ fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
88
88
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<any>;
89
89
  fetchPositions(symbols?: string[], params?: {}): Promise<import("./base/types.js").Position[]>;
90
90
  parsePosition(position: any, market?: any): import("./base/types.js").Position;
@@ -33,8 +33,8 @@ export default class bitflyer extends Exchange {
33
33
  fetchMyTrades(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
34
34
  fetchPositions(symbols?: string[], params?: {}): Promise<any>;
35
35
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
36
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
37
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
36
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
37
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
38
38
  parseDepositStatus(status: any): string;
39
39
  parseWithdrawalStatus(status: any): string;
40
40
  parseTransaction(transaction: any, currency?: any): Transaction;
@@ -65,7 +65,7 @@ export default class bitget extends Exchange {
65
65
  fetchCurrencies(params?: {}): Promise<{}>;
66
66
  fetchMarketLeverageTiers(symbol: string, params?: {}): Promise<any[]>;
67
67
  parseMarketLeverageTiers(info: any, market?: any): any[];
68
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
68
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
69
69
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<{
70
70
  id: any;
71
71
  info: any;
@@ -87,7 +87,7 @@ export default class bitget extends Exchange {
87
87
  comment: any;
88
88
  fee: any;
89
89
  }>;
90
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
90
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
91
91
  parseTransaction(transaction: any, currency?: any): Transaction;
92
92
  parseTransactionStatus(status: any): string;
93
93
  fetchDepositAddress(code: string, params?: {}): Promise<{
@@ -94,9 +94,9 @@ export default class bitmart extends Exchange {
94
94
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<any>;
95
95
  fetchTransactionsByType(type: any, code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
96
96
  fetchDeposit(id: string, code?: string, params?: {}): Promise<Transaction>;
97
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
97
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
98
98
  fetchWithdrawal(id: string, code?: string, params?: {}): Promise<Transaction>;
99
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
99
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
100
100
  parseTransactionStatus(status: any): string;
101
101
  parseTransaction(transaction: any, currency?: any): Transaction;
102
102
  repayMargin(code: string, amount: any, symbol?: string, params?: {}): Promise<any>;
package/js/src/bitmart.js CHANGED
@@ -1512,7 +1512,7 @@ export default class bitmart extends Exchange {
1512
1512
  * @method
1513
1513
  * @name bitmart#fetchOHLCV
1514
1514
  * @description fetches historical candlestick data containing the open, high, low, and close price, and the volume of a market
1515
- * @see https://developer-pro.bitmart.com/en/spot/#get-latest-k-line-v3
1515
+ * @see https://developer-pro.bitmart.com/en/spot/#get-history-k-line-v3
1516
1516
  * @see https://developer-pro.bitmart.com/en/futures/#get-k-line
1517
1517
  * @param {string} symbol unified symbol of the market to fetch OHLCV data for
1518
1518
  * @param {string} timeframe the length of time each candle represents
@@ -1575,7 +1575,7 @@ export default class bitmart extends Exchange {
1575
1575
  response = await this.publicGetContractPublicKline(this.extend(request, params));
1576
1576
  }
1577
1577
  else {
1578
- response = await this.publicGetSpotQuotationV3LiteKlines(this.extend(request, params));
1578
+ response = await this.publicGetSpotQuotationV3Klines(this.extend(request, params));
1579
1579
  }
1580
1580
  //
1581
1581
  // spot
@@ -43,7 +43,7 @@ export default class bitmex extends Exchange {
43
43
  };
44
44
  };
45
45
  fetchLedger(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
46
- fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
46
+ fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
47
47
  parseTransactionStatus(status: any): string;
48
48
  parseTransaction(transaction: any, currency?: any): Transaction;
49
49
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
@@ -33,8 +33,8 @@ export default class bitopro extends Exchange {
33
33
  fetchMyTrades(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
34
34
  parseTransactionStatus(status: any): string;
35
35
  parseTransaction(transaction: any, currency?: any): Transaction;
36
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
37
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
36
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
37
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
38
38
  fetchWithdrawal(id: string, code?: string, params?: {}): Promise<Transaction>;
39
39
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
40
40
  parseDepositWithdrawFee(fee: any, currency?: any): {
@@ -47,8 +47,8 @@ export default class bitpanda extends Exchange {
47
47
  network: any;
48
48
  info: any;
49
49
  }>;
50
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
51
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
50
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
51
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
52
52
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
53
53
  parseTransaction(transaction: any, currency?: any): Transaction;
54
54
  parseOrderStatus(status: any): string;
@@ -39,8 +39,8 @@ export default class bitrue extends Exchange {
39
39
  fetchOpenOrders(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
40
40
  cancelOrder(id: string, symbol?: string, params?: {}): Promise<Order>;
41
41
  fetchMyTrades(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
42
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
43
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
42
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
43
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
44
44
  parseTransactionStatusByType(status: any, type?: any): string;
45
45
  parseTransaction(transaction: any, currency?: any): Transaction;
46
46
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
package/js/src/bitso.d.ts CHANGED
@@ -47,7 +47,7 @@ export default class bitso extends Exchange {
47
47
  fetchOrder(id: string, symbol?: string, params?: {}): Promise<Order>;
48
48
  fetchOrderTrades(id: string, symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
49
49
  fetchDeposit(id: string, code?: string, params?: {}): Promise<Transaction>;
50
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
50
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
51
51
  fetchDepositAddress(code: string, params?: {}): Promise<{
52
52
  currency: string;
53
53
  address: string;
@@ -81,8 +81,8 @@ export default class bitstamp extends Exchange {
81
81
  fetchOrderStatus(id: string, symbol?: string, params?: {}): Promise<string>;
82
82
  fetchOrder(id: string, symbol?: string, params?: {}): Promise<Order>;
83
83
  fetchMyTrades(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
84
- fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
85
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
84
+ fetchDepositsWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
85
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
86
86
  parseTransaction(transaction: any, currency?: any): Transaction;
87
87
  parseTransactionStatus(status: any): string;
88
88
  parseOrder(order: any, market?: any): Order;
@@ -45,11 +45,11 @@ export default class bittrex extends Exchange {
45
45
  cancelOrder(id: string, symbol?: string, params?: {}): Promise<any>;
46
46
  cancelAllOrders(symbol?: string, params?: {}): Promise<Order[]>;
47
47
  fetchDeposit(id: string, code?: string, params?: {}): Promise<any>;
48
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
49
- fetchPendingDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
48
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
49
+ fetchPendingDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
50
50
  fetchWithdrawal(id: string, code?: string, params?: {}): Promise<any>;
51
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
52
- fetchPendingWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
51
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
52
+ fetchPendingWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
53
53
  parseTransaction(transaction: any, currency?: any): Transaction;
54
54
  parseTimeInForce(timeInForce: any): string;
55
55
  parseOrder(order: any, market?: any): Order;
@@ -41,8 +41,8 @@ export default class bitvavo extends Exchange {
41
41
  parseOrder(order: any, market?: any): Order;
42
42
  fetchMyTrades(symbol?: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
43
43
  withdraw(code: string, amount: any, address: any, tag?: any, params?: {}): Promise<Transaction>;
44
- fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
45
- fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<any>;
44
+ fetchWithdrawals(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
45
+ fetchDeposits(code?: string, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
46
46
  parseTransactionStatus(status: any): string;
47
47
  parseTransaction(transaction: any, currency?: any): Transaction;
48
48
  parseDepositWithdrawFee(fee: any, currency?: any): {