ccxt 4.5.45 → 4.5.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 (91) hide show
  1. package/README.md +5 -6
  2. package/dist/ccxt.browser.min.js +3 -3
  3. package/dist/cjs/ccxt.js +1 -6
  4. package/dist/cjs/src/aftermath.js +1 -1
  5. package/dist/cjs/src/backpack.js +1 -1
  6. package/dist/cjs/src/base/Exchange.js +27 -0
  7. package/dist/cjs/src/binance.js +23 -17
  8. package/dist/cjs/src/bitfinex.js +6 -11
  9. package/dist/cjs/src/bitget.js +9 -4
  10. package/dist/cjs/src/bitmart.js +144 -21
  11. package/dist/cjs/src/bitmex.js +46 -0
  12. package/dist/cjs/src/bitstamp.js +14 -1
  13. package/dist/cjs/src/bittrade.js +1 -1
  14. package/dist/cjs/src/blofin.js +137 -29
  15. package/dist/cjs/src/bybit.js +58 -56
  16. package/dist/cjs/src/bydfi.js +102 -100
  17. package/dist/cjs/src/gate.js +37 -2
  18. package/dist/cjs/src/hollaex.js +1 -1
  19. package/dist/cjs/src/kraken.js +39 -29
  20. package/dist/cjs/src/kucoin.js +2161 -462
  21. package/dist/cjs/src/lighter.js +2 -2
  22. package/dist/cjs/src/okx.js +75 -58
  23. package/dist/cjs/src/paradex.js +2 -6
  24. package/dist/cjs/src/pro/bittrade.js +4 -0
  25. package/dist/cjs/src/pro/bydfi.js +19 -19
  26. package/dist/cjs/src/pro/gate.js +79 -54
  27. package/dist/cjs/src/pro/grvt.js +6 -4
  28. package/dist/cjs/src/pro/htx.js +4 -4
  29. package/dist/cjs/src/pro/lighter.js +1 -1
  30. package/dist/cjs/src/pro/okx.js +1 -1
  31. package/dist/cjs/src/whitebit.js +21 -2
  32. package/index.d.cts +2 -0
  33. package/js/ccxt.d.ts +2 -8
  34. package/js/ccxt.js +2 -6
  35. package/js/src/abstract/bitmart.d.ts +7 -0
  36. package/js/src/abstract/blofin.d.ts +28 -12
  37. package/js/src/abstract/bydfi.d.ts +29 -29
  38. package/js/src/abstract/kraken.d.ts +36 -29
  39. package/js/src/abstract/kucoin.d.ts +2 -0
  40. package/js/src/abstract/kucoinfutures.d.ts +2 -0
  41. package/js/src/aftermath.js +1 -1
  42. package/js/src/backpack.js +1 -1
  43. package/js/src/base/Exchange.d.ts +2 -0
  44. package/js/src/base/Exchange.js +27 -0
  45. package/js/src/binance.js +23 -17
  46. package/js/src/bitfinex.js +6 -11
  47. package/js/src/bitget.d.ts +1 -1
  48. package/js/src/bitget.js +9 -4
  49. package/js/src/bitmart.d.ts +18 -4
  50. package/js/src/bitmart.js +144 -21
  51. package/js/src/bitmex.d.ts +12 -0
  52. package/js/src/bitmex.js +46 -0
  53. package/js/src/bitstamp.js +14 -1
  54. package/js/src/bittrade.js +1 -1
  55. package/js/src/blofin.d.ts +2 -0
  56. package/js/src/blofin.js +137 -29
  57. package/js/src/bybit.d.ts +1 -0
  58. package/js/src/bybit.js +58 -56
  59. package/js/src/bydfi.d.ts +31 -31
  60. package/js/src/bydfi.js +102 -100
  61. package/js/src/gate.js +37 -2
  62. package/js/src/hollaex.js +1 -1
  63. package/js/src/kraken.js +39 -29
  64. package/js/src/kucoin.d.ts +249 -8
  65. package/js/src/kucoin.js +2161 -462
  66. package/js/src/lighter.js +2 -2
  67. package/js/src/okx.d.ts +1 -0
  68. package/js/src/okx.js +75 -58
  69. package/js/src/paradex.d.ts +0 -1
  70. package/js/src/paradex.js +2 -6
  71. package/js/src/pro/bittrade.js +4 -0
  72. package/js/src/pro/bydfi.d.ts +18 -18
  73. package/js/src/pro/bydfi.js +19 -19
  74. package/js/src/pro/gate.d.ts +2 -2
  75. package/js/src/pro/gate.js +79 -54
  76. package/js/src/pro/grvt.js +6 -4
  77. package/js/src/pro/htx.js +4 -4
  78. package/js/src/pro/lighter.js +1 -1
  79. package/js/src/pro/okx.js +1 -1
  80. package/js/src/whitebit.d.ts +1 -1
  81. package/js/src/whitebit.js +21 -2
  82. package/package.json +2 -2
  83. package/dist/cjs/src/abstract/coincatch.js +0 -11
  84. package/dist/cjs/src/coincatch.js +0 -5495
  85. package/dist/cjs/src/pro/coincatch.js +0 -1563
  86. package/js/src/abstract/coincatch.d.ts +0 -97
  87. package/js/src/abstract/coincatch.js +0 -5
  88. package/js/src/coincatch.d.ts +0 -788
  89. package/js/src/coincatch.js +0 -5488
  90. package/js/src/pro/coincatch.d.ts +0 -207
  91. package/js/src/pro/coincatch.js +0 -1556
@@ -1,207 +0,0 @@
1
- import coincatchRest from '../coincatch.js';
2
- import type { Balances, Bool, Dict, Int, Market, OHLCV, Order, OrderBook, Position, Str, Strings, Ticker, Tickers, Trade } from '../base/types.js';
3
- import Client from '../base/ws/Client.js';
4
- export default class coincatch extends coincatchRest {
5
- describe(): any;
6
- getMarketFromArg(entry: any): import("../base/types.js").MarketInterface;
7
- authenticate(params?: {}): Promise<any>;
8
- watchPublic(messageHash: any, subscribeHash: any, args: any, params?: {}): Promise<any>;
9
- unWatchPublic(messageHash: any, args: any, params?: {}): Promise<any>;
10
- watchPrivate(messageHash: any, subscribeHash: any, args: any, params?: {}): Promise<any>;
11
- watchPrivateMultiple(messageHashes: any, subscribeHashes: any, args: any, params?: {}): Promise<any>;
12
- handleAuthenticate(client: Client, message: any): void;
13
- watchPublicMultiple(messageHashes: any, subscribeHashes: any, argsArray: any, params?: {}): Promise<any>;
14
- unWatchChannel(symbol: string, channel: string, messageHashTopic: string, params?: {}): Promise<any>;
15
- getPublicInstTypeAndId(market: Market): any[];
16
- handleDMCBLMarketByMessageHashes(market: Market, hash: string, client: Client, timeframe?: Str): import("../base/types.js").MarketInterface;
17
- /**
18
- * @method
19
- * @name coincatch#watchTicker
20
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
21
- * @see https://coincatch.github.io/github.io/en/spot/#tickers-channel
22
- * @param {string} symbol unified symbol of the market to fetch the ticker for
23
- * @param {object} [params] extra parameters specific to the exchange API endpoint
24
- * @param {string} [params.instType] the type of the instrument to fetch the ticker for, 'SP' for spot markets, 'MC' for futures markets (default is 'SP')
25
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
26
- */
27
- watchTicker(symbol: string, params?: {}): Promise<Ticker>;
28
- /**
29
- * @method
30
- * @name coincatch#unWatchTicker
31
- * @description unsubscribe from the ticker channel
32
- * @see https://coincatch.github.io/github.io/en/mix/#tickers-channel
33
- * @param {string} symbol unified symbol of the market to unwatch the ticker for
34
- * @param {object} [params] extra parameters specific to the exchange API endpoint
35
- * @returns {any} status of the unwatch request
36
- */
37
- unWatchTicker(symbol: string, params?: {}): Promise<any>;
38
- /**
39
- * @method
40
- * @name coincatch#watchTickers
41
- * @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
42
- * @see https://coincatch.github.io/github.io/en/mix/#tickers-channel
43
- * @param {string[]} symbols unified symbol of the market to watch the tickers for
44
- * @param {object} [params] extra parameters specific to the exchange API endpoint
45
- * @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
46
- */
47
- watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
48
- handleTicker(client: Client, message: any): void;
49
- parseWsTicker(ticker: any, market?: any): Ticker;
50
- /**
51
- * @method
52
- * @name coincatch#watchOHLCV
53
- * @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
54
- * @see https://coincatch.github.io/github.io/en/spot/#candlesticks-channel
55
- * @param {string} symbol unified symbol of the market to fetch OHLCV data for
56
- * @param {string} timeframe the length of time each candle represents
57
- * @param {int} [since] timestamp in ms of the earliest candle to fetch (not including)
58
- * @param {int} [limit] the maximum amount of candles to fetch (not including)
59
- * @param {object} [params] extra parameters specific to the exchange API endpoint
60
- * @param {bool} [params.instType] the type of the instrument to fetch the OHLCV data for, 'SP' for spot markets, 'MC' for futures markets (default is 'SP')
61
- * @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
62
- */
63
- watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
64
- /**
65
- * @method
66
- * @name coincatch#unWatchOHLCV
67
- * @description unsubscribe from the ohlcv channel
68
- * @see https://www.bitget.com/api-doc/spot/websocket/public/Candlesticks-Channel
69
- * @param {string} symbol unified symbol of the market to unwatch the ohlcv for
70
- * @param timeframe
71
- * @param {object} [params] extra parameters specific to the exchange API endpoint
72
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
73
- */
74
- unWatchOHLCV(symbol: string, timeframe?: string, params?: {}): Promise<any>;
75
- handleOHLCV(client: Client, message: any): void;
76
- parseWsOHLCV(ohlcv: any, market?: Market): OHLCV;
77
- /**
78
- * @method
79
- * @name coincatch#watchOrderBook
80
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
81
- * @see https://coincatch.github.io/github.io/en/spot/#depth-channel
82
- * @param {string} symbol unified symbol of the market to fetch the order book for
83
- * @param {int} [limit] the maximum amount of order book entries to return
84
- * @param {object} [params] extra parameters specific to the exchange API endpoint
85
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
86
- */
87
- watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
88
- /**
89
- * @method
90
- * @name coincatch#unWatchOrderBook
91
- * @description unsubscribe from the orderbook channel
92
- * @see https://coincatch.github.io/github.io/en/spot/#depth-channel
93
- * @param {string} symbol unified symbol of the market to fetch the order book for
94
- * @param {object} [params] extra parameters specific to the exchange API endpoint
95
- * @param {int} [params.limit] orderbook limit, default is undefined
96
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
97
- */
98
- unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
99
- /**
100
- * @method
101
- * @name coincatch#watchOrderBookForSymbols
102
- * @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
103
- * @see https://coincatch.github.io/github.io/en/spot/#depth-channel
104
- * @param symbols
105
- * @param {int} [limit] the maximum amount of order book entries to return
106
- * @param {object} [params] extra parameters specific to the exchange API endpoint
107
- * @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
108
- */
109
- watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
110
- handleOrderBook(client: Client, message: any): void;
111
- handleCheckSumError(client: Client, symbol: string, messageHash: string): Promise<void>;
112
- handleDelta(bookside: any, delta: any): void;
113
- handleDeltas(bookside: any, deltas: any): void;
114
- /**
115
- * @method
116
- * @name coincatch#watchTrades
117
- * @description get the list of most recent trades for a particular symbol
118
- * @see https://coincatch.github.io/github.io/en/spot/#trades-channel
119
- * @param {string} symbol unified symbol of the market to fetch trades for
120
- * @param {int} [since] timestamp in ms of the earliest trade to fetch
121
- * @param {int} [limit] the maximum amount of trades to fetch
122
- * @param {object} [params] extra parameters specific to the exchange API endpoint
123
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
124
- */
125
- watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
126
- /**
127
- * @method
128
- * @name coincatch#watchTradesForSymbols
129
- * @description watches information on multiple trades made in a market
130
- * @see https://coincatch.github.io/github.io/en/spot/#trades-channel
131
- * @param symbols
132
- * @param {int} [since] the earliest time in ms to fetch orders for
133
- * @param {int} [limit] the maximum number of trade structures to retrieve
134
- * @param {object} [params] extra parameters specific to the exchange API endpoint
135
- * @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=trade-structure}
136
- */
137
- watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
138
- /**
139
- * @method
140
- * @name coincatch#unWatchTrades
141
- * @description unsubscribe from the trades channel
142
- * @see https://coincatch.github.io/github.io/en/spot/#trades-channel
143
- * @param {string} symbol unified symbol of the market to unwatch the trades for
144
- * @param {object} [params] extra parameters specific to the exchange API endpoint
145
- * @returns {any} status of the unwatch request
146
- */
147
- unWatchTrades(symbol: string, params?: {}): Promise<any>;
148
- handleTrades(client: Client, message: any): void;
149
- parseWsTrade(trade: any, market?: any): Trade;
150
- /**
151
- * @method
152
- * @name coincatch#watchBalance
153
- * @description watch balance and get the amount of funds available for trading or funds locked in orders
154
- * @see https://coincatch.github.io/github.io/en/spot/#account-channel
155
- * @see https://coincatch.github.io/github.io/en/mix/#account-channel
156
- * @param {object} [params] extra parameters specific to the exchange API endpoint
157
- * @param {str} [params.type] 'spot' or 'swap' (default is 'spot')
158
- * @param {string} [params.instType] *swap only* 'umcbl' or 'dmcbl' (default is 'umcbl')
159
- * @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
160
- */
161
- watchBalance(params?: {}): Promise<Balances>;
162
- handleBalance(client: Client, message: any): void;
163
- /**
164
- * @method
165
- * @name coincatch#watchOrders
166
- * @description watches information on multiple orders made by the user
167
- * @see https://coincatch.github.io/github.io/en/spot/#order-channel
168
- * @see https://coincatch.github.io/github.io/en/mix/#order-channel
169
- * @see https://coincatch.github.io/github.io/en/mix/#plan-order-channel
170
- * @param {string} symbol unified market symbol of the market orders were made in
171
- * @param {int} [since] the earliest time in ms to fetch orders for
172
- * @param {int} [limit] the maximum number of order structures to retrieve
173
- * @param {object} [params] extra parameters specific to the exchange API endpoint
174
- * @param {string} [params.type] 'spot' or 'swap'
175
- * @param {string} [params.instType] *swap only* 'umcbl' or 'dmcbl' (default is 'umcbl')
176
- * @param {bool} [params.trigger] *swap only* whether to watch trigger orders (default is false)
177
- * @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
178
- */
179
- watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
180
- handleOrder(client: Client, message: any): void;
181
- parseWsOrder(order: Dict, market?: Market): Order;
182
- /**
183
- * @method
184
- * @name coincatch#watchPositions
185
- * @description watch all open positions
186
- * @see https://coincatch.github.io/github.io/en/mix/#positions-channel
187
- * @param {string[]|undefined} symbols list of unified market symbols
188
- * @param since
189
- * @param limit
190
- * @param {object} params extra parameters specific to the exchange API endpoint
191
- * @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
192
- */
193
- watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
194
- getPrivateInstType(market: Market): "umcbl" | "dmcbl";
195
- handlePositions(client: Client, message: any): void;
196
- parseWsPosition(position: any, market?: any): Position;
197
- handleErrorMessage(client: Client, message: any): Bool;
198
- handleMessage(client: Client, message: any): void;
199
- ping(client: Client): string;
200
- handlePong(client: Client, message: any): any;
201
- handleSubscriptionStatus(client: Client, message: any): any;
202
- handleUnSubscriptionStatus(client: Client, message: any): any;
203
- handleOrderBookUnSubscription(client: Client, message: any): void;
204
- handleTradesUnSubscription(client: Client, message: any): void;
205
- handleTickerUnSubscription(client: Client, message: any): void;
206
- handleOHLCVUnSubscription(client: Client, message: any): void;
207
- }