ccxt 4.5.29 → 4.5.31
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 +4 -4
- package/dist/ccxt.browser.min.js +18 -18
- package/dist/cjs/ccxt.js +6 -4
- package/dist/cjs/src/base/Exchange.js +16 -1
- package/dist/cjs/src/base/ws/WsClient.js +1 -0
- package/dist/cjs/src/bingx.js +1 -1
- package/dist/cjs/src/bullish.js +1 -1
- package/dist/cjs/src/bybit.js +2 -0
- package/dist/cjs/src/bydfi.js +2907 -0
- package/dist/cjs/src/coinbase.js +34 -1
- package/dist/cjs/src/dydx.js +3 -3
- package/dist/cjs/src/gate.js +55 -8
- package/dist/cjs/src/hyperliquid.js +19 -4
- package/dist/cjs/src/kucoin.js +175 -68
- package/dist/cjs/src/pro/apex.js +7 -5
- package/dist/cjs/src/pro/ascendex.js +1 -1
- package/dist/cjs/src/pro/binance.js +10 -6
- package/dist/cjs/src/pro/bingx.js +6 -4
- package/dist/cjs/src/pro/bitmart.js +5 -3
- package/dist/cjs/src/pro/bybit.js +6 -4
- package/dist/cjs/src/pro/bydfi.js +1077 -0
- package/dist/cjs/src/pro/cryptocom.js +6 -4
- package/dist/cjs/src/pro/gate.js +5 -3
- package/dist/cjs/src/pro/hashkey.js +5 -3
- package/dist/cjs/src/pro/htx.js +1 -1
- package/dist/cjs/src/pro/hyperliquid.js +1 -1
- package/dist/cjs/src/pro/kucoinfutures.js +5 -3
- package/dist/cjs/src/pro/modetrade.js +5 -3
- package/dist/cjs/src/pro/p2b.js +1 -1
- package/dist/cjs/src/pro/toobit.js +12 -8
- package/dist/cjs/src/pro/woo.js +5 -3
- package/dist/cjs/src/pro/woofipro.js +5 -3
- package/dist/cjs/src/pro/xt.js +5 -3
- package/dist/cjs/src/toobit.js +2 -1
- package/js/ccxt.d.ts +8 -5
- package/js/ccxt.js +6 -4
- package/js/src/abstract/bydfi.d.ts +52 -0
- package/js/src/abstract/kucoin.d.ts +2 -0
- package/js/src/abstract/kucoinfutures.d.ts +2 -0
- package/js/src/base/Exchange.d.ts +3 -0
- package/js/src/base/Exchange.js +16 -1
- package/js/src/base/ws/WsClient.js +1 -0
- package/js/src/binance.d.ts +1 -1
- package/js/src/bingx.js +1 -1
- package/js/src/bullish.js +1 -1
- package/js/src/bybit.js +2 -0
- package/js/src/bydfi.d.ts +472 -0
- package/js/src/bydfi.js +2905 -0
- package/js/src/coinbase.d.ts +11 -0
- package/js/src/coinbase.js +34 -1
- package/js/src/dydx.js +3 -3
- package/js/src/exmo.d.ts +1 -1
- package/js/src/gate.js +55 -8
- package/js/src/hyperliquid.d.ts +1 -0
- package/js/src/hyperliquid.js +19 -4
- package/js/src/kucoin.d.ts +19 -3
- package/js/src/kucoin.js +175 -68
- package/js/src/pro/apex.js +7 -5
- package/js/src/pro/ascendex.js +1 -1
- package/js/src/pro/binance.js +10 -6
- package/js/src/pro/bingx.js +6 -4
- package/js/src/pro/bitmart.js +5 -3
- package/js/src/pro/bybit.js +6 -4
- package/js/src/pro/bydfi.d.ts +206 -0
- package/js/src/pro/bydfi.js +1076 -0
- package/js/src/pro/cryptocom.js +6 -4
- package/js/src/pro/gate.js +5 -3
- package/js/src/pro/hashkey.js +5 -3
- package/js/src/pro/htx.js +1 -1
- package/js/src/pro/hyperliquid.js +1 -1
- package/js/src/pro/kucoinfutures.js +5 -3
- package/js/src/pro/modetrade.js +5 -3
- package/js/src/pro/p2b.js +1 -1
- package/js/src/pro/toobit.js +12 -8
- package/js/src/pro/woo.js +5 -3
- package/js/src/pro/woofipro.js +5 -3
- package/js/src/pro/xt.js +5 -3
- package/js/src/toobit.js +2 -1
- package/package.json +1 -1
- package/dist/cjs/src/oceanex.js +0 -1125
- package/js/src/abstract/oceanex.d.ts +0 -30
- package/js/src/oceanex.d.ts +0 -231
- package/js/src/oceanex.js +0 -1124
- /package/dist/cjs/src/abstract/{oceanex.js → bydfi.js} +0 -0
- /package/js/src/abstract/{oceanex.js → bydfi.js} +0 -0
package/js/src/pro/apex.js
CHANGED
|
@@ -749,9 +749,11 @@ export default class apex extends apexRest {
|
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
751
|
// don't remove the future from the .futures cache
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
752
|
+
if (messageHash in client.futures) {
|
|
753
|
+
const future = client.futures[messageHash];
|
|
754
|
+
future.resolve(cache);
|
|
755
|
+
client.resolve(cache, 'positions');
|
|
756
|
+
}
|
|
755
757
|
}
|
|
756
758
|
handlePositions(client, lists) {
|
|
757
759
|
//
|
|
@@ -984,7 +986,7 @@ export default class apex extends apexRest {
|
|
|
984
986
|
await client.send({ 'args': [timeStamp.toString()], 'op': 'pong' });
|
|
985
987
|
}
|
|
986
988
|
catch (e) {
|
|
987
|
-
const error = new NetworkError(this.id + ' handlePing failed with error ' + this.
|
|
989
|
+
const error = new NetworkError(this.id + ' handlePing failed with error ' + this.exceptionMessage(e));
|
|
988
990
|
client.reset(error);
|
|
989
991
|
}
|
|
990
992
|
}
|
|
@@ -999,7 +1001,7 @@ export default class apex extends apexRest {
|
|
|
999
1001
|
//
|
|
1000
1002
|
// { pong: 1653296711335 }
|
|
1001
1003
|
//
|
|
1002
|
-
client.lastPong = this.safeInteger(message, 'pong');
|
|
1004
|
+
client.lastPong = this.safeInteger(message, 'pong', this.milliseconds());
|
|
1003
1005
|
return message;
|
|
1004
1006
|
}
|
|
1005
1007
|
handlePing(client, message) {
|
package/js/src/pro/ascendex.js
CHANGED
|
@@ -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.
|
|
979
|
+
const error = new NetworkError(this.id + ' handlePing failed with error ' + this.exceptionMessage(e));
|
|
980
980
|
client.reset(error);
|
|
981
981
|
}
|
|
982
982
|
}
|
package/js/src/pro/binance.js
CHANGED
|
@@ -2595,9 +2595,11 @@ export default class binance extends binanceRest {
|
|
|
2595
2595
|
const response = await this.fetchBalance(params);
|
|
2596
2596
|
this.balance[type] = this.extend(response, this.safeValue(this.balance, type, {}));
|
|
2597
2597
|
// don't remove the future from the .futures cache
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2598
|
+
if (messageHash in client.futures) {
|
|
2599
|
+
const future = client.futures[messageHash];
|
|
2600
|
+
future.resolve();
|
|
2601
|
+
client.resolve(this.balance[type], type + ':balance');
|
|
2602
|
+
}
|
|
2601
2603
|
}
|
|
2602
2604
|
/**
|
|
2603
2605
|
* @method
|
|
@@ -4038,9 +4040,11 @@ export default class binance extends binanceRest {
|
|
|
4038
4040
|
}
|
|
4039
4041
|
}
|
|
4040
4042
|
// don't remove the future from the .futures cache
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4043
|
+
if (messageHash in client.futures) {
|
|
4044
|
+
const future = client.futures[messageHash];
|
|
4045
|
+
future.resolve(cache);
|
|
4046
|
+
client.resolve(cache, type + ':position');
|
|
4047
|
+
}
|
|
4044
4048
|
}
|
|
4045
4049
|
handlePositions(client, message) {
|
|
4046
4050
|
//
|
package/js/src/pro/bingx.js
CHANGED
|
@@ -1135,9 +1135,11 @@ export default class bingx extends bingxRest {
|
|
|
1135
1135
|
const response = await this.fetchBalance({ 'type': type, 'subType': subType });
|
|
1136
1136
|
this.balance[type] = this.extend(response, this.safeValue(this.balance, type, {}));
|
|
1137
1137
|
// don't remove the future from the .futures cache
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1138
|
+
if (messageHash in client.futures) {
|
|
1139
|
+
const future = client.futures[messageHash];
|
|
1140
|
+
future.resolve();
|
|
1141
|
+
client.resolve(this.balance[type], type + ':balance');
|
|
1142
|
+
}
|
|
1141
1143
|
}
|
|
1142
1144
|
handleErrorMessage(client, message) {
|
|
1143
1145
|
//
|
|
@@ -1225,7 +1227,7 @@ export default class bingx extends bingxRest {
|
|
|
1225
1227
|
}
|
|
1226
1228
|
}
|
|
1227
1229
|
catch (e) {
|
|
1228
|
-
const error = new NetworkError(this.id + ' pong failed with error ' + this.
|
|
1230
|
+
const error = new NetworkError(this.id + ' pong failed with error ' + this.exceptionMessage(e));
|
|
1229
1231
|
client.reset(error);
|
|
1230
1232
|
}
|
|
1231
1233
|
}
|
package/js/src/pro/bitmart.js
CHANGED
|
@@ -234,9 +234,11 @@ export default class bitmart extends bitmartRest {
|
|
|
234
234
|
const response = await this.fetchBalance({ 'type': type });
|
|
235
235
|
this.balance[type] = this.extend(response, this.safeValue(this.balance, type, {}));
|
|
236
236
|
// don't remove the future from the .futures cache
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
237
|
+
if (messageHash in client.futures) {
|
|
238
|
+
const future = client.futures[messageHash];
|
|
239
|
+
future.resolve();
|
|
240
|
+
client.resolve(this.balance[type], 'balance:' + type);
|
|
241
|
+
}
|
|
240
242
|
}
|
|
241
243
|
handleBalance(client, message) {
|
|
242
244
|
//
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -1522,9 +1522,11 @@ export default class bybit extends bybitRest {
|
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
1524
|
// don't remove the future from the .futures cache
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1525
|
+
if (messageHash in client.futures) {
|
|
1526
|
+
const future = client.futures[messageHash];
|
|
1527
|
+
future.resolve(cache);
|
|
1528
|
+
client.resolve(cache, 'position');
|
|
1529
|
+
}
|
|
1528
1530
|
}
|
|
1529
1531
|
handlePositions(client, message) {
|
|
1530
1532
|
//
|
|
@@ -2479,7 +2481,7 @@ export default class bybit extends bybitRest {
|
|
|
2479
2481
|
// "conn_id": "d266o6hqo29sqmnq4vk0-1yus1"
|
|
2480
2482
|
// }
|
|
2481
2483
|
//
|
|
2482
|
-
client.lastPong = this.safeInteger(message, 'pong');
|
|
2484
|
+
client.lastPong = this.safeInteger(message, 'pong', this.milliseconds());
|
|
2483
2485
|
return message;
|
|
2484
2486
|
}
|
|
2485
2487
|
handleAuthenticate(client, message) {
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import bydfiRest from '../bydfi.js';
|
|
2
|
+
import type { Balances, Dict, Int, Market, OHLCV, Order, OrderBook, Position, Str, Strings, Ticker, Tickers } from '../base/types.js';
|
|
3
|
+
import Client from '../base/ws/Client.js';
|
|
4
|
+
export default class bydfi extends bydfiRest {
|
|
5
|
+
describe(): any;
|
|
6
|
+
ping(client: Client): {
|
|
7
|
+
id: any;
|
|
8
|
+
method: string;
|
|
9
|
+
};
|
|
10
|
+
requestId(): any;
|
|
11
|
+
watchPublic(messageHashes: any, channels: any, params?: {}, subscription?: {}): Promise<any>;
|
|
12
|
+
watchPrivate(messageHashes: any, params?: {}): Promise<any>;
|
|
13
|
+
/**
|
|
14
|
+
* @method
|
|
15
|
+
* @name bydfi#watchTicker
|
|
16
|
+
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
17
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
|
|
18
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
19
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
20
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
21
|
+
*/
|
|
22
|
+
watchTicker(symbol: string, params?: {}): Promise<Ticker>;
|
|
23
|
+
/**
|
|
24
|
+
* @method
|
|
25
|
+
* @name bydfi#unWatchTicker
|
|
26
|
+
* @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for a specific market
|
|
27
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
|
|
28
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
29
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
30
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
31
|
+
*/
|
|
32
|
+
unWatchTicker(symbol: string, params?: {}): Promise<any>;
|
|
33
|
+
/**
|
|
34
|
+
* @method
|
|
35
|
+
* @name bydfi#watchTickers
|
|
36
|
+
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
37
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
|
|
38
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#market-wide-ticker
|
|
39
|
+
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
40
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
41
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
42
|
+
*/
|
|
43
|
+
watchTickers(symbols?: Strings, params?: {}): Promise<Tickers>;
|
|
44
|
+
/**
|
|
45
|
+
* @method
|
|
46
|
+
* @name bydfi#unWatchTickers
|
|
47
|
+
* @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
48
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#ticker-by-symbol
|
|
49
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#market-wide-ticker
|
|
50
|
+
* @param {string[]} symbols unified symbol of the market to fetch the ticker for
|
|
51
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
52
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/?id=ticker-structure}
|
|
53
|
+
*/
|
|
54
|
+
unWatchTickers(symbols?: Strings, params?: {}): Promise<any>;
|
|
55
|
+
getMessageHashesForTickersUnsubscription(): any[];
|
|
56
|
+
handleTicker(client: Client, message: any): void;
|
|
57
|
+
/**
|
|
58
|
+
* @method
|
|
59
|
+
* @name bydfi#watchOHLCV
|
|
60
|
+
* @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
|
|
61
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
|
|
62
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
63
|
+
* @param {string} timeframe the length of time each candle represents
|
|
64
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
65
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
66
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
67
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
68
|
+
*/
|
|
69
|
+
watchOHLCV(symbol: string, timeframe?: string, since?: Int, limit?: Int, params?: {}): Promise<OHLCV[]>;
|
|
70
|
+
/**
|
|
71
|
+
* @method
|
|
72
|
+
* @name bydfi#unWatchOHLCV
|
|
73
|
+
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
74
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
|
|
75
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
76
|
+
* @param {string} timeframe the length of time each candle represents
|
|
77
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
78
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
79
|
+
*/
|
|
80
|
+
unWatchOHLCV(symbol: string, timeframe?: string, params?: {}): Promise<any>;
|
|
81
|
+
/**
|
|
82
|
+
* @method
|
|
83
|
+
* @name bydfi#watchOHLCVForSymbols
|
|
84
|
+
* @description watches historical candlestick data containing the open, high, low, close price, and the volume of a market
|
|
85
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
|
|
86
|
+
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
87
|
+
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
88
|
+
* @param {int} [limit] the maximum amount of candles to fetch
|
|
89
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
90
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
91
|
+
*/
|
|
92
|
+
watchOHLCVForSymbols(symbolsAndTimeframes: string[][], since?: Int, limit?: Int, params?: {}): Promise<import("../base/types.js").Dictionary<import("../base/types.js").Dictionary<OHLCV[]>>>;
|
|
93
|
+
/**
|
|
94
|
+
* @method
|
|
95
|
+
* @name bydfi#unWatchOHLCVForSymbols
|
|
96
|
+
* @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
97
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#candlestick-data
|
|
98
|
+
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
99
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
100
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
101
|
+
*/
|
|
102
|
+
unWatchOHLCVForSymbols(symbolsAndTimeframes: string[][], params?: {}): Promise<any>;
|
|
103
|
+
handleOHLCV(client: Client, message: any): void;
|
|
104
|
+
/**
|
|
105
|
+
* @method
|
|
106
|
+
* @name bydfi#watchOrderBook
|
|
107
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
108
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
|
|
109
|
+
* @param {string} symbol unified symbol of the market to fetch the order book for
|
|
110
|
+
* @param {int} [limit] the maximum amount of order book entries to return (default and maxi is 100)
|
|
111
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
112
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
113
|
+
*/
|
|
114
|
+
watchOrderBook(symbol: string, limit?: Int, params?: {}): Promise<OrderBook>;
|
|
115
|
+
/**
|
|
116
|
+
* @method
|
|
117
|
+
* @name bydfi#unWatchOrderBook
|
|
118
|
+
* @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
119
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
|
|
120
|
+
* @param {string} symbol unified array of symbols
|
|
121
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
122
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
123
|
+
*/
|
|
124
|
+
unWatchOrderBook(symbol: string, params?: {}): Promise<any>;
|
|
125
|
+
/**
|
|
126
|
+
* @method
|
|
127
|
+
* @name bydfi#watchOrderBookForSymbols
|
|
128
|
+
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
129
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
|
|
130
|
+
* @param {string[]} symbols unified array of symbols
|
|
131
|
+
* @param {int} [limit] the maximum amount of order book entries to return (default and max is 100)
|
|
132
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
133
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
134
|
+
*/
|
|
135
|
+
watchOrderBookForSymbols(symbols: string[], limit?: Int, params?: {}): Promise<OrderBook>;
|
|
136
|
+
/**
|
|
137
|
+
* @method
|
|
138
|
+
* @name bydfi#unWatchOrderBookForSymbols
|
|
139
|
+
* @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
140
|
+
* @see https://developers.bydfi.com/en/swap/websocket-market#limited-depth-information
|
|
141
|
+
* @param {string[]} symbols unified array of symbols
|
|
142
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
143
|
+
* @param {string} [params.method] either '/market/level2' or '/spotMarket/level2Depth5' or '/spotMarket/level2Depth50' default is '/market/level2'
|
|
144
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/?id=order-book-structure} indexed by market symbols
|
|
145
|
+
*/
|
|
146
|
+
unWatchOrderBookForSymbols(symbols: string[], params?: {}): Promise<any>;
|
|
147
|
+
handleOrderBook(client: Client, message: any): void;
|
|
148
|
+
/**
|
|
149
|
+
* @method
|
|
150
|
+
* @name bydfi#watchOrders
|
|
151
|
+
* @description watches information on multiple orders made by the user
|
|
152
|
+
* @see https://developers.bydfi.com/en/swap/websocket-account#order-trade-update-push
|
|
153
|
+
* @param {string} symbol unified market symbol of the market orders were made in
|
|
154
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
155
|
+
* @param {int} [limit] the maximum number of order structures to retrieve
|
|
156
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
157
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
158
|
+
*/
|
|
159
|
+
watchOrders(symbol?: Str, since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
160
|
+
/**
|
|
161
|
+
* @method
|
|
162
|
+
* @name bydfi#watchOrdersForSymbols
|
|
163
|
+
* @description watches information on multiple orders made by the user
|
|
164
|
+
* @see https://developers.bydfi.com/en/swap/websocket-account#order-trade-update-push
|
|
165
|
+
* @param {string[]} symbols unified symbol of the market to fetch orders for
|
|
166
|
+
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
167
|
+
* @param {int} [limit] the maximum number of trade structures to retrieve
|
|
168
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
169
|
+
* @returns {object[]} a list of [order structures]{@link https://docs.ccxt.com/?id=order-structure}
|
|
170
|
+
*/
|
|
171
|
+
watchOrdersForSymbols(symbols: string[], since?: Int, limit?: Int, params?: {}): Promise<Order[]>;
|
|
172
|
+
handleOrder(client: Client, message: any): void;
|
|
173
|
+
parseWsOrder(order: Dict, market?: Market): Order;
|
|
174
|
+
/**
|
|
175
|
+
* @method
|
|
176
|
+
* @name bydfi#watchPositions
|
|
177
|
+
* @description watch all open positions
|
|
178
|
+
* @see https://developers.bydfi.com/en/swap/websocket-account#balance-and-position-update-push
|
|
179
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
180
|
+
* @param {int} [since] the earliest time in ms to fetch positions for
|
|
181
|
+
* @param {int} [limit] the maximum number of positions to retrieve
|
|
182
|
+
* @param {object} params extra parameters specific to the exchange API endpoint
|
|
183
|
+
* @returns {object[]} a list of [position structure]{@link https://docs.ccxt.com/en/latest/manual.html#position-structure}
|
|
184
|
+
*/
|
|
185
|
+
watchPositions(symbols?: Strings, since?: Int, limit?: Int, params?: {}): Promise<Position[]>;
|
|
186
|
+
handlePositions(client: any, message: any): void;
|
|
187
|
+
parseWsPosition(position: any, market?: any): Position;
|
|
188
|
+
parseWsPositionSide(rawPositionSide: Str): Str;
|
|
189
|
+
/**
|
|
190
|
+
* @method
|
|
191
|
+
* @name bydfi#watchBalance
|
|
192
|
+
* @description watch balance and get the amount of funds available for trading or funds locked in orders
|
|
193
|
+
* @see https://developers.bydfi.com/en/swap/websocket-account#balance-and-position-update-push
|
|
194
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
195
|
+
* @returns {object} a [balance structure]{@link https://docs.ccxt.com/?id=balance-structure}
|
|
196
|
+
*/
|
|
197
|
+
watchBalance(params?: {}): Promise<Balances>;
|
|
198
|
+
fetchBalanceSnapshot(client: Client): void;
|
|
199
|
+
loadBalanceSnapshot(client: any, messageHash: any): Promise<void>;
|
|
200
|
+
handleBalance(client: Client, message: any): void;
|
|
201
|
+
handleSubscriptionStatus(client: Client, message: any): any;
|
|
202
|
+
handleUnSubscription(client: Client, subscription: Dict): void;
|
|
203
|
+
handlePong(client: Client, message: any): any;
|
|
204
|
+
handleErrorMessage(client: Client, message: any): void;
|
|
205
|
+
handleMessage(client: Client, message: any): void;
|
|
206
|
+
}
|