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.
- package/README.md +9 -12
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -12
- package/dist/cjs/src/abstract/kucoinfutures.js +1 -1
- package/dist/cjs/src/base/Exchange.js +36 -3
- package/dist/cjs/src/base/functions/encode.js +2 -2
- package/dist/cjs/src/base/functions/generic.js +8 -2
- package/dist/cjs/src/bitrue.js +1 -1
- package/dist/cjs/src/bitteam.js +1 -1
- package/dist/cjs/src/btcbox.js +1 -1
- package/dist/cjs/src/cex.js +1 -0
- package/dist/cjs/src/gate.js +227 -168
- package/dist/cjs/src/grvt.js +3 -2
- package/dist/cjs/src/hyperliquid.js +16 -5
- package/dist/cjs/src/kraken.js +2 -2
- package/dist/cjs/src/krakenfutures.js +1 -5
- package/dist/cjs/src/kucoin.js +4729 -970
- package/dist/cjs/src/kucoinfutures.js +14 -3434
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/poloniex.js +1 -1
- package/dist/cjs/src/pro/gate.js +37 -1
- package/dist/cjs/src/pro/kucoin.js +819 -178
- package/dist/cjs/src/pro/kucoinfutures.js +95 -1261
- package/dist/cjs/src/pro/mexc.js +10 -5
- package/dist/cjs/src/pro/okx.js +84 -39
- package/js/ccxt.d.ts +2 -14
- package/js/ccxt.js +2 -10
- package/js/src/abstract/kucoin.d.ts +46 -3
- package/js/src/abstract/kucoinfutures.d.ts +27 -12
- package/js/src/base/Exchange.d.ts +12 -1
- package/js/src/base/Exchange.js +36 -3
- package/js/src/base/functions/encode.js +2 -2
- package/js/src/base/functions/generic.js +9 -3
- package/js/src/bitrue.js +1 -1
- package/js/src/bitteam.js +1 -1
- package/js/src/btcbox.js +1 -1
- package/js/src/cex.js +2 -1
- package/js/src/gate.d.ts +125 -119
- package/js/src/gate.js +227 -168
- package/js/src/grvt.js +3 -2
- package/js/src/hyperliquid.d.ts +3 -1
- package/js/src/hyperliquid.js +16 -5
- package/js/src/kraken.js +2 -2
- package/js/src/krakenfutures.js +1 -5
- package/js/src/kucoin.d.ts +696 -100
- package/js/src/kucoin.js +4730 -971
- package/js/src/kucoinfutures.d.ts +4 -522
- package/js/src/kucoinfutures.js +14 -3434
- package/js/src/lbank.js +1 -1
- package/js/src/poloniex.js +1 -1
- package/js/src/pro/gate.d.ts +30 -1
- package/js/src/pro/gate.js +37 -1
- package/js/src/pro/kucoin.d.ts +70 -30
- package/js/src/pro/kucoin.js +821 -180
- package/js/src/pro/kucoinfutures.d.ts +17 -195
- package/js/src/pro/kucoinfutures.js +96 -1262
- package/js/src/pro/mexc.js +10 -5
- package/js/src/pro/okx.d.ts +1 -0
- package/js/src/pro/okx.js +84 -39
- package/package.json +1 -1
- package/dist/cjs/src/abstract/alp.js +0 -11
- package/dist/cjs/src/abstract/defx.js +0 -11
- package/dist/cjs/src/abstract/timex.js +0 -11
- package/dist/cjs/src/alp.js +0 -1059
- package/dist/cjs/src/defx.js +0 -2142
- package/dist/cjs/src/pro/defx.js +0 -866
- package/dist/cjs/src/timex.js +0 -1793
- package/js/src/abstract/alp.d.ts +0 -21
- package/js/src/abstract/alp.js +0 -5
- package/js/src/abstract/defx.d.ts +0 -72
- package/js/src/abstract/defx.js +0 -5
- package/js/src/abstract/timex.d.ts +0 -65
- package/js/src/abstract/timex.js +0 -5
- package/js/src/alp.d.ts +0 -209
- package/js/src/alp.js +0 -1052
- package/js/src/defx.d.ts +0 -348
- package/js/src/defx.js +0 -2135
- package/js/src/pro/defx.d.ts +0 -236
- package/js/src/pro/defx.js +0 -859
- package/js/src/timex.d.ts +0 -247
- package/js/src/timex.js +0 -1786
|
@@ -1,205 +1,27 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
export default class kucoinfutures extends kucoinfuturesRest {
|
|
1
|
+
import kucoin from './kucoin.js';
|
|
2
|
+
import type { Strings, TransferEntry } from '../base/types.js';
|
|
3
|
+
export default class kucoinfutures extends kucoin {
|
|
5
4
|
describe(): any;
|
|
6
|
-
negotiate(privateChannel: any, params?: {}): Promise<any>;
|
|
7
|
-
negotiateHelper(privateChannel: any, params?: {}): Promise<string>;
|
|
8
|
-
requestId(): any;
|
|
9
|
-
subscribe(url: any, messageHash: any, subscriptionHash: any, subscription: any, params?: {}): Promise<any>;
|
|
10
|
-
subscribeMultiple(url: any, messageHashes: any, topic: any, subscriptionHashes: any, subscriptionArgs: any, params?: {}): Promise<any>;
|
|
11
|
-
unSubscribeMultiple(url: any, messageHashes: any, topic: any, subscriptionHashes: any, params?: {}, subscription?: Dict): Promise<any>;
|
|
12
5
|
/**
|
|
13
6
|
* @method
|
|
14
|
-
* @name kucoinfutures#
|
|
15
|
-
* @description
|
|
16
|
-
* @
|
|
17
|
-
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
7
|
+
* @name kucoinfutures#fetchBidsAsks
|
|
8
|
+
* @description fetches the bid and ask price and volume for multiple markets
|
|
9
|
+
* @param {string[]} [symbols] unified symbols of the markets to fetch the bids and asks for, all markets are returned if not assigned
|
|
18
10
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
19
|
-
* @returns {object} a [ticker
|
|
11
|
+
* @returns {object} a dictionary of [ticker structures]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
20
12
|
*/
|
|
21
|
-
|
|
13
|
+
fetchBidsAsks(symbols?: Strings, params?: {}): Promise<import("../base/types.js").Tickers>;
|
|
22
14
|
/**
|
|
23
15
|
* @method
|
|
24
|
-
* @name kucoinfutures#
|
|
25
|
-
* @description
|
|
26
|
-
* @param {string
|
|
16
|
+
* @name kucoinfutures#transfer
|
|
17
|
+
* @description transfer currency internally between wallets on the same account
|
|
18
|
+
* @param {string} code unified currency code
|
|
19
|
+
* @param {float} amount amount to transfer
|
|
20
|
+
* @param {string} fromAccount account to transfer from
|
|
21
|
+
* @param {string} toAccount account to transfer to
|
|
27
22
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
28
|
-
* @returns {object} a [
|
|
23
|
+
* @returns {object} a [transfer structure]{@link https://docs.ccxt.com/?id=transfer-structure}
|
|
29
24
|
*/
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @method
|
|
34
|
-
* @name kucoinfutures#watchBidsAsks
|
|
35
|
-
* @see https://www.kucoin.com/docs/websocket/futures-trading/public-channels/get-ticker-v2
|
|
36
|
-
* @description watches best bid & ask for symbols
|
|
37
|
-
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
38
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
39
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
40
|
-
*/
|
|
41
|
-
watchBidsAsks(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
42
|
-
watchMultiRequest(methodName: any, channelName: string, symbols?: Strings, params?: {}): Promise<any>;
|
|
43
|
-
handleBidAsk(client: Client, message: any): void;
|
|
44
|
-
parseWsBidAsk(ticker: any, market?: any): Ticker;
|
|
45
|
-
/**
|
|
46
|
-
* @method
|
|
47
|
-
* @name kucoinfutures#watchPosition
|
|
48
|
-
* @description watch open positions for a specific symbol
|
|
49
|
-
* @see https://docs.kucoin.com/futures/#position-change-events
|
|
50
|
-
* @param {string|undefined} symbol unified market symbol
|
|
51
|
-
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
52
|
-
* @returns {object} a [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
|
|
53
|
-
*/
|
|
54
|
-
watchPosition(symbol?: Str, params?: {}): Promise<Position>;
|
|
55
|
-
getCurrentPosition(symbol: any): any;
|
|
56
|
-
setPositionCache(client: Client, symbol: string): void;
|
|
57
|
-
loadPositionSnapshot(client: any, messageHash: any, symbol: any): Promise<void>;
|
|
58
|
-
handlePosition(client: Client, message: any): void;
|
|
59
|
-
/**
|
|
60
|
-
* @method
|
|
61
|
-
* @name kucoinfutures#watchTrades
|
|
62
|
-
* @description get the list of most recent trades for a particular symbol
|
|
63
|
-
* @see https://docs.kucoin.com/futures/#execution-data
|
|
64
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
65
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
66
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
67
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
68
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
|
|
69
|
-
*/
|
|
70
|
-
watchTrades(symbol: string, since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
71
|
-
/**
|
|
72
|
-
* @method
|
|
73
|
-
* @name kucoinfutures#watchTradesForSymbols
|
|
74
|
-
* @description get the list of most recent trades for a particular symbol
|
|
75
|
-
* @param {string[]} symbols
|
|
76
|
-
* @param {int} [since] timestamp in ms of the earliest trade to fetch
|
|
77
|
-
* @param {int} [limit] the maximum amount of trades to fetch
|
|
78
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
79
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
|
|
80
|
-
*/
|
|
81
|
-
watchTradesForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Trade[]>;
|
|
82
|
-
/**
|
|
83
|
-
* @method
|
|
84
|
-
* @name kucoinfutures#unWatchTrades
|
|
85
|
-
* @description unWatches trades stream
|
|
86
|
-
* @see https://docs.kucoin.com/futures/#execution-data
|
|
87
|
-
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
88
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
89
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
|
|
90
|
-
*/
|
|
91
|
-
unWatchTrades(symbol: string, params?: {}): Promise<any>;
|
|
92
|
-
/**
|
|
93
|
-
* @method
|
|
94
|
-
* @name kucoinfutures#unWatchTradesForSymbols
|
|
95
|
-
* @description get the list of most recent trades for a particular symbol
|
|
96
|
-
* @param {string[]} symbols
|
|
97
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
98
|
-
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/?id=public-trades}
|
|
99
|
-
*/
|
|
100
|
-
unWatchTradesForSymbols(symbols: string[], params?: {}): Promise<any>;
|
|
101
|
-
handleTrade(client: Client, message: any): any;
|
|
102
|
-
/**
|
|
103
|
-
* @method
|
|
104
|
-
* @name kucoinfutures#watchOHLCV
|
|
105
|
-
* @see https://www.kucoin.com/docs/websocket/futures-trading/public-channels/klines
|
|
106
|
-
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
107
|
-
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
108
|
-
* @param {string} timeframe the length of time each candle represents
|
|
109
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
110
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
111
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
112
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
113
|
-
*/
|
|
114
|
-
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
115
|
-
handleOHLCV(client: Client, message: any): void;
|
|
116
|
-
/**
|
|
117
|
-
* @method
|
|
118
|
-
* @name kucoinfutures#watchOrderBook
|
|
119
|
-
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
120
|
-
* 1. After receiving the websocket Level 2 data flow, cache the data.
|
|
121
|
-
* 2. Initiate a REST request to get the snapshot data of Level 2 order book.
|
|
122
|
-
* 3. Playback the cached Level 2 data flow.
|
|
123
|
-
* 4. Apply the new Level 2 data flow to the local snapshot to ensure that the sequence of the new Level 2 update lines up with the sequence of the previous Level 2 data. Discard all the message prior to that sequence, and then playback the change to snapshot.
|
|
124
|
-
* 5. Update the level2 full data based on sequence according to the size. If the price is 0, ignore the messages and update the sequence. If the size=0, update the sequence and remove the price of which the size is 0 out of level 2. For other cases, please update the price.
|
|
125
|
-
* 6. If the sequence of the newly pushed message does not line up to the sequence of the last message, you could pull through REST Level 2 message request to get the updated messages. Please note that the difference between the start and end parameters cannot exceed 500.
|
|
126
|
-
* @see https://docs.kucoin.com/futures/#level-2-market-data
|
|
127
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
128
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
129
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
130
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
131
|
-
*/
|
|
132
|
-
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
133
|
-
/**
|
|
134
|
-
* @method
|
|
135
|
-
* @name kucoinfutures#watchOrderBookForSymbols
|
|
136
|
-
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
137
|
-
* @see https://docs.kucoin.com/futures/#level-2-market-data
|
|
138
|
-
* @param {string[]} symbols unified array of symbols
|
|
139
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
140
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
141
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
142
|
-
*/
|
|
143
|
-
watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
|
|
144
|
-
/**
|
|
145
|
-
* @method
|
|
146
|
-
* @name kucoinfutures#unWatchOrderBook
|
|
147
|
-
* @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
148
|
-
* @see https://docs.kucoin.com/futures/#level-2-market-data
|
|
149
|
-
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
150
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
151
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
152
|
-
*/
|
|
153
|
-
unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
|
|
154
|
-
/**
|
|
155
|
-
* @method
|
|
156
|
-
* @name kucoinfutures#unWatchOrderBookForSymbols
|
|
157
|
-
* @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
158
|
-
* @param {string[]} symbols unified array of symbols
|
|
159
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
160
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
161
|
-
*/
|
|
162
|
-
unWatchOrderBookForSymbols(symbols: string[], params?: {}): Promise<any>;
|
|
163
|
-
handleDelta(orderbook: any, delta: any): void;
|
|
164
|
-
handleDeltas(bookside: any, deltas: any): void;
|
|
165
|
-
handleOrderBook(client: Client, message: any): void;
|
|
166
|
-
getCacheIndex(orderbook: any, cache: any): any;
|
|
167
|
-
handleSystemStatus(client: Client, message: any): any;
|
|
168
|
-
/**
|
|
169
|
-
* @method
|
|
170
|
-
* @name kucoinfutures#watchOrders
|
|
171
|
-
* @description watches information on multiple orders made by the user
|
|
172
|
-
* @see https://docs.kucoin.com/futures/#trade-orders-according-to-the-market
|
|
173
|
-
* @param {string} symbol unified market symbol of the market orders were made in
|
|
174
|
-
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
175
|
-
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
176
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
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
|
-
parseWsOrderStatus(status: any): string;
|
|
181
|
-
parseWsOrder(order: any, market?: any): Order;
|
|
182
|
-
handleOrder(client: Client, message: any): void;
|
|
183
|
-
/**
|
|
184
|
-
* @method
|
|
185
|
-
* @name kucoinfutures#watchBalance
|
|
186
|
-
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
187
|
-
* @see https://docs.kucoin.com/futures/#account-balance-events
|
|
188
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
189
|
-
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
|
|
190
|
-
*/
|
|
191
|
-
watchBalance(params?: {}): Promise<Balances>;
|
|
192
|
-
handleBalance(client: Client, message: any): void;
|
|
193
|
-
handleBalanceSubscription(client: Client, message: any, subscription: any): void;
|
|
194
|
-
fetchBalanceSnapshot(client: any, message: any): Promise<void>;
|
|
195
|
-
handleSubject(client: Client, message: any): void;
|
|
196
|
-
getMessageHash(elementName: string, symbol?: Str): string;
|
|
197
|
-
ping(client: Client): {
|
|
198
|
-
id: any;
|
|
199
|
-
type: string;
|
|
200
|
-
};
|
|
201
|
-
handlePong(client: Client, message: any): any;
|
|
202
|
-
handleErrorMessage(client: Client, message: any): Bool;
|
|
203
|
-
handleSubscriptionStatus(client: Client, message: any): void;
|
|
204
|
-
handleMessage(client: Client, message: any): void;
|
|
25
|
+
transfer(code: string, amount: number, fromAccount: string, toAccount: string, params?: {}): Promise<TransferEntry>;
|
|
26
|
+
parseTransferType(transferType: any): string;
|
|
205
27
|
}
|