ccxt 4.0.66 → 4.0.67
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 -12
- package/dist/ccxt.browser.js +14 -6
- package/dist/ccxt.browser.min.js +2 -2
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/bitget.js +8 -1
- package/dist/cjs/src/bybit.js +2 -2
- package/dist/cjs/src/pro/bybit.js +3 -2
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/bitget.js +8 -1
- package/js/src/bybit.js +2 -2
- package/js/src/pro/bybit.js +3 -2
- package/package.json +1 -1
package/dist/cjs/ccxt.js
CHANGED
|
@@ -180,7 +180,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
180
180
|
|
|
181
181
|
//-----------------------------------------------------------------------------
|
|
182
182
|
// this is updated by vss.js when building
|
|
183
|
-
const version = '4.0.
|
|
183
|
+
const version = '4.0.67';
|
|
184
184
|
Exchange["default"].ccxtVersion = version;
|
|
185
185
|
const exchanges = {
|
|
186
186
|
'ace': ace,
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -2451,8 +2451,9 @@ class bitget extends bitget$1 {
|
|
|
2451
2451
|
'symbol': market['id'],
|
|
2452
2452
|
};
|
|
2453
2453
|
const until = this.safeInteger2(params, 'until', 'till');
|
|
2454
|
+
const limitIsUndefined = (limit === undefined);
|
|
2454
2455
|
if (limit === undefined) {
|
|
2455
|
-
limit =
|
|
2456
|
+
limit = 200;
|
|
2456
2457
|
}
|
|
2457
2458
|
request['limit'] = limit;
|
|
2458
2459
|
const marketType = market['spot'] ? 'spot' : 'swap';
|
|
@@ -2498,6 +2499,9 @@ class bitget extends bitget$1 {
|
|
|
2498
2499
|
const method = this.safeString(params, 'method', defaultSpotMethod);
|
|
2499
2500
|
params = this.omit(params, 'method');
|
|
2500
2501
|
if (method === 'publicSpotGetMarketCandles') {
|
|
2502
|
+
if (limitIsUndefined) {
|
|
2503
|
+
request['limit'] = 1000;
|
|
2504
|
+
}
|
|
2501
2505
|
response = await this.publicSpotGetMarketCandles(this.extend(request, params));
|
|
2502
2506
|
}
|
|
2503
2507
|
else if (method === 'publicSpotGetMarketHistoryCandles') {
|
|
@@ -2517,6 +2521,9 @@ class bitget extends bitget$1 {
|
|
|
2517
2521
|
response = await this.publicMixGetMarketHistoryIndexCandles(this.extend(request, params));
|
|
2518
2522
|
}
|
|
2519
2523
|
else if (swapMethod === 'publicMixGetMarketCandles') {
|
|
2524
|
+
if (limitIsUndefined) {
|
|
2525
|
+
request['limit'] = 1000;
|
|
2526
|
+
}
|
|
2520
2527
|
response = await this.publicMixGetMarketCandles(this.extend(request, params));
|
|
2521
2528
|
}
|
|
2522
2529
|
else if (swapMethod === 'publicMixGetMarketHistoryCandles') {
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -2081,10 +2081,10 @@ class bybit extends bybit$1 {
|
|
|
2081
2081
|
// "change24h": "86"
|
|
2082
2082
|
// }
|
|
2083
2083
|
//
|
|
2084
|
+
const isSpot = this.safeString(ticker, 'openInterestValue') === undefined;
|
|
2084
2085
|
const timestamp = this.safeInteger(ticker, 'time');
|
|
2085
2086
|
const marketId = this.safeString(ticker, 'symbol');
|
|
2086
|
-
const
|
|
2087
|
-
const type = this.safeString(market, 'type', defaultType);
|
|
2087
|
+
const type = isSpot ? 'spot' : 'contract';
|
|
2088
2088
|
market = this.safeMarket(marketId, market, undefined, type);
|
|
2089
2089
|
const symbol = this.safeSymbol(marketId, market, undefined, type);
|
|
2090
2090
|
const last = this.safeString(ticker, 'lastPrice');
|
|
@@ -283,7 +283,8 @@ class bybit extends bybit$1 {
|
|
|
283
283
|
const topic = this.safeString(message, 'topic', '');
|
|
284
284
|
const updateType = this.safeString(message, 'type', '');
|
|
285
285
|
const data = this.safeValue(message, 'data', {});
|
|
286
|
-
const isSpot = this.safeString(data, '
|
|
286
|
+
const isSpot = this.safeString(data, 'openInterestValue') === undefined;
|
|
287
|
+
const type = isSpot ? 'spot' : 'contract';
|
|
287
288
|
let symbol = undefined;
|
|
288
289
|
let parsed = undefined;
|
|
289
290
|
if ((updateType === 'snapshot') || isSpot) {
|
|
@@ -294,7 +295,7 @@ class bybit extends bybit$1 {
|
|
|
294
295
|
const topicParts = topic.split('.');
|
|
295
296
|
const topicLength = topicParts.length;
|
|
296
297
|
const marketId = this.safeString(topicParts, topicLength - 1);
|
|
297
|
-
const market = this.
|
|
298
|
+
const market = this.safeMarket(marketId, undefined, undefined, type);
|
|
298
299
|
symbol = market['symbol'];
|
|
299
300
|
// update the info in place
|
|
300
301
|
const ticker = this.safeValue(this.tickers, symbol, {});
|
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 { Market, Trade, Fee, Ticker, OrderBook, Order, Transaction, Tickers, Currency, Balance, DepositAddress, WithdrawalResponse, DepositAddressResponse, OHLCV, Balances, PartialBalances, Dictionary, MinMax } from './src/base/types.js';
|
|
6
6
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
|
|
7
|
-
declare const version = "4.0.
|
|
7
|
+
declare const version = "4.0.66";
|
|
8
8
|
import ace from './src/ace.js';
|
|
9
9
|
import alpaca from './src/alpaca.js';
|
|
10
10
|
import ascendex from './src/ascendex.js';
|
package/js/ccxt.js
CHANGED
|
@@ -38,7 +38,7 @@ import * as errors from './src/base/errors.js';
|
|
|
38
38
|
import { BaseError, ExchangeError, PermissionDenied, AccountNotEnabled, AccountSuspended, ArgumentsRequired, BadRequest, BadSymbol, MarginModeAlreadySet, BadResponse, NullResponse, InsufficientFunds, InvalidAddress, InvalidOrder, OrderNotFound, OrderNotCached, CancelPending, OrderImmediatelyFillable, OrderNotFillable, DuplicateOrderId, NotSupported, NetworkError, DDoSProtection, RateLimitExceeded, ExchangeNotAvailable, OnMaintenance, InvalidNonce, RequestTimeout, AuthenticationError, AddressPending } from './src/base/errors.js';
|
|
39
39
|
//-----------------------------------------------------------------------------
|
|
40
40
|
// this is updated by vss.js when building
|
|
41
|
-
const version = '4.0.
|
|
41
|
+
const version = '4.0.67';
|
|
42
42
|
Exchange.ccxtVersion = version;
|
|
43
43
|
//-----------------------------------------------------------------------------
|
|
44
44
|
import ace from './src/ace.js';
|
package/js/src/bitget.js
CHANGED
|
@@ -2454,8 +2454,9 @@ export default class bitget extends Exchange {
|
|
|
2454
2454
|
'symbol': market['id'],
|
|
2455
2455
|
};
|
|
2456
2456
|
const until = this.safeInteger2(params, 'until', 'till');
|
|
2457
|
+
const limitIsUndefined = (limit === undefined);
|
|
2457
2458
|
if (limit === undefined) {
|
|
2458
|
-
limit =
|
|
2459
|
+
limit = 200;
|
|
2459
2460
|
}
|
|
2460
2461
|
request['limit'] = limit;
|
|
2461
2462
|
const marketType = market['spot'] ? 'spot' : 'swap';
|
|
@@ -2501,6 +2502,9 @@ export default class bitget extends Exchange {
|
|
|
2501
2502
|
const method = this.safeString(params, 'method', defaultSpotMethod);
|
|
2502
2503
|
params = this.omit(params, 'method');
|
|
2503
2504
|
if (method === 'publicSpotGetMarketCandles') {
|
|
2505
|
+
if (limitIsUndefined) {
|
|
2506
|
+
request['limit'] = 1000;
|
|
2507
|
+
}
|
|
2504
2508
|
response = await this.publicSpotGetMarketCandles(this.extend(request, params));
|
|
2505
2509
|
}
|
|
2506
2510
|
else if (method === 'publicSpotGetMarketHistoryCandles') {
|
|
@@ -2520,6 +2524,9 @@ export default class bitget extends Exchange {
|
|
|
2520
2524
|
response = await this.publicMixGetMarketHistoryIndexCandles(this.extend(request, params));
|
|
2521
2525
|
}
|
|
2522
2526
|
else if (swapMethod === 'publicMixGetMarketCandles') {
|
|
2527
|
+
if (limitIsUndefined) {
|
|
2528
|
+
request['limit'] = 1000;
|
|
2529
|
+
}
|
|
2523
2530
|
response = await this.publicMixGetMarketCandles(this.extend(request, params));
|
|
2524
2531
|
}
|
|
2525
2532
|
else if (swapMethod === 'publicMixGetMarketHistoryCandles') {
|
package/js/src/bybit.js
CHANGED
|
@@ -2084,10 +2084,10 @@ export default class bybit extends Exchange {
|
|
|
2084
2084
|
// "change24h": "86"
|
|
2085
2085
|
// }
|
|
2086
2086
|
//
|
|
2087
|
+
const isSpot = this.safeString(ticker, 'openInterestValue') === undefined;
|
|
2087
2088
|
const timestamp = this.safeInteger(ticker, 'time');
|
|
2088
2089
|
const marketId = this.safeString(ticker, 'symbol');
|
|
2089
|
-
const
|
|
2090
|
-
const type = this.safeString(market, 'type', defaultType);
|
|
2090
|
+
const type = isSpot ? 'spot' : 'contract';
|
|
2091
2091
|
market = this.safeMarket(marketId, market, undefined, type);
|
|
2092
2092
|
const symbol = this.safeSymbol(marketId, market, undefined, type);
|
|
2093
2093
|
const last = this.safeString(ticker, 'lastPrice');
|
package/js/src/pro/bybit.js
CHANGED
|
@@ -286,7 +286,8 @@ export default class bybit extends bybitRest {
|
|
|
286
286
|
const topic = this.safeString(message, 'topic', '');
|
|
287
287
|
const updateType = this.safeString(message, 'type', '');
|
|
288
288
|
const data = this.safeValue(message, 'data', {});
|
|
289
|
-
const isSpot = this.safeString(data, '
|
|
289
|
+
const isSpot = this.safeString(data, 'openInterestValue') === undefined;
|
|
290
|
+
const type = isSpot ? 'spot' : 'contract';
|
|
290
291
|
let symbol = undefined;
|
|
291
292
|
let parsed = undefined;
|
|
292
293
|
if ((updateType === 'snapshot') || isSpot) {
|
|
@@ -297,7 +298,7 @@ export default class bybit extends bybitRest {
|
|
|
297
298
|
const topicParts = topic.split('.');
|
|
298
299
|
const topicLength = topicParts.length;
|
|
299
300
|
const marketId = this.safeString(topicParts, topicLength - 1);
|
|
300
|
-
const market = this.
|
|
301
|
+
const market = this.safeMarket(marketId, undefined, undefined, type);
|
|
301
302
|
symbol = market['symbol'];
|
|
302
303
|
// update the info in place
|
|
303
304
|
const ticker = this.safeValue(this.tickers, symbol, {});
|
package/package.json
CHANGED