ccxt 4.5.6 → 4.5.7
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 +3 -3
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/apex.js +2 -2
- package/dist/cjs/src/binance.js +3 -0
- package/dist/cjs/src/bitbank.js +1 -0
- package/dist/cjs/src/bitbns.js +1 -0
- package/dist/cjs/src/bitflyer.js +1 -0
- package/dist/cjs/src/bithumb.js +1 -0
- package/dist/cjs/src/bitso.js +1 -0
- package/dist/cjs/src/bitvavo.js +26 -40
- package/dist/cjs/src/blockchaincom.js +1 -0
- package/dist/cjs/src/btcalpha.js +1 -0
- package/dist/cjs/src/btcbox.js +1 -0
- package/dist/cjs/src/btcmarkets.js +1 -0
- package/dist/cjs/src/btcturk.js +1 -0
- package/dist/cjs/src/deribit.js +3 -2
- package/dist/cjs/src/digifinex.js +1 -1
- package/dist/cjs/src/gate.js +8 -12
- package/dist/cjs/src/gemini.js +3 -3
- package/dist/cjs/src/htx.js +11 -1
- package/dist/cjs/src/independentreserve.js +1 -0
- package/dist/cjs/src/indodax.js +17 -6
- package/dist/cjs/src/kraken.js +25 -6
- package/dist/cjs/src/krakenfutures.js +1 -0
- package/dist/cjs/src/mercado.js +1 -0
- package/dist/cjs/src/mexc.js +80 -36
- package/dist/cjs/src/novadax.js +1 -0
- package/dist/cjs/src/oceanex.js +1 -0
- package/dist/cjs/src/okx.js +18 -5
- package/dist/cjs/src/pro/apex.js +7 -4
- package/dist/cjs/src/pro/backpack.js +6 -4
- package/dist/cjs/src/pro/bingx.js +206 -220
- package/dist/cjs/src/pro/htx.js +1 -1
- package/dist/cjs/src/upbit.js +1 -0
- package/dist/cjs/src/wavesexchange.js +1 -0
- package/dist/cjs/src/yobit.js +1 -0
- package/dist/cjs/src/zaif.js +1 -0
- package/dist/cjs/src/zonda.js +1 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/mexc.d.ts +1 -0
- package/js/src/apex.js +2 -2
- package/js/src/binance.js +3 -0
- package/js/src/bitbank.js +1 -0
- package/js/src/bitbns.js +1 -0
- package/js/src/bitflyer.js +1 -0
- package/js/src/bithumb.js +1 -0
- package/js/src/bitso.js +1 -0
- package/js/src/bitvavo.d.ts +0 -2
- package/js/src/bitvavo.js +27 -41
- package/js/src/blockchaincom.js +1 -0
- package/js/src/btcalpha.js +1 -0
- package/js/src/btcbox.js +1 -0
- package/js/src/btcmarkets.js +1 -0
- package/js/src/btcturk.js +1 -0
- package/js/src/deribit.js +3 -2
- package/js/src/digifinex.js +1 -1
- package/js/src/gate.d.ts +2 -2
- package/js/src/gate.js +8 -12
- package/js/src/gemini.js +3 -3
- package/js/src/htx.js +11 -1
- package/js/src/independentreserve.js +1 -0
- package/js/src/indodax.js +17 -6
- package/js/src/kraken.d.ts +1 -1
- package/js/src/kraken.js +25 -6
- package/js/src/krakenfutures.js +1 -0
- package/js/src/mercado.js +1 -0
- package/js/src/mexc.d.ts +4 -1
- package/js/src/mexc.js +80 -36
- package/js/src/novadax.js +1 -0
- package/js/src/oceanex.js +1 -0
- package/js/src/okx.js +18 -5
- package/js/src/pro/apex.js +7 -4
- package/js/src/pro/backpack.js +6 -4
- package/js/src/pro/bingx.d.ts +53 -33
- package/js/src/pro/bingx.js +207 -221
- package/js/src/pro/htx.js +1 -1
- package/js/src/upbit.js +1 -0
- package/js/src/wavesexchange.js +1 -0
- package/js/src/yobit.js +1 -0
- package/js/src/zaif.js +1 -0
- package/js/src/zonda.js +1 -0
- package/package.json +1 -1
|
@@ -16,14 +16,18 @@ class bingx extends bingx$1["default"] {
|
|
|
16
16
|
'watchTrades': true,
|
|
17
17
|
'watchTradesForSymbols': false,
|
|
18
18
|
'watchOrderBook': true,
|
|
19
|
-
'watchOrderBookForSymbols':
|
|
19
|
+
'watchOrderBookForSymbols': false,
|
|
20
20
|
'watchOHLCV': true,
|
|
21
|
-
'watchOHLCVForSymbols':
|
|
21
|
+
'watchOHLCVForSymbols': false,
|
|
22
22
|
'watchOrders': true,
|
|
23
23
|
'watchMyTrades': true,
|
|
24
24
|
'watchTicker': true,
|
|
25
|
-
'watchTickers':
|
|
25
|
+
'watchTickers': false,
|
|
26
26
|
'watchBalance': true,
|
|
27
|
+
'unWatchOHLCV': true,
|
|
28
|
+
'unWatchOrderBook': true,
|
|
29
|
+
'unWatchTicker': true,
|
|
30
|
+
'unWatchTrades': true,
|
|
27
31
|
},
|
|
28
32
|
'urls': {
|
|
29
33
|
'api': {
|
|
@@ -72,12 +76,8 @@ class bingx extends bingx$1["default"] {
|
|
|
72
76
|
'awaitBalanceSnapshot': false, // whether to wait for the balance snapshot before providing updates
|
|
73
77
|
},
|
|
74
78
|
'watchOrderBook': {
|
|
75
|
-
'depth': 100,
|
|
76
|
-
'interval': 500, // 100, 200, 500, 1000
|
|
77
|
-
},
|
|
78
|
-
'watchOrderBookForSymbols': {
|
|
79
|
-
'depth': 100,
|
|
80
|
-
'interval': 500, // 100, 200, 500, 1000
|
|
79
|
+
'depth': 100, // 5, 10, 20, 50, 100
|
|
80
|
+
// 'interval': 500, // 100, 200, 500, 1000
|
|
81
81
|
},
|
|
82
82
|
'watchTrades': {
|
|
83
83
|
'ignoreDuplicates': true,
|
|
@@ -88,6 +88,43 @@ class bingx extends bingx$1["default"] {
|
|
|
88
88
|
},
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
+
async unWatch(messageHash, subMessageHash, subscribeHash, dataType, topic, market, methodName, params = {}) {
|
|
92
|
+
let marketType = undefined;
|
|
93
|
+
let subType = undefined;
|
|
94
|
+
let url = undefined;
|
|
95
|
+
[marketType, params] = this.handleMarketTypeAndParams(methodName, market, params);
|
|
96
|
+
[subType, params] = this.handleSubTypeAndParams(methodName, market, params, 'linear');
|
|
97
|
+
if (marketType === 'swap') {
|
|
98
|
+
url = this.safeString(this.urls['api']['ws'], subType);
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
url = this.safeString(this.urls['api']['ws'], marketType);
|
|
102
|
+
}
|
|
103
|
+
const id = this.uuid();
|
|
104
|
+
const request = {
|
|
105
|
+
'id': id,
|
|
106
|
+
'dataType': dataType,
|
|
107
|
+
'reqType': 'unsub',
|
|
108
|
+
};
|
|
109
|
+
const symbols = [];
|
|
110
|
+
if (market !== undefined) {
|
|
111
|
+
symbols.push(market['symbol']);
|
|
112
|
+
}
|
|
113
|
+
const subscription = {
|
|
114
|
+
'unsubscribe': true,
|
|
115
|
+
'id': id,
|
|
116
|
+
'subMessageHashes': [subMessageHash],
|
|
117
|
+
'messageHashes': [messageHash],
|
|
118
|
+
'symbols': symbols,
|
|
119
|
+
'topic': topic,
|
|
120
|
+
};
|
|
121
|
+
const symbolsAndTimeframes = this.safeList(params, 'symbolsAndTimeframes');
|
|
122
|
+
if (symbolsAndTimeframes !== undefined) {
|
|
123
|
+
subscription['symbolsAndTimeframes'] = symbolsAndTimeframes;
|
|
124
|
+
params = this.omit(params, 'symbolsAndTimeframes');
|
|
125
|
+
}
|
|
126
|
+
return await this.watch(url, messageHash, this.extend(request, params), subscribeHash, subscription);
|
|
127
|
+
}
|
|
91
128
|
/**
|
|
92
129
|
* @method
|
|
93
130
|
* @name bingx#watchTicker
|
|
@@ -113,17 +150,42 @@ class bingx extends bingx$1["default"] {
|
|
|
113
150
|
else {
|
|
114
151
|
url = this.safeString(this.urls['api']['ws'], marketType);
|
|
115
152
|
}
|
|
116
|
-
const
|
|
153
|
+
const dataType = market['id'] + '@ticker';
|
|
117
154
|
const messageHash = this.getMessageHash('ticker', market['symbol']);
|
|
118
155
|
const uuid = this.uuid();
|
|
119
156
|
const request = {
|
|
120
157
|
'id': uuid,
|
|
121
|
-
'dataType':
|
|
158
|
+
'dataType': dataType,
|
|
122
159
|
};
|
|
123
160
|
if (marketType === 'swap') {
|
|
124
161
|
request['reqType'] = 'sub';
|
|
125
162
|
}
|
|
126
|
-
|
|
163
|
+
const subscription = {
|
|
164
|
+
'unsubscribe': false,
|
|
165
|
+
'id': uuid,
|
|
166
|
+
};
|
|
167
|
+
return await this.watch(url, messageHash, this.extend(request, params), messageHash, subscription);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* @method
|
|
171
|
+
* @name bingx#unWatchTicker
|
|
172
|
+
* @description unWatches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
173
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#Subscribe%20to%2024-hour%20Price%20Change
|
|
174
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20to%2024-hour%20price%20changes
|
|
175
|
+
* @see https://bingx-api.github.io/docs/#/en-us/cswap/socket/market.html#Subscribe%20to%2024-Hour%20Price%20Change
|
|
176
|
+
* @param {string} symbol unified symbol of the market to fetch the ticker for
|
|
177
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
178
|
+
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
179
|
+
*/
|
|
180
|
+
async unWatchTicker(symbol, params = {}) {
|
|
181
|
+
await this.loadMarkets();
|
|
182
|
+
const market = this.market(symbol);
|
|
183
|
+
const dataType = market['id'] + '@ticker';
|
|
184
|
+
const subMessageHash = this.getMessageHash('ticker', market['symbol']);
|
|
185
|
+
const messageHash = 'unsubscribe::' + subMessageHash;
|
|
186
|
+
const topic = 'ticker';
|
|
187
|
+
const methodName = 'unWatchTicker';
|
|
188
|
+
return await this.unWatch(messageHash, subMessageHash, messageHash, dataType, topic, market, methodName, params);
|
|
127
189
|
}
|
|
128
190
|
handleTicker(client, message) {
|
|
129
191
|
//
|
|
@@ -244,196 +306,6 @@ class bingx extends bingx$1["default"] {
|
|
|
244
306
|
'info': message,
|
|
245
307
|
}, market);
|
|
246
308
|
}
|
|
247
|
-
/**
|
|
248
|
-
* @method
|
|
249
|
-
* @name bingx#watchTickers
|
|
250
|
-
* @description watches a price ticker, a statistical calculation with the information calculated over the past 24 hours for all markets of a specific list
|
|
251
|
-
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20to%2024-hour%20price%20changes%20of%20all%20trading%20pairs
|
|
252
|
-
* @param {string[]} symbols unified symbol of the market to watch the tickers for
|
|
253
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
254
|
-
* @returns {object} a [ticker structure]{@link https://docs.ccxt.com/#/?id=ticker-structure}
|
|
255
|
-
*/
|
|
256
|
-
async watchTickers(symbols = undefined, params = {}) {
|
|
257
|
-
await this.loadMarkets();
|
|
258
|
-
symbols = this.marketSymbols(symbols, undefined, true, true, false);
|
|
259
|
-
let firstMarket = undefined;
|
|
260
|
-
let marketType = undefined;
|
|
261
|
-
let subType = undefined;
|
|
262
|
-
const symbolsDefined = (symbols !== undefined);
|
|
263
|
-
if (symbolsDefined) {
|
|
264
|
-
firstMarket = this.market(symbols[0]);
|
|
265
|
-
}
|
|
266
|
-
[marketType, params] = this.handleMarketTypeAndParams('watchTickers', firstMarket, params);
|
|
267
|
-
[subType, params] = this.handleSubTypeAndParams('watchTickers', firstMarket, params, 'linear');
|
|
268
|
-
if (marketType === 'spot') {
|
|
269
|
-
throw new errors.NotSupported(this.id + ' watchTickers is not supported for spot markets yet');
|
|
270
|
-
}
|
|
271
|
-
if (subType === 'inverse') {
|
|
272
|
-
throw new errors.NotSupported(this.id + ' watchTickers is not supported for inverse markets yet');
|
|
273
|
-
}
|
|
274
|
-
const messageHashes = [];
|
|
275
|
-
const subscriptionHashes = ['all@ticker'];
|
|
276
|
-
if (symbolsDefined) {
|
|
277
|
-
for (let i = 0; i < symbols.length; i++) {
|
|
278
|
-
const symbol = symbols[i];
|
|
279
|
-
const market = this.market(symbol);
|
|
280
|
-
messageHashes.push(this.getMessageHash('ticker', market['symbol']));
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
else {
|
|
284
|
-
messageHashes.push(this.getMessageHash('ticker'));
|
|
285
|
-
}
|
|
286
|
-
const url = this.safeString(this.urls['api']['ws'], subType);
|
|
287
|
-
const uuid = this.uuid();
|
|
288
|
-
const request = {
|
|
289
|
-
'id': uuid,
|
|
290
|
-
'dataType': 'all@ticker',
|
|
291
|
-
};
|
|
292
|
-
if (marketType === 'swap') {
|
|
293
|
-
request['reqType'] = 'sub';
|
|
294
|
-
}
|
|
295
|
-
const result = await this.watchMultiple(url, messageHashes, this.deepExtend(request, params), subscriptionHashes);
|
|
296
|
-
if (this.newUpdates) {
|
|
297
|
-
const newDict = {};
|
|
298
|
-
newDict[result['symbol']] = result;
|
|
299
|
-
return newDict;
|
|
300
|
-
}
|
|
301
|
-
return this.tickers;
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* @method
|
|
305
|
-
* @name bingx#watchOrderBookForSymbols
|
|
306
|
-
* @description watches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
307
|
-
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20Market%20Depth%20Data%20of%20all%20trading%20pairs
|
|
308
|
-
* @param {string[]} symbols unified array of symbols
|
|
309
|
-
* @param {int} [limit] the maximum amount of order book entries to return
|
|
310
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
311
|
-
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
312
|
-
*/
|
|
313
|
-
async watchOrderBookForSymbols(symbols, limit = undefined, params = {}) {
|
|
314
|
-
symbols = this.marketSymbols(symbols, undefined, true, true, false);
|
|
315
|
-
let firstMarket = undefined;
|
|
316
|
-
let marketType = undefined;
|
|
317
|
-
let subType = undefined;
|
|
318
|
-
const symbolsDefined = (symbols !== undefined);
|
|
319
|
-
if (symbolsDefined) {
|
|
320
|
-
firstMarket = this.market(symbols[0]);
|
|
321
|
-
}
|
|
322
|
-
[marketType, params] = this.handleMarketTypeAndParams('watchOrderBookForSymbols', firstMarket, params);
|
|
323
|
-
[subType, params] = this.handleSubTypeAndParams('watchOrderBookForSymbols', firstMarket, params, 'linear');
|
|
324
|
-
if (marketType === 'spot') {
|
|
325
|
-
throw new errors.NotSupported(this.id + ' watchOrderBookForSymbols is not supported for spot markets yet');
|
|
326
|
-
}
|
|
327
|
-
if (subType === 'inverse') {
|
|
328
|
-
throw new errors.NotSupported(this.id + ' watchOrderBookForSymbols is not supported for inverse markets yet');
|
|
329
|
-
}
|
|
330
|
-
limit = this.getOrderBookLimitByMarketType(marketType, limit);
|
|
331
|
-
let interval = undefined;
|
|
332
|
-
[interval, params] = this.handleOptionAndParams(params, 'watchOrderBookForSymbols', 'interval', 500);
|
|
333
|
-
this.checkRequiredArgument('watchOrderBookForSymbols', interval, 'interval', [100, 200, 500, 1000]);
|
|
334
|
-
const channelName = 'depth' + limit.toString() + '@' + interval.toString() + 'ms';
|
|
335
|
-
const subscriptionHash = 'all@' + channelName;
|
|
336
|
-
const messageHashes = [];
|
|
337
|
-
if (symbolsDefined) {
|
|
338
|
-
for (let i = 0; i < symbols.length; i++) {
|
|
339
|
-
const symbol = symbols[i];
|
|
340
|
-
const market = this.market(symbol);
|
|
341
|
-
messageHashes.push(this.getMessageHash('orderbook', market['symbol']));
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
else {
|
|
345
|
-
messageHashes.push(this.getMessageHash('orderbook'));
|
|
346
|
-
}
|
|
347
|
-
const url = this.safeString(this.urls['api']['ws'], subType);
|
|
348
|
-
const uuid = this.uuid();
|
|
349
|
-
const request = {
|
|
350
|
-
'id': uuid,
|
|
351
|
-
'dataType': subscriptionHash,
|
|
352
|
-
};
|
|
353
|
-
if (marketType === 'swap') {
|
|
354
|
-
request['reqType'] = 'sub';
|
|
355
|
-
}
|
|
356
|
-
const subscriptionArgs = {
|
|
357
|
-
'symbols': symbols,
|
|
358
|
-
'limit': limit,
|
|
359
|
-
'interval': interval,
|
|
360
|
-
'params': params,
|
|
361
|
-
};
|
|
362
|
-
const orderbook = await this.watchMultiple(url, messageHashes, this.deepExtend(request, params), [subscriptionHash], subscriptionArgs);
|
|
363
|
-
return orderbook.limit();
|
|
364
|
-
}
|
|
365
|
-
/**
|
|
366
|
-
* @method
|
|
367
|
-
* @name bingx#watchOHLCVForSymbols
|
|
368
|
-
* @description watches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
369
|
-
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20K-Line%20Data%20of%20all%20trading%20pairs
|
|
370
|
-
* @param {string[][]} symbolsAndTimeframes array of arrays containing unified symbols and timeframes to fetch OHLCV data for, example [['BTC/USDT', '1m'], ['LTC/USDT', '5m']]
|
|
371
|
-
* @param {int} [since] timestamp in ms of the earliest candle to fetch
|
|
372
|
-
* @param {int} [limit] the maximum amount of candles to fetch
|
|
373
|
-
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
374
|
-
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
375
|
-
*/
|
|
376
|
-
async watchOHLCVForSymbols(symbolsAndTimeframes, since = undefined, limit = undefined, params = {}) {
|
|
377
|
-
const symbolsLength = symbolsAndTimeframes.length;
|
|
378
|
-
if (symbolsLength !== 0 && !Array.isArray(symbolsAndTimeframes[0])) {
|
|
379
|
-
throw new errors.ArgumentsRequired(this.id + " watchOHLCVForSymbols() requires a an array like [['BTC/USDT:USDT', '1m'], ['LTC/USDT:USDT', '5m']]");
|
|
380
|
-
}
|
|
381
|
-
await this.loadMarkets();
|
|
382
|
-
const messageHashes = [];
|
|
383
|
-
let marketType = undefined;
|
|
384
|
-
let subType = undefined;
|
|
385
|
-
let chosenTimeframe = undefined;
|
|
386
|
-
let firstMarket = undefined;
|
|
387
|
-
if (symbolsLength !== 0) {
|
|
388
|
-
let symbols = this.getListFromObjectValues(symbolsAndTimeframes, 0);
|
|
389
|
-
symbols = this.marketSymbols(symbols, undefined, true, true, false);
|
|
390
|
-
firstMarket = this.market(symbols[0]);
|
|
391
|
-
}
|
|
392
|
-
[marketType, params] = this.handleMarketTypeAndParams('watchOHLCVForSymbols', firstMarket, params);
|
|
393
|
-
[subType, params] = this.handleSubTypeAndParams('watchOHLCVForSymbols', firstMarket, params, 'linear');
|
|
394
|
-
if (marketType === 'spot') {
|
|
395
|
-
throw new errors.NotSupported(this.id + ' watchOHLCVForSymbols is not supported for spot markets yet');
|
|
396
|
-
}
|
|
397
|
-
if (subType === 'inverse') {
|
|
398
|
-
throw new errors.NotSupported(this.id + ' watchOHLCVForSymbols is not supported for inverse markets yet');
|
|
399
|
-
}
|
|
400
|
-
const marketOptions = this.safeDict(this.options, marketType);
|
|
401
|
-
const timeframes = this.safeDict(marketOptions, 'timeframes', {});
|
|
402
|
-
for (let i = 0; i < symbolsAndTimeframes.length; i++) {
|
|
403
|
-
const symbolAndTimeframe = symbolsAndTimeframes[i];
|
|
404
|
-
const sym = symbolAndTimeframe[0];
|
|
405
|
-
const tf = symbolAndTimeframe[1];
|
|
406
|
-
const market = this.market(sym);
|
|
407
|
-
const rawTimeframe = this.safeString(timeframes, tf, tf);
|
|
408
|
-
if (chosenTimeframe === undefined) {
|
|
409
|
-
chosenTimeframe = rawTimeframe;
|
|
410
|
-
}
|
|
411
|
-
else if (chosenTimeframe !== rawTimeframe) {
|
|
412
|
-
throw new errors.BadRequest(this.id + ' watchOHLCVForSymbols requires all timeframes to be the same');
|
|
413
|
-
}
|
|
414
|
-
messageHashes.push(this.getMessageHash('ohlcv', market['symbol'], chosenTimeframe));
|
|
415
|
-
}
|
|
416
|
-
const subscriptionHash = 'all@kline_' + chosenTimeframe;
|
|
417
|
-
const url = this.safeString(this.urls['api']['ws'], subType);
|
|
418
|
-
const uuid = this.uuid();
|
|
419
|
-
const request = {
|
|
420
|
-
'id': uuid,
|
|
421
|
-
'dataType': subscriptionHash,
|
|
422
|
-
};
|
|
423
|
-
if (marketType === 'swap') {
|
|
424
|
-
request['reqType'] = 'sub';
|
|
425
|
-
}
|
|
426
|
-
const subscriptionArgs = {
|
|
427
|
-
'limit': limit,
|
|
428
|
-
'params': params,
|
|
429
|
-
};
|
|
430
|
-
const [symbol, timeframe, candles] = await this.watchMultiple(url, messageHashes, request, [subscriptionHash], subscriptionArgs);
|
|
431
|
-
if (this.newUpdates) {
|
|
432
|
-
limit = candles.getLimit(symbol, limit);
|
|
433
|
-
}
|
|
434
|
-
const filtered = this.filterBySinceLimit(candles, since, limit, 0, true);
|
|
435
|
-
return this.createOHLCVObject(symbol, timeframe, filtered);
|
|
436
|
-
}
|
|
437
309
|
getOrderBookLimitByMarketType(marketType, limit = undefined) {
|
|
438
310
|
if (limit === undefined) {
|
|
439
311
|
limit = 100;
|
|
@@ -465,8 +337,8 @@ class bingx extends bingx$1["default"] {
|
|
|
465
337
|
* @method
|
|
466
338
|
* @name bingx#watchTrades
|
|
467
339
|
* @description watches information on multiple trades made in a market
|
|
468
|
-
* @see https://bingx-api.github.io/docs/#/spot/socket/market.html#
|
|
469
|
-
* @see https://bingx-api.github.io/docs/#/swapV2/socket/market.html#Subscribe%20the%20Latest%20Trade%20Detail
|
|
340
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#Subscription%20transaction%20by%20transaction
|
|
341
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20the%20Latest%20Trade%20Detail
|
|
470
342
|
* @see https://bingx-api.github.io/docs/#/en-us/cswap/socket/market.html#Subscription%20transaction%20by%20transaction
|
|
471
343
|
* @param {string} symbol unified market symbol of the market orders were made in
|
|
472
344
|
* @param {int} [since] the earliest time in ms to fetch orders for
|
|
@@ -499,7 +371,11 @@ class bingx extends bingx$1["default"] {
|
|
|
499
371
|
if (marketType === 'swap') {
|
|
500
372
|
request['reqType'] = 'sub';
|
|
501
373
|
}
|
|
502
|
-
const
|
|
374
|
+
const subscription = {
|
|
375
|
+
'unsubscribe': false,
|
|
376
|
+
'id': uuid,
|
|
377
|
+
};
|
|
378
|
+
const trades = await this.watch(url, messageHash, this.extend(request, params), messageHash, subscription);
|
|
503
379
|
if (this.newUpdates) {
|
|
504
380
|
limit = trades.getLimit(symbol, limit);
|
|
505
381
|
}
|
|
@@ -511,6 +387,28 @@ class bingx extends bingx$1["default"] {
|
|
|
511
387
|
}
|
|
512
388
|
return result;
|
|
513
389
|
}
|
|
390
|
+
/**
|
|
391
|
+
* @method
|
|
392
|
+
* @name bingx#unWatchTrades
|
|
393
|
+
* @description unsubscribes from the trades channel
|
|
394
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#Subscription%20transaction%20by%20transaction
|
|
395
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20the%20Latest%20Trade%20Detail
|
|
396
|
+
* @see https://bingx-api.github.io/docs/#/en-us/cswap/socket/market.html#Subscription%20transaction%20by%20transaction
|
|
397
|
+
* @param {string} symbol unified symbol of the market to fetch trades for
|
|
398
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
399
|
+
* @param {string} [params.name] the name of the method to call, 'trade' or 'aggTrade', default is 'trade'
|
|
400
|
+
* @returns {object[]} a list of [trade structures]{@link https://docs.ccxt.com/#/?id=public-trades}
|
|
401
|
+
*/
|
|
402
|
+
async unWatchTrades(symbol, params = {}) {
|
|
403
|
+
await this.loadMarkets();
|
|
404
|
+
const market = this.market(symbol);
|
|
405
|
+
const dataType = market['id'] + '@trade';
|
|
406
|
+
const subMessageHash = this.getMessageHash('trade', market['symbol']);
|
|
407
|
+
const messageHash = 'unsubscribe::' + subMessageHash;
|
|
408
|
+
const topic = 'trades';
|
|
409
|
+
const methodName = 'unWatchTrades';
|
|
410
|
+
return await this.unWatch(messageHash, subMessageHash, messageHash, dataType, topic, market, methodName, params);
|
|
411
|
+
}
|
|
514
412
|
handleTrades(client, message) {
|
|
515
413
|
//
|
|
516
414
|
// spot: first snapshot
|
|
@@ -645,17 +543,9 @@ class bingx extends bingx$1["default"] {
|
|
|
645
543
|
else {
|
|
646
544
|
url = this.safeString(this.urls['api']['ws'], marketType);
|
|
647
545
|
}
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
if (marketType !== 'spot') {
|
|
652
|
-
if (!market['inverse']) {
|
|
653
|
-
[interval, params] = this.handleOptionAndParams(params, 'watchOrderBook', 'interval', 500);
|
|
654
|
-
this.checkRequiredArgument('watchOrderBook', interval, 'interval', [100, 200, 500, 1000]);
|
|
655
|
-
channelName = channelName + '@' + interval.toString() + 'ms';
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
const subscriptionHash = market['id'] + '@' + channelName;
|
|
546
|
+
const options = this.safeDict(this.options, 'watchOrderBook', {});
|
|
547
|
+
const depth = this.safeInteger(options, 'depth', 100);
|
|
548
|
+
const subscriptionHash = market['id'] + '@' + 'depth' + this.numberToString(depth);
|
|
659
549
|
const messageHash = this.getMessageHash('orderbook', market['symbol']);
|
|
660
550
|
const uuid = this.uuid();
|
|
661
551
|
const request = {
|
|
@@ -668,20 +558,45 @@ class bingx extends bingx$1["default"] {
|
|
|
668
558
|
let subscriptionArgs = {};
|
|
669
559
|
if (market['inverse']) {
|
|
670
560
|
subscriptionArgs = {
|
|
561
|
+
'id': uuid,
|
|
562
|
+
'unsubscribe': false,
|
|
671
563
|
'count': limit,
|
|
672
564
|
'params': params,
|
|
673
565
|
};
|
|
674
566
|
}
|
|
675
567
|
else {
|
|
676
568
|
subscriptionArgs = {
|
|
569
|
+
'id': uuid,
|
|
570
|
+
'unsubscribe': false,
|
|
677
571
|
'level': limit,
|
|
678
|
-
'interval': interval,
|
|
679
572
|
'params': params,
|
|
680
573
|
};
|
|
681
574
|
}
|
|
682
575
|
const orderbook = await this.watch(url, messageHash, this.deepExtend(request, params), subscriptionHash, subscriptionArgs);
|
|
683
576
|
return orderbook.limit();
|
|
684
577
|
}
|
|
578
|
+
/**
|
|
579
|
+
* @method
|
|
580
|
+
* @name bingx#unWatchOrderBook
|
|
581
|
+
* @description unWatches information on open orders with bid (buy) and ask (sell) prices, volumes and other data
|
|
582
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
583
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20Market%20Depth%20Data
|
|
584
|
+
* @see https://bingx-api.github.io/docs/#/en-us/cswap/socket/market.html#Subscribe%20to%20Limited%20Depth
|
|
585
|
+
* @param {string} symbol unified symbol of the market
|
|
586
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
587
|
+
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/#/?id=order-book-structure} indexed by market symbols
|
|
588
|
+
*/
|
|
589
|
+
async unWatchOrderBook(symbol, params = {}) {
|
|
590
|
+
await this.loadMarkets();
|
|
591
|
+
const market = this.market(symbol);
|
|
592
|
+
const options = this.safeDict(this.options, 'watchOrderBook', {});
|
|
593
|
+
const depth = this.safeInteger(options, 'depth', 100);
|
|
594
|
+
const subMessageHash = market['id'] + '@' + 'depth' + this.numberToString(depth);
|
|
595
|
+
const messageHash = 'unsubscribe::' + subMessageHash;
|
|
596
|
+
const topic = 'orderbook';
|
|
597
|
+
const methodName = 'unWatchOrderBook';
|
|
598
|
+
return await this.unWatch(messageHash, subMessageHash, messageHash, subMessageHash, topic, market, methodName, params);
|
|
599
|
+
}
|
|
685
600
|
handleDelta(bookside, delta) {
|
|
686
601
|
const price = this.safeFloat2(delta, 0, 'p');
|
|
687
602
|
const amount = this.safeFloat2(delta, 1, 'a');
|
|
@@ -979,6 +894,8 @@ class bingx extends bingx$1["default"] {
|
|
|
979
894
|
request['reqType'] = 'sub';
|
|
980
895
|
}
|
|
981
896
|
const subscriptionArgs = {
|
|
897
|
+
'id': uuid,
|
|
898
|
+
'unsubscribe': false,
|
|
982
899
|
'interval': rawTimeframe,
|
|
983
900
|
'params': params,
|
|
984
901
|
};
|
|
@@ -989,6 +906,32 @@ class bingx extends bingx$1["default"] {
|
|
|
989
906
|
}
|
|
990
907
|
return this.filterBySinceLimit(ohlcv, since, limit, 0, true);
|
|
991
908
|
}
|
|
909
|
+
/**
|
|
910
|
+
* @method
|
|
911
|
+
* @name bingx#unWatchOHLCV
|
|
912
|
+
* @description unWatches historical candlestick data containing the open, high, low, and close price, and the volume of a market
|
|
913
|
+
* @see https://bingx-api.github.io/docs/#/en-us/spot/socket/market.html#K-line%20Streams
|
|
914
|
+
* @see https://bingx-api.github.io/docs/#/en-us/swapV2/socket/market.html#Subscribe%20K-Line%20Data
|
|
915
|
+
* @see https://bingx-api.github.io/docs/#/en-us/cswap/socket/market.html#Subscribe%20to%20Latest%20Trading%20Pair%20K-Line
|
|
916
|
+
* @param {string} symbol unified symbol of the market to fetch OHLCV data for
|
|
917
|
+
* @param {string} timeframe the length of time each candle represents
|
|
918
|
+
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
919
|
+
* @returns {int[][]} A list of candles ordered as timestamp, open, high, low, close, volume
|
|
920
|
+
*/
|
|
921
|
+
async unWatchOHLCV(symbol, timeframe = '1m', params = {}) {
|
|
922
|
+
await this.loadMarkets();
|
|
923
|
+
const market = this.market(symbol);
|
|
924
|
+
const options = this.safeValue(this.options, market['type'], {});
|
|
925
|
+
const timeframes = this.safeValue(options, 'timeframes', {});
|
|
926
|
+
const rawTimeframe = this.safeString(timeframes, timeframe, timeframe);
|
|
927
|
+
const subMessageHash = market['id'] + '@kline_' + rawTimeframe;
|
|
928
|
+
const messageHash = 'unsubscribe::' + subMessageHash;
|
|
929
|
+
const topic = 'ohlcv';
|
|
930
|
+
const methodName = 'unWatchOHLCV';
|
|
931
|
+
const symbolsAndTimeframes = [[market['symbol'], timeframe]];
|
|
932
|
+
params['symbolsAndTimeframes'] = symbolsAndTimeframes;
|
|
933
|
+
return await this.unWatch(messageHash, subMessageHash, messageHash, subMessageHash, topic, market, methodName, params);
|
|
934
|
+
}
|
|
992
935
|
/**
|
|
993
936
|
* @method
|
|
994
937
|
* @name bingx#watchOrders
|
|
@@ -1042,7 +985,11 @@ class bingx extends bingx$1["default"] {
|
|
|
1042
985
|
};
|
|
1043
986
|
}
|
|
1044
987
|
const url = baseUrl + '?listenKey=' + this.options['listenKey'];
|
|
1045
|
-
const
|
|
988
|
+
const subscription = {
|
|
989
|
+
'unsubscribe': false,
|
|
990
|
+
'id': uuid,
|
|
991
|
+
};
|
|
992
|
+
const orders = await this.watch(url, messageHash, request, subscriptionHash, subscription);
|
|
1046
993
|
if (this.newUpdates) {
|
|
1047
994
|
limit = orders.getLimit(symbol, limit);
|
|
1048
995
|
}
|
|
@@ -1101,7 +1048,11 @@ class bingx extends bingx$1["default"] {
|
|
|
1101
1048
|
};
|
|
1102
1049
|
}
|
|
1103
1050
|
const url = baseUrl + '?listenKey=' + this.options['listenKey'];
|
|
1104
|
-
const
|
|
1051
|
+
const subscription = {
|
|
1052
|
+
'unsubscribe': false,
|
|
1053
|
+
'id': uuid,
|
|
1054
|
+
};
|
|
1055
|
+
const trades = await this.watch(url, messageHash, request, subscriptionHash, subscription);
|
|
1105
1056
|
if (this.newUpdates) {
|
|
1106
1057
|
limit = trades.getLimit(symbol, limit);
|
|
1107
1058
|
}
|
|
@@ -1157,7 +1108,11 @@ class bingx extends bingx$1["default"] {
|
|
|
1157
1108
|
if (fetchBalanceSnapshot && awaitBalanceSnapshot) {
|
|
1158
1109
|
await client.future(type + ':fetchBalanceSnapshot');
|
|
1159
1110
|
}
|
|
1160
|
-
|
|
1111
|
+
const subscription = {
|
|
1112
|
+
'unsubscribe': false,
|
|
1113
|
+
'id': uuid,
|
|
1114
|
+
};
|
|
1115
|
+
return await this.watch(url, messageHash, request, subscriptionHash, subscription);
|
|
1161
1116
|
}
|
|
1162
1117
|
setBalanceCache(client, type, subType, subscriptionHash, params) {
|
|
1163
1118
|
if (subscriptionHash in client.subscriptions) {
|
|
@@ -1563,6 +1518,37 @@ class bingx extends bingx$1["default"] {
|
|
|
1563
1518
|
if (msgEvent === '24hTicker') {
|
|
1564
1519
|
this.handleTicker(client, message);
|
|
1565
1520
|
}
|
|
1521
|
+
if (dataType === '' && msgEvent === undefined && e === undefined) {
|
|
1522
|
+
this.handleSubscriptionStatus(client, message);
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
handleSubscriptionStatus(client, message) {
|
|
1526
|
+
//
|
|
1527
|
+
// {
|
|
1528
|
+
// "code": 0,
|
|
1529
|
+
// "id": "b6ed9cb4-f3d0-4641-ac3f-f59eb47a3abd",
|
|
1530
|
+
// "msg": "SUCCESS",
|
|
1531
|
+
// "timestamp": 1759225965363
|
|
1532
|
+
// }
|
|
1533
|
+
//
|
|
1534
|
+
const id = this.safeString(message, 'id');
|
|
1535
|
+
const subscriptionsById = this.indexBy(client.subscriptions, 'id');
|
|
1536
|
+
const subscription = this.safeDict(subscriptionsById, id, {});
|
|
1537
|
+
const isUnSubMessage = this.safeBool(subscription, 'unsubscribe', false);
|
|
1538
|
+
if (isUnSubMessage) {
|
|
1539
|
+
this.handleUnSubscription(client, subscription);
|
|
1540
|
+
}
|
|
1541
|
+
return message;
|
|
1542
|
+
}
|
|
1543
|
+
handleUnSubscription(client, subscription) {
|
|
1544
|
+
const messageHashes = this.safeList(subscription, 'messageHashes', []);
|
|
1545
|
+
const subMessageHashes = this.safeList(subscription, 'subMessageHashes', []);
|
|
1546
|
+
for (let i = 0; i < messageHashes.length; i++) {
|
|
1547
|
+
const unsubHash = messageHashes[i];
|
|
1548
|
+
const subHash = subMessageHashes[i];
|
|
1549
|
+
this.cleanUnsubscription(client, subHash, unsubHash);
|
|
1550
|
+
}
|
|
1551
|
+
this.cleanCache(subscription);
|
|
1566
1552
|
}
|
|
1567
1553
|
}
|
|
1568
1554
|
|
package/dist/cjs/src/pro/htx.js
CHANGED
|
@@ -969,7 +969,7 @@ class htx extends htx$1["default"] {
|
|
|
969
969
|
else {
|
|
970
970
|
// contract branch
|
|
971
971
|
parsedOrder = this.parseWsOrder(message, market);
|
|
972
|
-
const rawTrades = this.
|
|
972
|
+
const rawTrades = this.safeList(message, 'trade', []);
|
|
973
973
|
const tradesLength = rawTrades.length;
|
|
974
974
|
if (tradesLength > 0) {
|
|
975
975
|
const tradesObject = {
|
package/dist/cjs/src/upbit.js
CHANGED
|
@@ -54,6 +54,7 @@ class wavesexchange extends wavesexchange$1["default"] {
|
|
|
54
54
|
'fetchClosedOrders': true,
|
|
55
55
|
'fetchCrossBorrowRate': false,
|
|
56
56
|
'fetchCrossBorrowRates': false,
|
|
57
|
+
'fetchCurrencies': false,
|
|
57
58
|
'fetchDepositAddress': true,
|
|
58
59
|
'fetchDepositAddresses': undefined,
|
|
59
60
|
'fetchDepositAddressesByNetwork': undefined,
|
package/dist/cjs/src/yobit.js
CHANGED
|
@@ -54,6 +54,7 @@ class yobit extends yobit$1["default"] {
|
|
|
54
54
|
'fetchBorrowRatesPerSymbol': false,
|
|
55
55
|
'fetchCrossBorrowRate': false,
|
|
56
56
|
'fetchCrossBorrowRates': false,
|
|
57
|
+
'fetchCurrencies': false,
|
|
57
58
|
'fetchDepositAddress': true,
|
|
58
59
|
'fetchDepositAddresses': false,
|
|
59
60
|
'fetchDepositAddressesByNetwork': false,
|
package/dist/cjs/src/zaif.js
CHANGED
package/dist/cjs/src/zonda.js
CHANGED
|
@@ -50,6 +50,7 @@ class zonda extends zonda$1["default"] {
|
|
|
50
50
|
'fetchBorrowRatesPerSymbol': false,
|
|
51
51
|
'fetchCrossBorrowRate': false,
|
|
52
52
|
'fetchCrossBorrowRates': false,
|
|
53
|
+
'fetchCurrencies': false,
|
|
53
54
|
'fetchDeposit': false,
|
|
54
55
|
'fetchDepositAddress': true,
|
|
55
56
|
'fetchDepositAddresses': true,
|
package/js/ccxt.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as functions from './src/base/functions.js';
|
|
|
4
4
|
import * as errors from './src/base/errors.js';
|
|
5
5
|
import type { Int, int, Str, Strings, Num, Bool, IndexType, OrderSide, OrderType, MarketType, SubType, Dict, NullableDict, List, NullableList, Fee, OHLCV, OHLCVC, implicitReturnType, Market, Currency, Dictionary, MinMax, FeeInterface, TradingFeeInterface, MarketInterface, Trade, Order, OrderBook, Ticker, Transaction, Tickers, CurrencyInterface, Balance, BalanceAccount, Account, PartialBalances, Balances, DepositAddress, WithdrawalResponse, FundingRate, FundingRates, Position, BorrowInterest, LeverageTier, LedgerEntry, DepositWithdrawFeeNetwork, DepositWithdrawFee, TransferEntry, CrossBorrowRate, IsolatedBorrowRate, FundingRateHistory, OpenInterest, Liquidation, OrderRequest, CancellationRequest, FundingHistory, MarketMarginModes, MarginMode, Greeks, Conversion, Option, LastPrice, Leverage, MarginModification, Leverages, LastPrices, Currencies, TradingFees, MarginModes, OptionChain, IsolatedBorrowRates, CrossBorrowRates, LeverageTiers, LongShortRatio, OrderBooks, OpenInterests, ConstructorArgs } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.5.
|
|
7
|
+
declare const version = "4.5.6";
|
|
8
8
|
import alpaca from './src/alpaca.js';
|
|
9
9
|
import apex from './src/apex.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -32,7 +32,7 @@ import * as errors from './src/base/errors.js';
|
|
|
32
32
|
import { BaseError, ExchangeError, AuthenticationError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, OperationRejected, NoChange, MarginModeAlreadySet, MarketClosed, ManualInteractionNeeded, RestrictedLocation, InsufficientFunds, InvalidAddress, AddressPending, InvalidOrder, OrderNotFound, OrderNotCached, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, ContractUnavailable, NotSupported, InvalidProxySettings, ExchangeClosedByUser, OperationFailed, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, ChecksumError, RequestTimeout, BadResponse, NullResponse, CancelPending, UnsubscribeError } from './src/base/errors.js';
|
|
33
33
|
//-----------------------------------------------------------------------------
|
|
34
34
|
// this is updated by vss.js when building
|
|
35
|
-
const version = '4.5.
|
|
35
|
+
const version = '4.5.6';
|
|
36
36
|
Exchange.ccxtVersion = version;
|
|
37
37
|
//-----------------------------------------------------------------------------
|
|
38
38
|
import alpaca from './src/alpaca.js';
|
|
@@ -57,6 +57,7 @@ interface Exchange {
|
|
|
57
57
|
spotPrivateGetMxDeductEnable(params?: {}): Promise<implicitReturnType>;
|
|
58
58
|
spotPrivateGetUserDataStream(params?: {}): Promise<implicitReturnType>;
|
|
59
59
|
spotPrivateGetSelfSymbols(params?: {}): Promise<implicitReturnType>;
|
|
60
|
+
spotPrivateGetAssetInternalTransferRecord(params?: {}): Promise<implicitReturnType>;
|
|
60
61
|
spotPrivatePostOrder(params?: {}): Promise<implicitReturnType>;
|
|
61
62
|
spotPrivatePostOrderTest(params?: {}): Promise<implicitReturnType>;
|
|
62
63
|
spotPrivatePostSubAccountVirtualSubAccount(params?: {}): Promise<implicitReturnType>;
|
package/js/src/apex.js
CHANGED
|
@@ -801,9 +801,9 @@ export default class apex extends Exchange {
|
|
|
801
801
|
limit = 200; // default is 200 when requested with `since`
|
|
802
802
|
}
|
|
803
803
|
request['limit'] = limit; // max 200, default 200
|
|
804
|
-
[request, params] = this.handleUntilOption('end', request, params);
|
|
804
|
+
[request, params] = this.handleUntilOption('end', request, params, 0.001);
|
|
805
805
|
if (since !== undefined) {
|
|
806
|
-
request['start'] = since;
|
|
806
|
+
request['start'] = Math.floor(since / 1000);
|
|
807
807
|
}
|
|
808
808
|
const response = await this.publicGetV3Klines(this.extend(request, params));
|
|
809
809
|
const data = this.safeDict(response, 'data', {});
|