ccxt 4.5.30 → 4.5.32

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 (73) hide show
  1. package/README.md +4 -4
  2. package/dist/ccxt.browser.min.js +18 -18
  3. package/dist/cjs/ccxt.js +6 -4
  4. package/dist/cjs/src/aster.js +3802 -0
  5. package/dist/cjs/src/backpack.js +1 -1
  6. package/dist/cjs/src/base/Exchange.js +35 -2
  7. package/dist/cjs/src/base/ws/WsClient.js +1 -0
  8. package/dist/cjs/src/bigone.js +1 -1
  9. package/dist/cjs/src/binance.js +1 -0
  10. package/dist/cjs/src/bingx.js +73 -0
  11. package/dist/cjs/src/cryptomus.js +1 -1
  12. package/dist/cjs/src/gate.js +52 -6
  13. package/dist/cjs/src/hyperliquid.js +9 -1
  14. package/dist/cjs/src/kucoin.js +63 -64
  15. package/dist/cjs/src/okx.js +14 -5
  16. package/dist/cjs/src/pro/apex.js +2 -2
  17. package/dist/cjs/src/pro/ascendex.js +1 -1
  18. package/dist/cjs/src/pro/aster.js +1046 -0
  19. package/dist/cjs/src/pro/bingx.js +1 -1
  20. package/dist/cjs/src/pro/bybit.js +1 -1
  21. package/dist/cjs/src/pro/cryptocom.js +1 -1
  22. package/dist/cjs/src/pro/dydx.js +1 -1
  23. package/dist/cjs/src/pro/htx.js +1 -1
  24. package/dist/cjs/src/pro/hyperliquid.js +1 -1
  25. package/dist/cjs/src/pro/p2b.js +1 -1
  26. package/dist/cjs/src/pro/toobit.js +1 -1
  27. package/js/ccxt.d.ts +8 -5
  28. package/js/ccxt.js +6 -4
  29. package/js/src/abstract/aster.d.ts +88 -0
  30. package/js/src/abstract/binance.d.ts +1 -0
  31. package/js/src/abstract/binancecoinm.d.ts +1 -0
  32. package/js/src/abstract/binanceus.d.ts +1 -0
  33. package/js/src/abstract/binanceusdm.d.ts +1 -0
  34. package/js/src/abstract/kucoin.d.ts +2 -0
  35. package/js/src/abstract/kucoinfutures.d.ts +2 -0
  36. package/js/src/aster.d.ts +563 -0
  37. package/js/src/aster.js +3801 -0
  38. package/js/src/backpack.js +1 -1
  39. package/js/src/base/Exchange.d.ts +4 -0
  40. package/js/src/base/Exchange.js +35 -1
  41. package/js/src/base/ws/WsClient.js +1 -0
  42. package/js/src/bigone.js +1 -1
  43. package/js/src/binance.d.ts +1 -1
  44. package/js/src/binance.js +1 -0
  45. package/js/src/bingx.d.ts +12 -1
  46. package/js/src/bingx.js +73 -0
  47. package/js/src/cryptomus.js +1 -1
  48. package/js/src/exmo.d.ts +1 -1
  49. package/js/src/gate.js +52 -6
  50. package/js/src/hyperliquid.d.ts +1 -0
  51. package/js/src/hyperliquid.js +9 -1
  52. package/js/src/kucoin.d.ts +5 -3
  53. package/js/src/kucoin.js +63 -64
  54. package/js/src/okx.js +14 -5
  55. package/js/src/pro/apex.js +2 -2
  56. package/js/src/pro/ascendex.js +1 -1
  57. package/js/src/pro/aster.d.ts +273 -0
  58. package/js/src/pro/aster.js +1045 -0
  59. package/js/src/pro/bingx.js +1 -1
  60. package/js/src/pro/bybit.js +1 -1
  61. package/js/src/pro/cryptocom.js +1 -1
  62. package/js/src/pro/dydx.js +1 -1
  63. package/js/src/pro/htx.js +1 -1
  64. package/js/src/pro/hyperliquid.js +1 -1
  65. package/js/src/pro/p2b.js +1 -1
  66. package/js/src/pro/toobit.js +1 -1
  67. package/package.json +1 -1
  68. package/dist/cjs/src/oceanex.js +0 -1125
  69. package/js/src/abstract/oceanex.d.ts +0 -30
  70. package/js/src/oceanex.d.ts +0 -231
  71. package/js/src/oceanex.js +0 -1124
  72. /package/dist/cjs/src/abstract/{oceanex.js → aster.js} +0 -0
  73. /package/js/src/abstract/{oceanex.js → aster.js} +0 -0
package/js/src/okx.js CHANGED
@@ -3011,6 +3011,9 @@ export default class okx extends Exchange {
3011
3011
  }
3012
3012
  createOrderRequest(symbol, type, side, amount, price = undefined, params = {}) {
3013
3013
  const market = this.market(symbol);
3014
+ const takeProfitPrice = this.safeValue2(params, 'takeProfitPrice', 'tpTriggerPx');
3015
+ const stopLossPrice = this.safeValue2(params, 'stopLossPrice', 'slTriggerPx');
3016
+ const conditional = (stopLossPrice !== undefined) || (takeProfitPrice !== undefined) || (type === 'conditional');
3014
3017
  let request = {
3015
3018
  'instId': market['id'],
3016
3019
  // 'ccy': currency['id'], // only applicable to cross MARGIN orders in single-currency margin
@@ -3021,7 +3024,7 @@ export default class okx extends Exchange {
3021
3024
  'ordType': type,
3022
3025
  // 'ordType': type, // privatePostTradeOrder: market, limit, post_only, fok, ioc, optimal_limit_ioc
3023
3026
  // 'ordType': type, // privatePostTradeOrderAlgo: conditional, oco, trigger, move_order_stop, iceberg, twap
3024
- 'sz': this.amountToPrecision(symbol, amount),
3027
+ // 'sz': this.amountToPrecision (symbol, amount),
3025
3028
  // 'px': this.priceToPrecision (symbol, price), // limit orders only
3026
3029
  // 'reduceOnly': false,
3027
3030
  //
@@ -3037,14 +3040,20 @@ export default class okx extends Exchange {
3037
3040
  // 'slTriggerPxType': 'last', // Conditional default is last, mark or index (conditional orders)
3038
3041
  // 'slOrdPx': 10, // Order price for Stop-Loss orders, if -1 will be executed at market price (conditional orders)
3039
3042
  };
3043
+ const isConditionalOrOCO = conditional || (type === 'oco');
3044
+ const closeFraction = this.safeString(params, 'closeFraction');
3045
+ const shouldOmitSize = isConditionalOrOCO && closeFraction !== undefined;
3046
+ if (!shouldOmitSize) {
3047
+ request['sz'] = this.amountToPrecision(symbol, amount);
3048
+ }
3040
3049
  const spot = market['spot'];
3041
3050
  const contract = market['contract'];
3042
3051
  const triggerPrice = this.safeValueN(params, ['triggerPrice', 'stopPrice', 'triggerPx']);
3043
3052
  const timeInForce = this.safeString(params, 'timeInForce', 'GTC');
3044
- const takeProfitPrice = this.safeValue2(params, 'takeProfitPrice', 'tpTriggerPx');
3053
+ // const takeProfitPrice = this.safeValue2 (params, 'takeProfitPrice', 'tpTriggerPx');
3045
3054
  const tpOrdPx = this.safeValue(params, 'tpOrdPx', price);
3046
3055
  const tpTriggerPxType = this.safeString(params, 'tpTriggerPxType', 'last');
3047
- const stopLossPrice = this.safeValue2(params, 'stopLossPrice', 'slTriggerPx');
3056
+ // const stopLossPrice = this.safeValue2 (params, 'stopLossPrice', 'slTriggerPx');
3048
3057
  const slOrdPx = this.safeValue(params, 'slOrdPx', price);
3049
3058
  const slTriggerPxType = this.safeString(params, 'slTriggerPxType', 'last');
3050
3059
  const clientOrderId = this.safeString2(params, 'clOrdId', 'clientOrderId');
@@ -3057,7 +3066,7 @@ export default class okx extends Exchange {
3057
3066
  const trailingPrice = this.safeString2(params, 'trailingPrice', 'callbackSpread');
3058
3067
  const isTrailingPriceOrder = trailingPrice !== undefined;
3059
3068
  const trigger = (triggerPrice !== undefined) || (type === 'trigger');
3060
- const isReduceOnly = this.safeValue(params, 'reduceOnly', false);
3069
+ const isReduceOnly = this.safeValue(params, 'reduceOnly', false) || (closeFraction !== undefined);
3061
3070
  const defaultMarginMode = this.safeString2(this.options, 'defaultMarginMode', 'marginMode', 'cross');
3062
3071
  let marginMode = this.safeString2(params, 'marginMode', 'tdMode'); // cross or isolated, tdMode not ommited so as to be extended into the request
3063
3072
  let margin = false;
@@ -3112,7 +3121,7 @@ export default class okx extends Exchange {
3112
3121
  params = this.omit(params, ['currency', 'ccy', 'marginMode', 'timeInForce', 'stopPrice', 'triggerPrice', 'clientOrderId', 'stopLossPrice', 'takeProfitPrice', 'slOrdPx', 'tpOrdPx', 'margin', 'stopLoss', 'takeProfit', 'trailingPercent']);
3113
3122
  const ioc = (timeInForce === 'IOC') || (type === 'ioc');
3114
3123
  const fok = (timeInForce === 'FOK') || (type === 'fok');
3115
- const conditional = (stopLossPrice !== undefined) || (takeProfitPrice !== undefined) || (type === 'conditional');
3124
+ // const conditional = (stopLossPrice !== undefined) || (takeProfitPrice !== undefined) || (type === 'conditional');
3116
3125
  const marketIOC = (isMarketOrder && ioc) || (type === 'optimal_limit_ioc');
3117
3126
  const defaultTgtCcy = this.safeString(this.options, 'tgtCcy', 'base_ccy');
3118
3127
  const tgtCcy = this.safeString(params, 'tgtCcy', defaultTgtCcy);
@@ -986,7 +986,7 @@ export default class apex extends apexRest {
986
986
  await client.send({ 'args': [timeStamp.toString()], 'op': 'pong' });
987
987
  }
988
988
  catch (e) {
989
- const error = new NetworkError(this.id + ' handlePing failed with error ' + this.json(e));
989
+ const error = new NetworkError(this.id + ' handlePing failed with error ' + this.exceptionMessage(e));
990
990
  client.reset(error);
991
991
  }
992
992
  }
@@ -1001,7 +1001,7 @@ export default class apex extends apexRest {
1001
1001
  //
1002
1002
  // { pong: 1653296711335 }
1003
1003
  //
1004
- client.lastPong = this.safeInteger(message, 'pong');
1004
+ client.lastPong = this.safeInteger(message, 'pong', this.milliseconds());
1005
1005
  return message;
1006
1006
  }
1007
1007
  handlePing(client, message) {
@@ -976,7 +976,7 @@ export default class ascendex extends ascendexRest {
976
976
  await client.send({ 'op': 'pong', 'hp': this.safeInteger(message, 'hp') });
977
977
  }
978
978
  catch (e) {
979
- const error = new NetworkError(this.id + ' handlePing failed with error ' + this.json(e));
979
+ const error = new NetworkError(this.id + ' handlePing failed with error ' + this.exceptionMessage(e));
980
980
  client.reset(error);
981
981
  }
982
982
  }
@@ -0,0 +1,273 @@
1
+ import asterRest from '../aster.js';
2
+ import type { Strings, Tickers, Dict, Ticker, Int, Market, Trade, OrderBook, OHLCV } from '../base/types.js';
3
+ import Client from '../base/ws/Client.js';
4
+ export default class aster extends asterRest {
5
+ describe(): any;
6
+ getAccountTypeFromSubscriptions(subscriptions: string[]): string;
7
+ /**
8
+ * @method
9
+ * @name aster#watchTicker
10
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
11
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#full-ticker-per-symbol
12
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#individual-symbol-ticker-streams
13
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
14
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
15
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
16
+ */
17
+ watchTicker(symbol: string, params?: {}): Promise<Ticker>;
18
+ /**
19
+ * @method
20
+ * @name aster#unWatchTicker
21
+ * @description unWatches a price ticker
22
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#full-ticker-per-symbol
23
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#individual-symbol-ticker-streams
24
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
25
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
26
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
27
+ */
28
+ unWatchTicker(symbol: string, params?: {}): Promise<any>;
29
+ /**
30
+ * @method
31
+ * @name aster#watchTickers
32
+ * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
33
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#full-ticker-per-symbol
34
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#individual-symbol-ticker-streams
35
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
36
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
37
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
38
+ */
39
+ watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
40
+ /**
41
+ * @method
42
+ * @name aster#unWatchTickers
43
+ * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
44
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#full-ticker-per-symbol
45
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#individual-symbol-ticker-streams
46
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
47
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
48
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
49
+ */
50
+ unWatchTickers(symbols?: Strings, params?: {}): Promise<any>;
51
+ /**
52
+ * @method
53
+ * @name aster#watchMarkPrice
54
+ * @description watches a mark price for a specific market
55
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#mark-price-stream
56
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
57
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
58
+ * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
59
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
60
+ */
61
+ watchMarkPrice(symbol: string, params?: {}): Promise<Ticker>;
62
+ /**
63
+ * @method
64
+ * @name aster#unWatchMarkPrice
65
+ * @description unWatches a mark price for a specific market
66
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#mark-price-stream
67
+ * @param {string} symbol unified symbol of the market to fetch the ticker for
68
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
69
+ * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
70
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
71
+ */
72
+ unWatchMarkPrice(symbol: string, params?: {}): Promise<any>;
73
+ /**
74
+ * @method
75
+ * @name aster#watchMarkPrices
76
+ * @description watches the mark price for all markets
77
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#mark-price-stream
78
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
79
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
80
+ * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
81
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
82
+ */
83
+ watchMarkPrices(symbols?: Strings, params?: {}): Promise<Tickers>;
84
+ /**
85
+ * @method
86
+ * @name aster#unWatchMarkPrices
87
+ * @description watches the mark price for all markets
88
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#mark-price-stream
89
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
90
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
91
+ * @param {boolean} [params.use1sFreq] *default is true* if set to true, the mark price will be updated every second, otherwise every 3 seconds
92
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
93
+ */
94
+ unWatchMarkPrices(symbols?: Strings, params?: {}): Promise<any>;
95
+ handleTicker(client: Client, message: any): void;
96
+ parseWsTicker(message: any, marketType: any): Ticker;
97
+ /**
98
+ * @method
99
+ * @name aster#watchBidsAsks
100
+ * @description watches best bid & ask for symbols
101
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#best-order-book-information-by-symbol
102
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#individual-symbol-book-ticker-streams
103
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
104
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
105
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
106
+ */
107
+ watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
108
+ /**
109
+ * @method
110
+ * @name aster#unWatchBidsAsks
111
+ * @description unWatches best bid & ask for symbols
112
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#best-order-book-information-by-symbol
113
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#individual-symbol-book-ticker-streams
114
+ * @param {string[]} symbols unified symbol of the market to fetch the ticker for
115
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
116
+ * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
117
+ */
118
+ unWatchBidsAsks(symbols?: Strings, params?: {}): Promise<any>;
119
+ handleBidAsk(client: Client, message: any): void;
120
+ parseWsBidAsk(message: any, market?: any): Ticker;
121
+ /**
122
+ * @method
123
+ * @name aster#watchTrades
124
+ * @description watches information on multiple trades made in a market
125
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#collection-transaction-flow
126
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#aggregate-trade-streams
127
+ * @param {string} symbol unified market symbol of the market trades were made in
128
+ * @param {int} [since] the earliest time in ms to fetch trades for
129
+ * @param {int} [limit] the maximum number of trade structures to retrieve
130
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
131
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
132
+ */
133
+ watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
134
+ /**
135
+ * @method
136
+ * @name aster#unWatchTrades
137
+ * @description unsubscribe from the trades channel
138
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#collection-transaction-flow
139
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#aggregate-trade-streams
140
+ * @param {string} symbol unified market symbol of the market trades were made in
141
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
142
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=trade-structure}
143
+ */
144
+ unWatchTrades(symbol: string, params?: {}): Promise<any>;
145
+ /**
146
+ * @method
147
+ * @name aster#watchTradesForSymbols
148
+ * @description get the list of most recent trades for a list of symbols
149
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#collection-transaction-flow
150
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#aggregate-trade-streams
151
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
152
+ * @param {int} [since] timestamp in ms of the earliest trade to fetch
153
+ * @param {int} [limit] the maximum amount of trades to fetch
154
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
155
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
156
+ */
157
+ watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
158
+ /**
159
+ * @method
160
+ * @name aster#unWatchTradesForSymbols
161
+ * @description unsubscribe from the trades channel
162
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#collection-transaction-flow
163
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#aggregate-trade-streams
164
+ * @param {string[]} symbols unified symbol of the market to fetch trades for
165
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
166
+ * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
167
+ */
168
+ unWatchTradesForSymbols(symbols: string[], params?: {}): Promise<any>;
169
+ handleTrade(client: Client, message: any): void;
170
+ parseWsTrade(trade: Dict, market?: Market): Trade;
171
+ /**
172
+ * @method
173
+ * @name aster#watchOrderBook
174
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
175
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#limited-depth-information
176
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#partial-book-depth-streams
177
+ * @param {string} symbol unified symbol of the market to fetch the order book for
178
+ * @param {int} [limit] the maximum amount of order book entries to return.
179
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
180
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
181
+ */
182
+ watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
183
+ /**
184
+ * @method
185
+ * @name aster#unWatchOrderBook
186
+ * @description unsubscribe from the orderbook channel
187
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#limited-depth-information
188
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#partial-book-depth-streams
189
+ * @param {string} symbol symbol of the market to unwatch the trades for
190
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
191
+ * @param {int} [params.limit] orderbook limit, default is undefined
192
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
193
+ */
194
+ unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
195
+ /**
196
+ * @method
197
+ * @name aster#watchOrderBookForSymbols
198
+ * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
199
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#limited-depth-information
200
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#partial-book-depth-streams
201
+ * @param {string[]} symbols unified array of symbols
202
+ * @param {int} [limit] the maximum amount of order book entries to return.
203
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
204
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
205
+ */
206
+ watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
207
+ /**
208
+ * @method
209
+ * @name aster#unWatchOrderBookForSymbols
210
+ * @description unsubscribe from the orderbook channel
211
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#limited-depth-information
212
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#partial-book-depth-streams
213
+ * @param {string[]} symbols unified symbol of the market to unwatch the trades for
214
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
215
+ * @param {int} [params.limit] orderbook limit, default is undefined
216
+ * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
217
+ */
218
+ unWatchOrderBookForSymbols(symbols: string[], params?: {}): Promise<any>;
219
+ handleOrderBook(client: Client, message: any): void;
220
+ /**
221
+ * @method
222
+ * @name aster#watchOHLCV
223
+ * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
224
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#k-line-streams
225
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#klinecandlestick-streams
226
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
227
+ * @param {string} timeframe the length of time each candle represents
228
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
229
+ * @param {int} [limit] the maximum amount of candles to fetch
230
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
231
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
232
+ */
233
+ watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
234
+ /**
235
+ * @method
236
+ * @name aster#unWatchOHLCV
237
+ * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
238
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#k-line-streams
239
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#klinecandlestick-streams
240
+ * @param {string} symbol unified symbol of the market to fetch OHLCV data for
241
+ * @param {string} timeframe the length of time each candle represents
242
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
243
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
244
+ */
245
+ unWatchOHLCV(symbol: string, timeframe?: string, params?: {}): Promise<any>;
246
+ /**
247
+ * @method
248
+ * @name aster#watchOHLCVForSymbols
249
+ * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
250
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#k-line-streams
251
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#klinecandlestick-streams
252
+ * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
253
+ * @param {int} [since] timestamp in ms of the earliest candle to fetch
254
+ * @param {int} [limit] the maximum amount of candles to fetch
255
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
256
+ * @returns {object} A list of candles ordered as timestamp, open, high, low, close, volume
257
+ */
258
+ watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<import("../base/types.js").Dictionary<import("../base/types.js").Dictionary<OHLCV[]>>>;
259
+ /**
260
+ * @method
261
+ * @name aster#unWatchOHLCVForSymbols
262
+ * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
263
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-spot-api.md#k-line-streams
264
+ * @see https://github.com/asterdex/api-docs/blob/master/aster-finance-futures-api.md#klinecandlestick-streams
265
+ * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
266
+ * @param {object} [params] extra parameters specific to the exchange API endpoint
267
+ * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
268
+ */
269
+ unWatchOHLCVForSymbols(symbolsAndTimeframes: string[][], params?: {}): Promise<any>;
270
+ handleOHLCV(client: Client, message: any): void;
271
+ parseWsOHLCV(ohlcv: any, market?: any): OHLCV;
272
+ handleMessage(client: Client, message: any): void;
273
+ }