ccxt 4.5.44 → 4.5.45

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 (81) hide show
  1. package/README.md +9 -12
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -12
  4. package/dist/cjs/src/abstract/kucoinfutures.js +1 -1
  5. package/dist/cjs/src/base/Exchange.js +36 -3
  6. package/dist/cjs/src/base/functions/encode.js +2 -2
  7. package/dist/cjs/src/base/functions/generic.js +8 -2
  8. package/dist/cjs/src/bitrue.js +1 -1
  9. package/dist/cjs/src/bitteam.js +1 -1
  10. package/dist/cjs/src/btcbox.js +1 -1
  11. package/dist/cjs/src/cex.js +1 -0
  12. package/dist/cjs/src/gate.js +227 -168
  13. package/dist/cjs/src/grvt.js +3 -2
  14. package/dist/cjs/src/hyperliquid.js +16 -5
  15. package/dist/cjs/src/kraken.js +2 -2
  16. package/dist/cjs/src/krakenfutures.js +1 -5
  17. package/dist/cjs/src/kucoin.js +4729 -970
  18. package/dist/cjs/src/kucoinfutures.js +14 -3434
  19. package/dist/cjs/src/lbank.js +1 -1
  20. package/dist/cjs/src/poloniex.js +1 -1
  21. package/dist/cjs/src/pro/gate.js +37 -1
  22. package/dist/cjs/src/pro/kucoin.js +819 -178
  23. package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
  24. package/dist/cjs/src/pro/mexc.js +10 -5
  25. package/dist/cjs/src/pro/okx.js +84 -39
  26. package/js/ccxt.d.ts +2 -14
  27. package/js/ccxt.js +2 -10
  28. package/js/src/abstract/kucoin.d.ts +46 -3
  29. package/js/src/abstract/kucoinfutures.d.ts +27 -12
  30. package/js/src/base/Exchange.d.ts +12 -1
  31. package/js/src/base/Exchange.js +36 -3
  32. package/js/src/base/functions/encode.js +2 -2
  33. package/js/src/base/functions/generic.js +9 -3
  34. package/js/src/bitrue.js +1 -1
  35. package/js/src/bitteam.js +1 -1
  36. package/js/src/btcbox.js +1 -1
  37. package/js/src/cex.js +2 -1
  38. package/js/src/gate.d.ts +125 -119
  39. package/js/src/gate.js +227 -168
  40. package/js/src/grvt.js +3 -2
  41. package/js/src/hyperliquid.d.ts +3 -1
  42. package/js/src/hyperliquid.js +16 -5
  43. package/js/src/kraken.js +2 -2
  44. package/js/src/krakenfutures.js +1 -5
  45. package/js/src/kucoin.d.ts +696 -100
  46. package/js/src/kucoin.js +4730 -971
  47. package/js/src/kucoinfutures.d.ts +4 -522
  48. package/js/src/kucoinfutures.js +14 -3434
  49. package/js/src/lbank.js +1 -1
  50. package/js/src/poloniex.js +1 -1
  51. package/js/src/pro/gate.d.ts +30 -1
  52. package/js/src/pro/gate.js +37 -1
  53. package/js/src/pro/kucoin.d.ts +70 -30
  54. package/js/src/pro/kucoin.js +821 -180
  55. package/js/src/pro/kucoinfutures.d.ts +17 -195
  56. package/js/src/pro/kucoinfutures.js +96 -1262
  57. package/js/src/pro/mexc.js +10 -5
  58. package/js/src/pro/okx.d.ts +1 -0
  59. package/js/src/pro/okx.js +84 -39
  60. package/package.json +1 -1
  61. package/dist/cjs/src/abstract/alp.js +0 -11
  62. package/dist/cjs/src/abstract/defx.js +0 -11
  63. package/dist/cjs/src/abstract/timex.js +0 -11
  64. package/dist/cjs/src/alp.js +0 -1059
  65. package/dist/cjs/src/defx.js +0 -2142
  66. package/dist/cjs/src/pro/defx.js +0 -866
  67. package/dist/cjs/src/timex.js +0 -1793
  68. package/js/src/abstract/alp.d.ts +0 -21
  69. package/js/src/abstract/alp.js +0 -5
  70. package/js/src/abstract/defx.d.ts +0 -72
  71. package/js/src/abstract/defx.js +0 -5
  72. package/js/src/abstract/timex.d.ts +0 -65
  73. package/js/src/abstract/timex.js +0 -5
  74. package/js/src/alp.d.ts +0 -209
  75. package/js/src/alp.js +0 -1052
  76. package/js/src/defx.d.ts +0 -348
  77. package/js/src/defx.js +0 -2135
  78. package/js/src/pro/defx.d.ts +0 -236
  79. package/js/src/pro/defx.js +0 -859
  80. package/js/src/timex.d.ts +0 -247
  81. package/js/src/timex.js +0 -1786
@@ -1,236 +0,0 @@
1
- import defxRest from '../defx.js';
2
- import type { Int, OHLCV, Ticker, Trade, OrderBook, Strings, Tickers, Balances, Str, Order, Position } from '../base/types.js';
3
- import Client from '../base/ws/Client.js';
4
- export default class defx extends defxRest {
5
- describe(): any;
6
- watchPublic(topics: any, messageHashes: any, params?: {}): Promise<any>;
7
- unWatchPublic(topics: any, messageHashes: any, params?: {}): Promise<any>;
8
- /**
9
- * @method
10
- * @name defx#watchOHLCV
11
- * @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
12
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
13
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
14
- * @param {string} timeframe the length of time each candle represents
15
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
16
- * @param {int} [limit] the maximum amount of candles to fetch
17
- * @param {object} [params] extra parameters specific to the exchange API endpoint
18
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
19
- */
20
- watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
21
- /**
22
- * @method
23
- * @name defx#unWatchOHLCV
24
- * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
25
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
26
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
27
- * @param {string} timeframe the length of time each candle represents
28
- * @param {object} [params] extra parameters specific to the exchange API endpoint
29
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
30
- */
31
- unWatchOHLCV(symbol: string, timeframe?: string, params?: {}): Promise<any>;
32
- /**
33
- * @method
34
- * @name defx#watchOHLCVForSymbols
35
- * @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
36
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
37
- * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
38
- * @param {int} [since] timestamp in ms of the earliest candle to fetch
39
- * @param {int} [limit] the maximum amount of candles to fetch
40
- * @param {object} [params] extra parameters specific to the exchange API endpoint
41
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
42
- */
43
- watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<import("../base/types.js").Dictionary<import("../base/types.js").Dictionary<OHLCV[]>>>;
44
- /**
45
- * @method
46
- * @name defx#unWatchOHLCVForSymbols
47
- * @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
48
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
49
- * @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
50
- * @param {object} [params] extra parameters specific to the exchange API endpoint
51
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
52
- */
53
- unWatchOHLCVForSymbols(symbolsAndTimeframes: string[][], params?: {}): Promise<any>;
54
- handleOHLCV(client: Client, message: any): void;
55
- /**
56
- * @method
57
- * @name defx#watchTicker
58
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
59
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
60
- * @param {string} symbol unified symbol of the market to fetch the ticker for
61
- * @param {object} [params] extra parameters specific to the exchange API endpoint
62
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
63
- */
64
- watchTicker(symbol: string, params?: {}): Promise<Ticker>;
65
- /**
66
- * @method
67
- * @name defx#unWatchTicker
68
- * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
69
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
70
- * @param {string} symbol unified symbol of the market to fetch the ticker for
71
- * @param {object} [params] extra parameters specific to the exchange API endpoint
72
- * @param {string} [params.channel] the channel to subscribe to, tickers by default. Can be tickers, sprd-tickers, index-tickers, block-tickers
73
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
74
- */
75
- unWatchTicker(symbol: string, params?: {}): Promise<any>;
76
- /**
77
- * @method
78
- * @name defx#watchTickers
79
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
80
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
81
- * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
82
- * @param {object} [params] extra parameters specific to the exchange API endpoint
83
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
84
- */
85
- watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
86
- /**
87
- * @method
88
- * @name defx#unWatchTickers
89
- * @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
90
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
91
- * @param {string[]} [symbols] unified symbol of the market to fetch the ticker for
92
- * @param {object} [params] extra parameters specific to the exchange API endpoint
93
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
94
- */
95
- unWatchTickers(symbols?: Strings, params?: {}): Promise<any>;
96
- handleTicker(client: Client, message: any): void;
97
- /**
98
- * @method
99
- * @name defx#watchBidsAsks
100
- * @description watches best bid & ask for symbols
101
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
102
- * @param {string[]} symbols unified symbol of the market to fetch the ticker for
103
- * @param {object} [params] extra parameters specific to the exchange API endpoint
104
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
105
- */
106
- watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
107
- handleBidAsk(client: Client, message: any): void;
108
- parseWsBidAsk(ticker: any, market?: any): Ticker;
109
- /**
110
- * @method
111
- * @name defx#watchTrades
112
- * @description watches information on multiple trades made in a market
113
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
114
- * @param {string} symbol unified symbol of the market to fetch the ticker for
115
- * @param {int} [since] the earliest time in ms to fetch trades for
116
- * @param {int} [limit] the maximum number of trade structures to retrieve
117
- * @param {object} [params] extra parameters specific to the exchange API endpoint
118
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
119
- */
120
- watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
121
- /**
122
- * @method
123
- * @name defx#unWatchTrades
124
- * @description unWatches from the stream channel
125
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
126
- * @param {string} symbol unified symbol of the market to fetch trades for
127
- * @param {object} [params] extra parameters specific to the exchange API endpoint
128
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
129
- */
130
- unWatchTrades(symbol: string, params?: {}): Promise<any>;
131
- /**
132
- * @method
133
- * @name defx#watchTradesForSymbols
134
- * @description watches information on multiple trades made in a market
135
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
136
- * @param {string[]} symbols unified symbol of the market to fetch trades for
137
- * @param {int} [since] the earliest time in ms to fetch trades for
138
- * @param {int} [limit] the maximum number of trade structures to retrieve
139
- * @param {object} [params] extra parameters specific to the exchange API endpoint
140
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
141
- */
142
- watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
143
- /**
144
- * @method
145
- * @name defx#unWatchTradesForSymbols
146
- * @description unWatches from the stream channel
147
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
148
- * @param {string[]} symbols unified symbol of the market to fetch trades for
149
- * @param {object} [params] extra parameters specific to the exchange API endpoint
150
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
151
- */
152
- unWatchTradesForSymbols(symbols: string[], params?: {}): Promise<any>;
153
- handleTrades(client: Client, message: any): void;
154
- /**
155
- * @method
156
- * @name defx#watchOrderBook
157
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
158
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
159
- * @param {string} symbol unified symbol of the market to fetch the order book for
160
- * @param {int} [limit] the maximum amount of order book entries to return
161
- * @param {object} [params] extra parameters specific to the exchange API endpoint
162
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
163
- */
164
- watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
165
- /**
166
- * @method
167
- * @name defx#unWatchOrderBook
168
- * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
169
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
170
- * @param {string} symbol unified array of symbols
171
- * @param {object} [params] extra parameters specific to the exchange API endpoint
172
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
173
- */
174
- unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
175
- /**
176
- * @method
177
- * @name defx#watchOrderBookForSymbols
178
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
179
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
180
- * @param {string[]} symbols unified array of symbols
181
- * @param {int} [limit] the maximum amount of order book entries to return
182
- * @param {object} [params] extra parameters specific to the exchange API endpoint
183
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
184
- */
185
- watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
186
- /**
187
- * @method
188
- * @name defx#unWatchOrderBookForSymbols
189
- * @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
190
- * @see https://www.postman.com/defxcode/defx-public-apis/collection/667939a1b5d8069c13d614e9
191
- * @param {string[]} symbols unified array of symbols
192
- * @param {object} [params] extra parameters specific to the exchange API endpoint
193
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
194
- */
195
- unWatchOrderBookForSymbols(symbols: string[], params?: {}): Promise<any>;
196
- handleOrderBook(client: Client, message: any): void;
197
- keepAliveListenKey(params?: {}): Promise<void>;
198
- authenticate(params?: {}): Promise<void>;
199
- /**
200
- * @method
201
- * @name defx#watchBalance
202
- * @description query for balance and get the amount of funds available for trading or funds locked in orders
203
- * @see https://www.postman.com/defxcode/defx-public-apis/ws-raw-request/667939b2f00f79161bb47809
204
- * @param {object} [params] extra parameters specific to the exchange API endpoint
205
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
206
- */
207
- watchBalance(params?: {}): Promise<Balances>;
208
- handleBalance(client: Client, message: any): void;
209
- /**
210
- * @method
211
- * @name defx#watchOrders
212
- * @description watches information on multiple orders made by the user
213
- * @see https://www.postman.com/defxcode/defx-public-apis/ws-raw-request/667939b2f00f79161bb47809
214
- * @param {string} [symbol] unified market symbol of the market the orders were made in
215
- * @param {int} [since] the earliest time in ms to fetch orders for
216
- * @param {int} [limit] the maximum number of order structures to retrieve
217
- * @param {object} [params] extra parameters specific to the exchange API endpoint
218
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
219
- */
220
- watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
221
- handleOrder(client: Client, message: any): void;
222
- /**
223
- * @method
224
- * @name defx#watchPositions
225
- * @description watch all open positions
226
- * @see https://www.postman.com/defxcode/defx-public-apis/ws-raw-request/667939b2f00f79161bb47809
227
- * @param {string[]|undefined} symbols list of unified market symbols
228
- * @param {number} [since] since timestamp
229
- * @param {number} [limit] limit
230
- * @param {object} params extra parameters specific to the exchange API endpoint
231
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
232
- */
233
- watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
234
- handlePositions(client: any, message: any): void;
235
- handleMessage(client: Client, message: any): void;
236
- }