ccxt 4.3.18 → 4.3.19

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 (168) hide show
  1. package/README.md +7 -5
  2. package/dist/cjs/ccxt.js +6 -1
  3. package/dist/cjs/src/abstract/woofipro.js +9 -0
  4. package/dist/cjs/src/ascendex.js +3 -4
  5. package/dist/cjs/src/base/Exchange.js +42 -2
  6. package/dist/cjs/src/base/functions/crypto.js +10 -3
  7. package/dist/cjs/src/base/functions/encode.js +6 -3
  8. package/dist/cjs/src/base/functions/number.js +8 -5
  9. package/dist/cjs/src/base/functions/rsa.js +5 -5
  10. package/dist/cjs/src/bigone.js +1 -1
  11. package/dist/cjs/src/bitfinex.js +25 -1
  12. package/dist/cjs/src/bitfinex2.js +59 -51
  13. package/dist/cjs/src/bitget.js +1 -5
  14. package/dist/cjs/src/bitmart.js +3 -3
  15. package/dist/cjs/src/bitstamp.js +1 -3
  16. package/dist/cjs/src/bybit.js +1 -0
  17. package/dist/cjs/src/coinex.js +321 -537
  18. package/dist/cjs/src/coinlist.js +1 -2
  19. package/dist/cjs/src/deribit.js +1 -1
  20. package/dist/cjs/src/hollaex.js +3 -3
  21. package/dist/cjs/src/indodax.js +1 -1
  22. package/dist/cjs/src/latoken.js +1 -1
  23. package/dist/cjs/src/mexc.js +1 -1
  24. package/dist/cjs/src/novadax.js +0 -1
  25. package/dist/cjs/src/okx.js +17 -0
  26. package/dist/cjs/src/poloniex.js +1 -2
  27. package/dist/cjs/src/pro/bitget.js +136 -192
  28. package/dist/cjs/src/pro/coinbaseinternational.js +9 -1
  29. package/dist/cjs/src/pro/okx.js +85 -0
  30. package/dist/cjs/src/pro/woofipro.js +1263 -0
  31. package/dist/cjs/src/wavesexchange.js +2 -2
  32. package/dist/cjs/src/woo.js +17 -3
  33. package/dist/cjs/src/woofipro.js +2698 -0
  34. package/js/ccxt.d.ts +8 -2
  35. package/js/ccxt.js +6 -2
  36. package/js/src/abstract/bybit.d.ts +1 -0
  37. package/js/src/abstract/okx.d.ts +1 -0
  38. package/js/src/abstract/woofipro.d.ts +122 -0
  39. package/js/src/abstract/woofipro.js +11 -0
  40. package/js/src/ace.d.ts +2 -2
  41. package/js/src/ascendex.d.ts +5 -15
  42. package/js/src/ascendex.js +3 -4
  43. package/js/src/base/Exchange.d.ts +26 -17
  44. package/js/src/base/Exchange.js +42 -2
  45. package/js/src/base/functions/crypto.d.ts +1 -1
  46. package/js/src/base/functions/crypto.js +10 -3
  47. package/js/src/base/functions/encode.d.ts +1 -1
  48. package/js/src/base/functions/encode.js +6 -3
  49. package/js/src/base/functions/number.d.ts +1 -1
  50. package/js/src/base/functions/number.js +8 -5
  51. package/js/src/base/functions/rsa.js +6 -6
  52. package/js/src/base/types.d.ts +4 -0
  53. package/js/src/bigone.d.ts +4 -14
  54. package/js/src/bigone.js +1 -1
  55. package/js/src/binance.d.ts +13 -71
  56. package/js/src/binancecoinm.d.ts +2 -22
  57. package/js/src/binanceusdm.d.ts +2 -22
  58. package/js/src/bingx.d.ts +4 -14
  59. package/js/src/bit2c.d.ts +2 -2
  60. package/js/src/bitbank.d.ts +2 -2
  61. package/js/src/bitbns.d.ts +2 -2
  62. package/js/src/bitfinex.d.ts +6 -16
  63. package/js/src/bitfinex.js +25 -1
  64. package/js/src/bitfinex2.d.ts +6 -16
  65. package/js/src/bitfinex2.js +59 -51
  66. package/js/src/bitflyer.d.ts +2 -2
  67. package/js/src/bitget.d.ts +7 -17
  68. package/js/src/bitget.js +1 -5
  69. package/js/src/bithumb.d.ts +3 -3
  70. package/js/src/bitmart.d.ts +5 -14
  71. package/js/src/bitmart.js +3 -3
  72. package/js/src/bitmex.d.ts +4 -4
  73. package/js/src/bitopro.d.ts +2 -2
  74. package/js/src/bitrue.d.ts +5 -5
  75. package/js/src/bitso.d.ts +2 -2
  76. package/js/src/bitstamp.d.ts +3 -3
  77. package/js/src/bitstamp.js +1 -3
  78. package/js/src/bitteam.d.ts +2 -2
  79. package/js/src/bitvavo.d.ts +5 -5
  80. package/js/src/bl3p.d.ts +2 -2
  81. package/js/src/blockchaincom.d.ts +2 -2
  82. package/js/src/blofin.d.ts +4 -14
  83. package/js/src/btcalpha.d.ts +2 -2
  84. package/js/src/btcbox.d.ts +2 -2
  85. package/js/src/btcmarkets.d.ts +2 -2
  86. package/js/src/btcturk.d.ts +2 -2
  87. package/js/src/bybit.d.ts +8 -56
  88. package/js/src/bybit.js +1 -0
  89. package/js/src/cex.d.ts +2 -2
  90. package/js/src/coinbase.d.ts +4 -4
  91. package/js/src/coinbasepro.d.ts +3 -3
  92. package/js/src/coincheck.d.ts +2 -2
  93. package/js/src/coinex.d.ts +6 -16
  94. package/js/src/coinex.js +321 -537
  95. package/js/src/coinlist.d.ts +5 -15
  96. package/js/src/coinlist.js +1 -2
  97. package/js/src/coinmate.d.ts +2 -2
  98. package/js/src/coinmetro.d.ts +3 -3
  99. package/js/src/coinone.d.ts +2 -2
  100. package/js/src/coinsph.d.ts +2 -2
  101. package/js/src/coinspot.d.ts +2 -2
  102. package/js/src/cryptocom.d.ts +2 -2
  103. package/js/src/currencycom.d.ts +3 -3
  104. package/js/src/delta.d.ts +5 -43
  105. package/js/src/deribit.d.ts +7 -55
  106. package/js/src/deribit.js +1 -1
  107. package/js/src/digifinex.d.ts +5 -15
  108. package/js/src/exmo.d.ts +2 -2
  109. package/js/src/gate.d.ts +6 -54
  110. package/js/src/gemini.d.ts +2 -2
  111. package/js/src/hitbtc.d.ts +4 -14
  112. package/js/src/hollaex.d.ts +3 -3
  113. package/js/src/hollaex.js +3 -3
  114. package/js/src/htx.d.ts +4 -14
  115. package/js/src/huobijp.d.ts +4 -4
  116. package/js/src/hyperliquid.d.ts +1 -1
  117. package/js/src/idex.d.ts +3 -3
  118. package/js/src/independentreserve.d.ts +2 -2
  119. package/js/src/indodax.d.ts +2 -2
  120. package/js/src/indodax.js +1 -1
  121. package/js/src/kraken.d.ts +4 -14
  122. package/js/src/krakenfutures.d.ts +4 -14
  123. package/js/src/kucoin.d.ts +5 -15
  124. package/js/src/kucoinfutures.d.ts +4 -14
  125. package/js/src/kuna.d.ts +2 -2
  126. package/js/src/latoken.d.ts +5 -15
  127. package/js/src/latoken.js +1 -1
  128. package/js/src/lbank.d.ts +2 -2
  129. package/js/src/luno.d.ts +2 -2
  130. package/js/src/lykke.d.ts +2 -2
  131. package/js/src/mercado.d.ts +2 -2
  132. package/js/src/mexc.d.ts +8 -28
  133. package/js/src/mexc.js +1 -1
  134. package/js/src/ndax.d.ts +2 -2
  135. package/js/src/novadax.d.ts +4 -15
  136. package/js/src/novadax.js +0 -1
  137. package/js/src/okcoin.d.ts +4 -14
  138. package/js/src/okx.d.ts +10 -68
  139. package/js/src/okx.js +17 -0
  140. package/js/src/onetrading.d.ts +2 -2
  141. package/js/src/paymium.d.ts +4 -14
  142. package/js/src/phemex.d.ts +5 -15
  143. package/js/src/poloniex.d.ts +3 -13
  144. package/js/src/poloniex.js +1 -2
  145. package/js/src/poloniexfutures.d.ts +2 -2
  146. package/js/src/pro/bitget.js +137 -193
  147. package/js/src/pro/coinbaseinternational.d.ts +3 -3
  148. package/js/src/pro/coinbaseinternational.js +9 -1
  149. package/js/src/pro/okx.d.ts +4 -1
  150. package/js/src/pro/okx.js +85 -0
  151. package/js/src/pro/woofipro.d.ts +47 -0
  152. package/js/src/pro/woofipro.js +1264 -0
  153. package/js/src/probit.d.ts +3 -3
  154. package/js/src/timex.d.ts +2 -2
  155. package/js/src/tokocrypto.d.ts +3 -3
  156. package/js/src/upbit.d.ts +2 -2
  157. package/js/src/wavesexchange.d.ts +3 -3
  158. package/js/src/wavesexchange.js +2 -2
  159. package/js/src/wazirx.d.ts +2 -2
  160. package/js/src/whitebit.d.ts +3 -13
  161. package/js/src/woo.d.ts +7 -17
  162. package/js/src/woo.js +17 -3
  163. package/js/src/woofipro.d.ts +131 -0
  164. package/js/src/woofipro.js +2699 -0
  165. package/js/src/yobit.d.ts +2 -2
  166. package/js/src/zaif.d.ts +2 -2
  167. package/js/src/zonda.d.ts +4 -14
  168. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/probit.js';
2
- import type { Balances, Currencies, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
2
+ import type { Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class probit
5
5
  * @augments Exchange
@@ -14,7 +14,7 @@ export default class probit extends Exchange {
14
14
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
15
15
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
16
16
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
17
- parseTicker(ticker: any, market?: Market): Ticker;
17
+ parseTicker(ticker: Dict, market?: Market): Ticker;
18
18
  fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
19
19
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
20
20
  parseTrade(trade: any, market?: Market): Trade;
@@ -27,7 +27,7 @@ export default class probit extends Exchange {
27
27
  fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
28
28
  parseOrderStatus(status: any): string;
29
29
  parseOrder(order: any, market?: Market): Order;
30
- costToPrecision(symbol: any, cost: any): any;
30
+ costToPrecision(symbol: any, cost: any): string;
31
31
  createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
32
32
  cancelOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
33
33
  parseDepositAddress(depositAddress: any, currency?: Currency): {
package/js/src/timex.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/timex.js';
2
- import type { Balances, Currencies, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction } from './base/types.js';
2
+ import type { Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class timex
5
5
  * @augments Exchange
@@ -54,7 +54,7 @@ export default class timex extends Exchange {
54
54
  };
55
55
  networks: {};
56
56
  };
57
- parseTicker(ticker: any, market?: Market): Ticker;
57
+ parseTicker(ticker: Dict, market?: Market): Ticker;
58
58
  parseTrade(trade: any, market?: Market): Trade;
59
59
  parseOHLCV(ohlcv: any, market?: Market): OHLCV;
60
60
  parseOrder(order: any, market?: Market): Order;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/tokocrypto.js';
2
- import type { Balances, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
2
+ import type { Balances, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class tokocrypto
5
5
  * @augments Exchange
@@ -12,11 +12,11 @@ export default class tokocrypto extends Exchange {
12
12
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
13
13
  parseTrade(trade: any, market?: Market): Trade;
14
14
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
15
- parseTicker(ticker: any, market?: Market): Ticker;
15
+ parseTicker(ticker: Dict, market?: Market): Ticker;
16
16
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
17
17
  getMarketIdByType(market: any): any;
18
18
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
19
- fetchBidsAsks(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Dictionary<Ticker>>;
19
+ fetchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
20
20
  parseOHLCV(ohlcv: any, market?: Market): OHLCV;
21
21
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
22
22
  fetchBalance(params?: {}): Promise<Balances>;
package/js/src/upbit.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/upbit.js';
2
- import type { Balances, Currency, Dictionary, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction } from './base/types.js';
2
+ import type { Balances, Currency, Dict, Dictionary, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class upbit
5
5
  * @augments Exchange
@@ -44,7 +44,7 @@ export default class upbit extends Exchange {
44
44
  fetchBalance(params?: {}): Promise<Balances>;
45
45
  fetchOrderBooks(symbols?: Strings, limit?: Int, params?: {}): Promise<Dictionary<OrderBook>>;
46
46
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
47
- parseTicker(ticker: any, market?: Market): Ticker;
47
+ parseTicker(ticker: Dict, market?: Market): Ticker;
48
48
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
49
49
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
50
50
  parseTrade(trade: any, market?: Market): Trade;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/wavesexchange.js';
2
- import type { Balances, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
2
+ import type { Balances, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class wavesexchange
5
5
  * @augments Exchange
@@ -26,7 +26,7 @@ export default class wavesexchange extends Exchange {
26
26
  headers: any;
27
27
  };
28
28
  signIn(params?: {}): Promise<any>;
29
- parseTicker(ticker: any, market?: Market): Ticker;
29
+ parseTicker(ticker: Dict, market?: Market): Ticker;
30
30
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
31
31
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
32
32
  fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
@@ -45,7 +45,7 @@ export default class wavesexchange extends Exchange {
45
45
  getAssetId(currencyId: any): any;
46
46
  customPriceToPrecision(symbol: any, price: any): number;
47
47
  customAmountToPrecision(symbol: any, amount: any): number;
48
- currencyToPrecision(code: any, amount: any, networkCode?: any): number;
48
+ customCurrencyToPrecision(code: any, amount: any, networkCode?: any): number;
49
49
  fromPrecision(amount: any, scale: any): string;
50
50
  toPrecision(amount: any, scale: any): string;
51
51
  currencyFromPrecision(currency: any, amount: any): string;
@@ -1241,7 +1241,7 @@ export default class wavesexchange extends Exchange {
1241
1241
  const amountPrecision = this.numberToString(this.toPrecision(amount, this.numberToString(this.markets[symbol]['precision']['amount'])));
1242
1242
  return this.parseToInt(parseFloat(amountPrecision));
1243
1243
  }
1244
- currencyToPrecision(code, amount, networkCode = undefined) {
1244
+ customCurrencyToPrecision(code, amount, networkCode = undefined) {
1245
1245
  const amountPrecision = this.numberToString(this.toPrecision(amount, this.currencies[code]['precision']));
1246
1246
  return this.parseToInt(parseFloat(amountPrecision));
1247
1247
  }
@@ -2526,7 +2526,7 @@ export default class wavesexchange extends Exchange {
2526
2526
  const feeAssetId = 'WAVES';
2527
2527
  const type = 4; // transfer
2528
2528
  const version = 2;
2529
- const amountInteger = this.currencyToPrecision(code, amount);
2529
+ const amountInteger = this.customCurrencyToPrecision(code, amount);
2530
2530
  const currency = this.currency(code);
2531
2531
  const timestamp = this.milliseconds();
2532
2532
  const byteArray = [
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/wazirx.js';
2
- import type { Balances, Currencies, Currency, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
2
+ import type { Balances, Currencies, Currency, Dict, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction } from './base/types.js';
3
3
  /**
4
4
  * @class wazirx
5
5
  * @augments Exchange
@@ -23,7 +23,7 @@ export default class wazirx extends Exchange {
23
23
  info: any;
24
24
  }>;
25
25
  fetchTime(params?: {}): Promise<number>;
26
- parseTicker(ticker: any, market?: Market): Ticker;
26
+ parseTicker(ticker: Dict, market?: Market): Ticker;
27
27
  parseBalance(response: any): Balances;
28
28
  fetchBalance(params?: {}): Promise<Balances>;
29
29
  fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/whitebit.js';
2
- import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, Currencies, TradingFees } from './base/types.js';
2
+ import type { TransferEntry, Balances, Currency, Int, Market, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade, Transaction, Num, Currencies, TradingFees, Dict } from './base/types.js';
3
3
  /**
4
4
  * @class whitebit
5
5
  * @augments Exchange
@@ -18,7 +18,7 @@ export default class whitebit extends Exchange {
18
18
  parseDepositWithdrawFees(response: any, codes?: any, currencyIdKey?: any): {};
19
19
  fetchTradingFees(params?: {}): Promise<TradingFees>;
20
20
  fetchTicker(symbol: string, params?: {}): Promise<Ticker>;
21
- parseTicker(ticker: any, market?: Market): Ticker;
21
+ parseTicker(ticker: Dict, market?: Market): Ticker;
22
22
  fetchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
23
23
  fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
24
24
  fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
@@ -55,17 +55,7 @@ export default class whitebit extends Exchange {
55
55
  }>;
56
56
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
57
57
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
58
- parseTransfer(transfer: any, currency?: Currency): {
59
- info: any;
60
- id: any;
61
- timestamp: any;
62
- datetime: any;
63
- currency: string;
64
- amount: any;
65
- fromAccount: any;
66
- toAccount: any;
67
- status: any;
68
- };
58
+ parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
69
59
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<any>;
70
60
  parseTransaction(transaction: any, currency?: Currency): Transaction;
71
61
  parseTransactionStatus(status: any): string;
package/js/src/woo.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import Exchange from './abstract/woo.js';
2
- import type { TransferEntry, Balances, Conversion, Currency, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Trade, Transaction, Leverage, Account, Currencies, TradingFees } from './base/types.js';
2
+ import type { TransferEntry, Balances, Conversion, Currency, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Dict, Strings, Trade, Transaction, Leverage, Account, Currencies, TradingFees, TransferEntries } from './base/types.js';
3
3
  /**
4
4
  * @class woo
5
5
  * @augments Exchange
@@ -58,7 +58,7 @@ export default class woo extends Exchange {
58
58
  network: string;
59
59
  info: any;
60
60
  }>;
61
- getAssetHistoryRows(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any[]>;
61
+ getAssetHistoryRows(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
62
62
  fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
63
63
  parseLedgerEntry(item: any, currency?: Currency): {
64
64
  id: string;
@@ -85,19 +85,9 @@ export default class woo extends Exchange {
85
85
  parseTransaction(transaction: any, currency?: Currency): Transaction;
86
86
  parseTransactionStatus(status: any): string;
87
87
  transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
88
- fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
89
- parseTransfer(transfer: any, currency?: Currency): {
90
- id: string;
91
- timestamp: number;
92
- datetime: string;
93
- currency: any;
94
- amount: number;
95
- fromAccount: string;
96
- toAccount: string;
97
- status: string;
98
- info: any;
99
- };
100
- parseTransferStatus(status: any): string;
88
+ fetchTransfers(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<TransferEntries>;
89
+ parseTransfer(transfer: Dict, currency?: Currency): TransferEntry;
90
+ parseTransferStatus(status: Str): Str;
101
91
  withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
102
92
  repayMargin(code: string, amount: any, symbol?: Str, params?: {}): Promise<any>;
103
93
  parseMarginLoan(info: any, currency?: Currency): {
@@ -170,7 +160,7 @@ export default class woo extends Exchange {
170
160
  fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
171
161
  setPositionMode(hedged: boolean, symbol?: Str, params?: {}): Promise<any>;
172
162
  fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
173
- parseLeverage(leverage: any, market?: any): Leverage;
163
+ parseLeverage(leverage: Dict, market?: Market): Leverage;
174
164
  setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
175
165
  fetchPosition(symbol?: Str, params?: {}): Promise<import("./base/types.js").Position>;
176
166
  fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
@@ -179,7 +169,7 @@ export default class woo extends Exchange {
179
169
  createConvertTrade(id: string, fromCode: string, toCode: string, amount?: Num, params?: {}): Promise<Conversion>;
180
170
  fetchConvertTrade(id: string, code?: Str, params?: {}): Promise<Conversion>;
181
171
  fetchConvertTradeHistory(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Conversion[]>;
182
- parseConversion(conversion: any, fromCurrency?: Currency, toCurrency?: Currency): Conversion;
172
+ parseConversion(conversion: Dict, fromCurrency?: Currency, toCurrency?: Currency): Conversion;
183
173
  fetchConvertCurrencies(params?: {}): Promise<Currencies>;
184
174
  defaultNetworkCodeForCurrency(code: any): any;
185
175
  setSandboxMode(enable: boolean): void;
package/js/src/woo.js CHANGED
@@ -404,6 +404,7 @@ export default class woo extends Exchange {
404
404
  * @method
405
405
  * @name woo#fetchMarkets
406
406
  * @description retrieves data on all markets for woo
407
+ * @see https://docs.woo.org/#exchange-information
407
408
  * @param {object} [params] extra parameters specific to the exchange API endpoint
408
409
  * @returns {object[]} an array of objects representing market data
409
410
  */
@@ -521,6 +522,7 @@ export default class woo extends Exchange {
521
522
  * @method
522
523
  * @name woo#fetchTrades
523
524
  * @description get the list of most recent trades for a particular symbol
525
+ * @see https://docs.woo.org/#market-trades-public
524
526
  * @param {string} symbol unified symbol of the market to fetch trades for
525
527
  * @param {int} [since] timestamp in ms of the earliest trade to fetch
526
528
  * @param {int} [limit] the maximum amount of trades to fetch
@@ -703,6 +705,7 @@ export default class woo extends Exchange {
703
705
  * @method
704
706
  * @name woo#fetchCurrencies
705
707
  * @description fetches all available currencies on an exchange
708
+ * @see https://docs.woo.org/#available-token-public
706
709
  * @param {object} [params] extra parameters specific to the exchange API endpoint
707
710
  * @returns {object} an associative dictionary of currencies
708
711
  */
@@ -858,6 +861,7 @@ export default class woo extends Exchange {
858
861
  * @method
859
862
  * @name woo#createTrailingAmountOrder
860
863
  * @description create a trailing order by providing the symbol, type, side, amount, price and trailingAmount
864
+ * @see https://docs.woo.org/#send-algo-order
861
865
  * @param {string} symbol unified symbol of the market to create an order in
862
866
  * @param {string} type 'market' or 'limit'
863
867
  * @param {string} side 'buy' or 'sell'
@@ -883,6 +887,7 @@ export default class woo extends Exchange {
883
887
  * @method
884
888
  * @name woo#createTrailingPercentOrder
885
889
  * @description create a trailing order by providing the symbol, type, side, amount, price and trailingPercent
890
+ * @see https://docs.woo.org/#send-algo-order
886
891
  * @param {string} symbol unified symbol of the market to create an order in
887
892
  * @param {string} type 'market' or 'limit'
888
893
  * @param {string} side 'buy' or 'sell'
@@ -1673,6 +1678,7 @@ export default class woo extends Exchange {
1673
1678
  * @method
1674
1679
  * @name woo#fetchOrderBook
1675
1680
  * @description fetches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
1681
+ * @see https://docs.woo.org/#orderbook-snapshot-public
1676
1682
  * @param {string} symbol unified symbol of the market to fetch the order book for
1677
1683
  * @param {int} [limit] the maximum amount of order book entries to return
1678
1684
  * @param {object} [params] extra parameters specific to the exchange API endpoint
@@ -1808,6 +1814,7 @@ export default class woo extends Exchange {
1808
1814
  * @method
1809
1815
  * @name woo#fetchOrderTrades
1810
1816
  * @description fetch all the trades made from a single order
1817
+ * @see https://docs.woo.org/#get-trades
1811
1818
  * @param {string} id order id
1812
1819
  * @param {string} symbol unified market symbol
1813
1820
  * @param {int} [since] the earliest time in ms to fetch trades for
@@ -1849,8 +1856,8 @@ export default class woo extends Exchange {
1849
1856
  /**
1850
1857
  * @method
1851
1858
  * @name woo#fetchMyTrades
1852
- * @see https://docs.woo.org/#get-trades
1853
1859
  * @description fetch all trades made by the user
1860
+ * @see https://docs.woo.org/#get-trades
1854
1861
  * @param {string} symbol unified market symbol
1855
1862
  * @param {int} [since] the earliest time in ms to fetch trades for
1856
1863
  * @param {int} [limit] the maximum number of trades structures to retrieve
@@ -1911,6 +1918,7 @@ export default class woo extends Exchange {
1911
1918
  * @method
1912
1919
  * @name woo#fetchAccounts
1913
1920
  * @description fetch all the accounts associated with a profile
1921
+ * @see https://docs.woo.org/#get-assets-of-subaccounts
1914
1922
  * @param {object} [params] extra parameters specific to the exchange API endpoint
1915
1923
  * @returns {object} a dictionary of [account structures]{@link https://docs.ccxt.com/#/?id=account-structure} indexed by the account type
1916
1924
  */
@@ -2008,6 +2016,7 @@ export default class woo extends Exchange {
2008
2016
  * @method
2009
2017
  * @name woo#fetchDepositAddress
2010
2018
  * @description fetch the deposit address for a currency associated with this account
2019
+ * @see https://docs.woo.org/#get-token-deposit-address
2011
2020
  * @param {string} code unified currency code
2012
2021
  * @param {object} [params] extra parameters specific to the exchange API endpoint
2013
2022
  * @returns {object} an [address structure]{@link https://docs.ccxt.com/#/?id=address-structure}
@@ -2093,13 +2102,14 @@ export default class woo extends Exchange {
2093
2102
  // "meta": { total: '1', records_per_page: "25", current_page: "1" },
2094
2103
  // "success": true
2095
2104
  // }
2096
- return [currency, this.safeValue(response, 'rows', {})];
2105
+ return [currency, this.safeList(response, 'rows', [])];
2097
2106
  }
2098
2107
  async fetchLedger(code = undefined, since = undefined, limit = undefined, params = {}) {
2099
2108
  /**
2100
2109
  * @method
2101
2110
  * @name woo#fetchLedger
2102
2111
  * @description fetch the history of changes, actions done by the user or operations that altered balance of the user
2112
+ * @see https://docs.woo.org/#get-asset-history
2103
2113
  * @param {string} code unified currency code, default is undefined
2104
2114
  * @param {int} [since] timestamp in ms of the earliest ledger entry, default is undefined
2105
2115
  * @param {int} [limit] max number of ledger entrys to return, default is undefined
@@ -2164,6 +2174,7 @@ export default class woo extends Exchange {
2164
2174
  * @method
2165
2175
  * @name woo#fetchDeposits
2166
2176
  * @description fetch all deposits made to an account
2177
+ * @see https://docs.woo.org/#get-asset-history
2167
2178
  * @param {string} code unified currency code
2168
2179
  * @param {int} [since] the earliest time in ms to fetch deposits for
2169
2180
  * @param {int} [limit] the maximum number of deposits structures to retrieve
@@ -2180,6 +2191,7 @@ export default class woo extends Exchange {
2180
2191
  * @method
2181
2192
  * @name woo#fetchWithdrawals
2182
2193
  * @description fetch all withdrawals made from an account
2194
+ * @see https://docs.woo.org/#get-asset-history
2183
2195
  * @param {string} code unified currency code
2184
2196
  * @param {int} [since] the earliest time in ms to fetch withdrawals for
2185
2197
  * @param {int} [limit] the maximum number of withdrawals structures to retrieve
@@ -2196,6 +2208,7 @@ export default class woo extends Exchange {
2196
2208
  * @method
2197
2209
  * @name woo#fetchDepositsWithdrawals
2198
2210
  * @description fetch history of deposits and withdrawals
2211
+ * @see https://docs.woo.org/#get-asset-history
2199
2212
  * @param {string} [code] unified currency code for the currency of the deposit/withdrawals, default is undefined
2200
2213
  * @param {int} [since] timestamp in ms of the earliest deposit/withdrawal, default is undefined
2201
2214
  * @param {int} [limit] max number of deposit/withdrawals to return, default is undefined
@@ -2269,8 +2282,8 @@ export default class woo extends Exchange {
2269
2282
  /**
2270
2283
  * @method
2271
2284
  * @name woo#transfer
2272
- * @see https://docs.woo.org/#get-transfer-history
2273
2285
  * @description transfer currency internally between wallets on the same account
2286
+ * @see https://docs.woo.org/#get-transfer-history
2274
2287
  * @param {string} code unified currency code
2275
2288
  * @param {float} amount amount to transfer
2276
2289
  * @param {string} fromAccount account to transfer from
@@ -2414,6 +2427,7 @@ export default class woo extends Exchange {
2414
2427
  * @method
2415
2428
  * @name woo#withdraw
2416
2429
  * @description make a withdrawal
2430
+ * @see https://docs.woo.org/#token-withdraw
2417
2431
  * @param {string} code unified currency code
2418
2432
  * @param {float} amount the amount to withdraw
2419
2433
  * @param {string} address the address to withdraw to
@@ -0,0 +1,131 @@
1
+ import Exchange from './abstract/woofipro.js';
2
+ import type { Balances, Currency, FundingRateHistory, Int, Market, Num, OHLCV, Order, OrderBook, OrderSide, OrderType, Str, Strings, Trade, Transaction, Leverage, Currencies, TradingFees, OrderRequest } from './base/types.js';
3
+ /**
4
+ * @class woofipro
5
+ * @augments Exchange
6
+ */
7
+ export default class woofipro extends Exchange {
8
+ describe(): any;
9
+ setSandboxMode(enable: boolean): void;
10
+ fetchStatus(params?: {}): Promise<{
11
+ status: string;
12
+ updated: any;
13
+ eta: any;
14
+ url: any;
15
+ info: any;
16
+ }>;
17
+ fetchTime(params?: {}): Promise<number>;
18
+ parseMarket(market: any): Market;
19
+ fetchMarkets(params?: {}): Promise<Market[]>;
20
+ fetchCurrencies(params?: {}): Promise<Currencies>;
21
+ parseTokenAndFeeTemp(item: any, feeTokenKey: any, feeAmountKey: any): any;
22
+ parseTrade(trade: any, market?: Market): Trade;
23
+ fetchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
24
+ parseFundingRate(fundingRate: any, market?: Market): {
25
+ info: any;
26
+ symbol: string;
27
+ markPrice: any;
28
+ indexPrice: any;
29
+ interestRate: number;
30
+ estimatedSettlePrice: any;
31
+ timestamp: number;
32
+ datetime: string;
33
+ fundingRate: number;
34
+ fundingTimestamp: number;
35
+ fundingDatetime: string;
36
+ nextFundingRate: any;
37
+ nextFundingTimestamp: any;
38
+ nextFundingDatetime: any;
39
+ previousFundingRate: number;
40
+ previousFundingTimestamp: number;
41
+ previousFundingDatetime: string;
42
+ };
43
+ fetchFundingRate(symbol: string, params?: {}): Promise<{
44
+ info: any;
45
+ symbol: string;
46
+ markPrice: any;
47
+ indexPrice: any;
48
+ interestRate: number;
49
+ estimatedSettlePrice: any;
50
+ timestamp: number;
51
+ datetime: string;
52
+ fundingRate: number;
53
+ fundingTimestamp: number;
54
+ fundingDatetime: string;
55
+ nextFundingRate: any;
56
+ nextFundingTimestamp: any;
57
+ nextFundingDatetime: any;
58
+ previousFundingRate: number;
59
+ previousFundingTimestamp: number;
60
+ previousFundingDatetime: string;
61
+ }>;
62
+ fetchFundingRates(symbols?: Strings, params?: {}): Promise<any>;
63
+ fetchFundingRateHistory(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<FundingRateHistory[]>;
64
+ fetchTradingFees(params?: {}): Promise<TradingFees>;
65
+ fetchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
66
+ parseOHLCV(ohlcv: any, market?: Market): OHLCV;
67
+ fetchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
68
+ parseOrder(order: any, market?: Market): Order;
69
+ parseTimeInForce(timeInForce: any): string;
70
+ parseOrderStatus(status: any): any;
71
+ parseOrderType(type: any): string;
72
+ createOrderRequest(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): any;
73
+ createOrder(symbol: string, type: OrderType, side: OrderSide, amount: number, price?: Num, params?: {}): Promise<Order>;
74
+ createOrders(orders: OrderRequest[], params?: {}): Promise<Order[]>;
75
+ editOrder(id: string, symbol: string, type: OrderType, side: OrderSide, amount?: Num, price?: Num, params?: {}): Promise<Order>;
76
+ cancelOrder(id: string, symbol?: Str, params?: {}): Promise<any>;
77
+ cancelOrders(ids: string[], symbol?: Str, params?: {}): Promise<any>;
78
+ cancelAllOrders(symbol?: Str, params?: {}): Promise<any>;
79
+ fetchOrder(id: string, symbol?: Str, params?: {}): Promise<Order>;
80
+ fetchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
81
+ fetchOpenOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
82
+ fetchClosedOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
83
+ fetchOrderTrades(id: string, symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
84
+ fetchMyTrades(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
85
+ parseBalance(response: any): Balances;
86
+ fetchBalance(params?: {}): Promise<Balances>;
87
+ getAssetHistoryRows(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
88
+ parseLedgerEntry(item: any, currency?: Currency): {
89
+ id: string;
90
+ currency: string;
91
+ account: string;
92
+ referenceAccount: any;
93
+ referenceId: string;
94
+ status: string;
95
+ amount: number;
96
+ before: any;
97
+ after: any;
98
+ fee: any;
99
+ direction: string;
100
+ timestamp: number;
101
+ datetime: string;
102
+ type: string;
103
+ info: any;
104
+ };
105
+ parseLedgerEntryType(type: any): string;
106
+ fetchLedger(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<any>;
107
+ parseTransaction(transaction: any, currency?: Currency): Transaction;
108
+ parseTransactionStatus(status: any): string;
109
+ fetchDeposits(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
110
+ fetchWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
111
+ fetchDepositsWithdrawals(code?: Str, since?: Int, limit?: Int, params?: {}): Promise<Transaction[]>;
112
+ getWithdrawNonce(params?: {}): Promise<number>;
113
+ hashMessage(message: any): string;
114
+ signHash(hash: any, privateKey: any): string;
115
+ signMessage(message: any, privateKey: any): string;
116
+ withdraw(code: string, amount: number, address: string, tag?: any, params?: {}): Promise<Transaction>;
117
+ parseLeverage(leverage: any, market?: any): Leverage;
118
+ fetchLeverage(symbol: string, params?: {}): Promise<Leverage>;
119
+ setLeverage(leverage: Int, symbol?: Str, params?: {}): Promise<any>;
120
+ parsePosition(position: any, market?: Market): import("./base/types.js").Position;
121
+ fetchPosition(symbol?: Str, params?: {}): Promise<import("./base/types.js").Position>;
122
+ fetchPositions(symbols?: Strings, params?: {}): Promise<import("./base/types.js").Position[]>;
123
+ nonce(): number;
124
+ sign(path: any, section?: string, method?: string, params?: {}, headers?: any, body?: any): {
125
+ url: string;
126
+ method: string;
127
+ body: any;
128
+ headers: any;
129
+ };
130
+ handleErrors(httpCode: any, reason: any, url: any, method: any, headers: any, body: any, response: any, requestHeaders: any, requestBody: any): any;
131
+ }