ccxt 4.3.15 → 4.3.17
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/cjs/ccxt.js +1 -1
- package/dist/cjs/src/alpaca.js +1 -0
- package/dist/cjs/src/ascendex.js +1 -0
- package/dist/cjs/src/base/Exchange.js +24 -15
- package/dist/cjs/src/base/Precise.js +3 -2
- package/dist/cjs/src/base/ws/WsClient.js +4 -0
- package/dist/cjs/src/binance.js +10 -9
- package/dist/cjs/src/bingx.js +1 -0
- package/dist/cjs/src/bitmex.js +1 -0
- package/dist/cjs/src/bybit.js +11 -7
- package/dist/cjs/src/coinbaseinternational.js +1 -0
- package/dist/cjs/src/coinmetro.js +1 -0
- package/dist/cjs/src/cryptocom.js +1 -0
- package/dist/cjs/src/currencycom.js +1 -0
- package/dist/cjs/src/deribit.js +1 -0
- package/dist/cjs/src/gate.js +1 -0
- package/dist/cjs/src/gemini.js +1 -0
- package/dist/cjs/src/hitbtc.js +1 -0
- package/dist/cjs/src/hollaex.js +1 -0
- package/dist/cjs/src/hyperliquid.js +5 -0
- package/dist/cjs/src/idex.js +1 -0
- package/dist/cjs/src/krakenfutures.js +1 -0
- package/dist/cjs/src/ndax.js +1 -0
- package/dist/cjs/src/okx.js +18 -0
- package/dist/cjs/src/phemex.js +1 -0
- package/dist/cjs/src/poloniex.js +1 -0
- package/dist/cjs/src/pro/bitfinex2.js +2 -0
- package/dist/cjs/src/pro/bitget.js +3 -0
- package/dist/cjs/src/pro/bybit.js +3 -3
- package/dist/cjs/src/pro/htx.js +2 -0
- package/dist/cjs/src/pro/independentreserve.js +2 -0
- package/dist/cjs/src/pro/kraken.js +2 -0
- package/dist/cjs/src/pro/okx.js +22 -22
- package/dist/cjs/src/probit.js +1 -0
- package/dist/cjs/src/wavesexchange.js +1 -0
- package/dist/cjs/src/woo.js +1 -0
- package/dist/cjs/src/zaif.js +1 -1
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/alpaca.js +1 -0
- package/js/src/ascendex.js +1 -0
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +24 -15
- package/js/src/base/Precise.d.ts +19 -19
- package/js/src/base/Precise.js +3 -2
- package/js/src/base/errors.d.ts +37 -37
- package/js/src/base/ws/WsClient.d.ts +1 -1
- package/js/src/base/ws/WsClient.js +4 -0
- package/js/src/binance.js +10 -9
- package/js/src/bingx.js +1 -0
- package/js/src/bitmex.js +1 -0
- package/js/src/bybit.js +11 -7
- package/js/src/coinbaseinternational.js +1 -0
- package/js/src/coinmetro.js +1 -0
- package/js/src/cryptocom.js +1 -0
- package/js/src/currencycom.js +1 -0
- package/js/src/deribit.js +1 -0
- package/js/src/gate.js +1 -0
- package/js/src/gemini.js +1 -0
- package/js/src/hitbtc.js +1 -0
- package/js/src/hollaex.js +1 -0
- package/js/src/hyperliquid.js +5 -0
- package/js/src/idex.js +1 -0
- package/js/src/krakenfutures.js +1 -0
- package/js/src/kuna.d.ts +1 -1
- package/js/src/ndax.js +1 -0
- package/js/src/okx.js +19 -1
- package/js/src/phemex.js +1 -0
- package/js/src/poloniex.js +1 -0
- package/js/src/pro/bitfinex2.js +2 -0
- package/js/src/pro/bitget.js +3 -0
- package/js/src/pro/bybit.js +3 -3
- package/js/src/pro/htx.js +2 -0
- package/js/src/pro/independentreserve.js +2 -0
- package/js/src/pro/kraken.js +2 -0
- package/js/src/pro/okx.js +23 -23
- package/js/src/probit.js +1 -0
- package/js/src/wavesexchange.js +1 -0
- package/js/src/woo.js +1 -0
- package/js/src/zaif.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -213,13 +213,13 @@ console.log(version, Object.keys(exchanges));
|
|
|
213
213
|
|
|
214
214
|
All-in-one browser bundle (dependencies included), served from a CDN of your choice:
|
|
215
215
|
|
|
216
|
-
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.
|
|
217
|
-
* unpkg: https://unpkg.com/ccxt@4.3.
|
|
216
|
+
* jsDelivr: https://cdn.jsdelivr.net/npm/ccxt@4.3.17/dist/ccxt.browser.js
|
|
217
|
+
* unpkg: https://unpkg.com/ccxt@4.3.17/dist/ccxt.browser.js
|
|
218
218
|
|
|
219
219
|
CDNs are not updated in real-time and may have delays. Defaulting to the most recent version without specifying the version number is not recommended. Please, keep in mind that we are not responsible for the correct operation of those CDN servers.
|
|
220
220
|
|
|
221
221
|
```HTML
|
|
222
|
-
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.
|
|
222
|
+
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/ccxt@4.3.17/dist/ccxt.browser.js"></script>
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
Creates a global `ccxt` object:
|
package/dist/cjs/ccxt.js
CHANGED
|
@@ -182,7 +182,7 @@ var woo$1 = require('./src/pro/woo.js');
|
|
|
182
182
|
|
|
183
183
|
//-----------------------------------------------------------------------------
|
|
184
184
|
// this is updated by vss.js when building
|
|
185
|
-
const version = '4.3.
|
|
185
|
+
const version = '4.3.17';
|
|
186
186
|
Exchange["default"].ccxtVersion = version;
|
|
187
187
|
const exchanges = {
|
|
188
188
|
'ace': ace,
|
package/dist/cjs/src/alpaca.js
CHANGED
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -366,6 +366,7 @@ class Exchange {
|
|
|
366
366
|
'publicAPI': true,
|
|
367
367
|
'privateAPI': true,
|
|
368
368
|
'CORS': undefined,
|
|
369
|
+
'sandbox': undefined,
|
|
369
370
|
'spot': undefined,
|
|
370
371
|
'margin': undefined,
|
|
371
372
|
'swap': undefined,
|
|
@@ -5848,24 +5849,26 @@ class Exchange {
|
|
|
5848
5849
|
let maxRetries = undefined;
|
|
5849
5850
|
[maxRetries, params] = this.handleOptionAndParams(params, method, 'maxRetries', 3);
|
|
5850
5851
|
let errors$1 = 0;
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
catch (e) {
|
|
5860
|
-
if (e instanceof errors.RateLimitExceeded) {
|
|
5861
|
-
throw e; // if we are rate limited, we should not retry and fail fast
|
|
5852
|
+
while (errors$1 <= maxRetries) {
|
|
5853
|
+
try {
|
|
5854
|
+
if (timeframe && method !== 'fetchFundingRateHistory') {
|
|
5855
|
+
return await this[method](symbol, timeframe, since, limit, params);
|
|
5856
|
+
}
|
|
5857
|
+
else {
|
|
5858
|
+
return await this[method](symbol, since, limit, params);
|
|
5859
|
+
}
|
|
5862
5860
|
}
|
|
5863
|
-
|
|
5864
|
-
|
|
5865
|
-
|
|
5861
|
+
catch (e) {
|
|
5862
|
+
if (e instanceof errors.RateLimitExceeded) {
|
|
5863
|
+
throw e; // if we are rate limited, we should not retry and fail fast
|
|
5864
|
+
}
|
|
5865
|
+
errors$1 += 1;
|
|
5866
|
+
if (errors$1 > maxRetries) {
|
|
5867
|
+
throw e;
|
|
5868
|
+
}
|
|
5866
5869
|
}
|
|
5867
5870
|
}
|
|
5868
|
-
return
|
|
5871
|
+
return [];
|
|
5869
5872
|
}
|
|
5870
5873
|
async fetchPaginatedCallDeterministic(method, symbol = undefined, since = undefined, limit = undefined, timeframe = undefined, params = {}, maxEntriesPerRequest = undefined) {
|
|
5871
5874
|
let maxCalls = undefined;
|
|
@@ -5879,6 +5882,9 @@ class Exchange {
|
|
|
5879
5882
|
if (since !== undefined) {
|
|
5880
5883
|
currentSince = Math.max(currentSince, since);
|
|
5881
5884
|
}
|
|
5885
|
+
else {
|
|
5886
|
+
currentSince = Math.max(currentSince, 1241440531000); // avoid timestamps older than 2009
|
|
5887
|
+
}
|
|
5882
5888
|
const until = this.safeInteger2(params, 'until', 'till'); // do not omit it here
|
|
5883
5889
|
if (until !== undefined) {
|
|
5884
5890
|
const requiredCalls = Math.ceil((until - since) / step);
|
|
@@ -5890,6 +5896,9 @@ class Exchange {
|
|
|
5890
5896
|
if ((until !== undefined) && (currentSince >= until)) {
|
|
5891
5897
|
break;
|
|
5892
5898
|
}
|
|
5899
|
+
if (currentSince >= current) {
|
|
5900
|
+
break;
|
|
5901
|
+
}
|
|
5893
5902
|
tasks.push(this.safeDeterministicCall(method, symbol, currentSince, maxEntriesPerRequest, timeframe, params));
|
|
5894
5903
|
currentSince = this.sum(currentSince, step) - 1;
|
|
5895
5904
|
}
|
|
@@ -12,8 +12,9 @@ class Precise {
|
|
|
12
12
|
let modifier = 0;
|
|
13
13
|
number = number.toLowerCase();
|
|
14
14
|
if (number.indexOf('e') > -1) {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
let modifierString = '0';
|
|
16
|
+
[number, modifierString] = number.split('e');
|
|
17
|
+
modifier = parseInt(modifierString);
|
|
17
18
|
}
|
|
18
19
|
const decimalIndex = number.indexOf('.');
|
|
19
20
|
this.decimals = (decimalIndex > -1) ? number.length - decimalIndex - 1 : 0;
|
|
@@ -16,6 +16,10 @@ var WebSocket__default = /*#__PURE__*/_interopDefaultLegacy(WebSocket);
|
|
|
16
16
|
// eslint-disable-next-line no-restricted-globals
|
|
17
17
|
const WebSocketPlatform = platform.isNode ? WebSocket__default["default"] : self.WebSocket;
|
|
18
18
|
class WsClient extends Client {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
this.startedConnecting = false;
|
|
22
|
+
}
|
|
19
23
|
createConnection() {
|
|
20
24
|
if (this.verbose) {
|
|
21
25
|
this.log(new Date(), 'connecting to', this.url);
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -154,6 +154,7 @@ class binance extends binance$1 {
|
|
|
154
154
|
'reduceMargin': true,
|
|
155
155
|
'repayCrossMargin': true,
|
|
156
156
|
'repayIsolatedMargin': true,
|
|
157
|
+
'sandbox': true,
|
|
157
158
|
'setLeverage': true,
|
|
158
159
|
'setMargin': false,
|
|
159
160
|
'setMarginMode': true,
|
|
@@ -2618,7 +2619,7 @@ class binance extends binance$1 {
|
|
|
2618
2619
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
2619
2620
|
* @returns {object} an associative dictionary of currencies
|
|
2620
2621
|
*/
|
|
2621
|
-
const fetchCurrenciesEnabled = this.
|
|
2622
|
+
const fetchCurrenciesEnabled = this.safeBool(this.options, 'fetchCurrencies');
|
|
2622
2623
|
if (!fetchCurrenciesEnabled) {
|
|
2623
2624
|
return undefined;
|
|
2624
2625
|
}
|
|
@@ -4542,7 +4543,7 @@ class binance extends binance$1 {
|
|
|
4542
4543
|
market = this.safeMarket(marketId, market, undefined, marketType);
|
|
4543
4544
|
const symbol = market['symbol'];
|
|
4544
4545
|
let side = undefined;
|
|
4545
|
-
const buyerMaker = this.
|
|
4546
|
+
const buyerMaker = this.safeBool2(trade, 'm', 'isBuyerMaker');
|
|
4546
4547
|
let takerOrMaker = undefined;
|
|
4547
4548
|
if (buyerMaker !== undefined) {
|
|
4548
4549
|
side = buyerMaker ? 'sell' : 'buy'; // this is reversed intentionally
|
|
@@ -4850,7 +4851,7 @@ class binance extends binance$1 {
|
|
|
4850
4851
|
uppercaseType = 'STOP_LOSS_LIMIT';
|
|
4851
4852
|
}
|
|
4852
4853
|
}
|
|
4853
|
-
const validOrderTypes = this.
|
|
4854
|
+
const validOrderTypes = this.safeList(market['info'], 'orderTypes');
|
|
4854
4855
|
if (!this.inArray(uppercaseType, validOrderTypes)) {
|
|
4855
4856
|
if (initialUppercaseType !== uppercaseType) {
|
|
4856
4857
|
throw new errors.InvalidOrder(this.id + ' stopPrice parameter is not allowed for ' + symbol + ' ' + type + ' orders');
|
|
@@ -4860,7 +4861,7 @@ class binance extends binance$1 {
|
|
|
4860
4861
|
}
|
|
4861
4862
|
}
|
|
4862
4863
|
if (clientOrderId === undefined) {
|
|
4863
|
-
const broker = this.
|
|
4864
|
+
const broker = this.safeDict(this.options, 'broker');
|
|
4864
4865
|
if (broker !== undefined) {
|
|
4865
4866
|
const brokerId = this.safeString(broker, 'spot');
|
|
4866
4867
|
if (brokerId !== undefined) {
|
|
@@ -7659,7 +7660,7 @@ class binance extends binance$1 {
|
|
|
7659
7660
|
request['endTime'] = until;
|
|
7660
7661
|
}
|
|
7661
7662
|
const raw = await this.sapiGetFiatOrders(this.extend(request, params));
|
|
7662
|
-
response = this.
|
|
7663
|
+
response = this.safeList(raw, 'data', []);
|
|
7663
7664
|
// {
|
|
7664
7665
|
// "code": "000000",
|
|
7665
7666
|
// "message": "success",
|
|
@@ -7774,7 +7775,7 @@ class binance extends binance$1 {
|
|
|
7774
7775
|
request['beginTime'] = since;
|
|
7775
7776
|
}
|
|
7776
7777
|
const raw = await this.sapiGetFiatOrders(this.extend(request, params));
|
|
7777
|
-
response = this.
|
|
7778
|
+
response = this.safeList(raw, 'data', []);
|
|
7778
7779
|
// {
|
|
7779
7780
|
// "code": "000000",
|
|
7780
7781
|
// "message": "success",
|
|
@@ -7992,7 +7993,7 @@ class binance extends binance$1 {
|
|
|
7992
7993
|
if (txType !== undefined) {
|
|
7993
7994
|
type = (txType === '0') ? 'deposit' : 'withdrawal';
|
|
7994
7995
|
}
|
|
7995
|
-
const legalMoneyCurrenciesById = this.
|
|
7996
|
+
const legalMoneyCurrenciesById = this.safeDict(this.options, 'legalMoneyCurrenciesById');
|
|
7996
7997
|
code = this.safeString(legalMoneyCurrenciesById, code, code);
|
|
7997
7998
|
}
|
|
7998
7999
|
const status = this.parseTransactionStatusByType(this.safeString(transaction, 'status'), type);
|
|
@@ -8346,7 +8347,7 @@ class binance extends binance$1 {
|
|
|
8346
8347
|
}
|
|
8347
8348
|
}
|
|
8348
8349
|
impliedNetwork = this.safeString(reverseNetworks, topLevel);
|
|
8349
|
-
const impliedNetworks = this.
|
|
8350
|
+
const impliedNetworks = this.safeDict(this.options, 'impliedNetworks', {
|
|
8350
8351
|
'ETH': { 'ERC20': 'ETH' },
|
|
8351
8352
|
'TRX': { 'TRC20': 'TRX' },
|
|
8352
8353
|
});
|
|
@@ -9655,7 +9656,7 @@ class binance extends binance$1 {
|
|
|
9655
9656
|
await this.loadMarkets();
|
|
9656
9657
|
// by default cache the leverage bracket
|
|
9657
9658
|
// it contains useful stuff like the maintenance margin and initial margin for positions
|
|
9658
|
-
const leverageBrackets = this.
|
|
9659
|
+
const leverageBrackets = this.safeDict(this.options, 'leverageBrackets', {});
|
|
9659
9660
|
if ((leverageBrackets === undefined) || (reload)) {
|
|
9660
9661
|
const defaultType = this.safeString(this.options, 'defaultType', 'future');
|
|
9661
9662
|
const type = this.safeString(params, 'type', defaultType);
|
package/dist/cjs/src/bingx.js
CHANGED
package/dist/cjs/src/bitmex.js
CHANGED
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -119,6 +119,7 @@ class bybit extends bybit$1 {
|
|
|
119
119
|
'fetchVolatilityHistory': true,
|
|
120
120
|
'fetchWithdrawals': true,
|
|
121
121
|
'repayCrossMargin': true,
|
|
122
|
+
'sandbox': true,
|
|
122
123
|
'setLeverage': true,
|
|
123
124
|
'setMarginMode': true,
|
|
124
125
|
'setPositionMode': true,
|
|
@@ -1490,6 +1491,7 @@ class bybit extends bybit$1 {
|
|
|
1490
1491
|
// "quoteCoin": "USDT",
|
|
1491
1492
|
// "innovation": "0",
|
|
1492
1493
|
// "status": "Trading",
|
|
1494
|
+
// "marginTrading": "both",
|
|
1493
1495
|
// "lotSizeFilter": {
|
|
1494
1496
|
// "basePrecision": "0.000001",
|
|
1495
1497
|
// "quotePrecision": "0.00000001",
|
|
@@ -1526,7 +1528,9 @@ class bybit extends bybit$1 {
|
|
|
1526
1528
|
const lotSizeFilter = this.safeDict(market, 'lotSizeFilter');
|
|
1527
1529
|
const priceFilter = this.safeDict(market, 'priceFilter');
|
|
1528
1530
|
const quotePrecision = this.safeNumber(lotSizeFilter, 'quotePrecision');
|
|
1529
|
-
|
|
1531
|
+
const marginTrading = this.safeString(market, 'marginTrading', 'none');
|
|
1532
|
+
const allowsMargin = marginTrading !== 'none';
|
|
1533
|
+
result.push(this.safeMarketStructure({
|
|
1530
1534
|
'id': id,
|
|
1531
1535
|
'symbol': symbol,
|
|
1532
1536
|
'base': base,
|
|
@@ -1537,7 +1541,7 @@ class bybit extends bybit$1 {
|
|
|
1537
1541
|
'settleId': undefined,
|
|
1538
1542
|
'type': 'spot',
|
|
1539
1543
|
'spot': true,
|
|
1540
|
-
'margin':
|
|
1544
|
+
'margin': allowsMargin,
|
|
1541
1545
|
'swap': false,
|
|
1542
1546
|
'future': false,
|
|
1543
1547
|
'option': false,
|
|
@@ -1576,7 +1580,7 @@ class bybit extends bybit$1 {
|
|
|
1576
1580
|
},
|
|
1577
1581
|
'created': undefined,
|
|
1578
1582
|
'info': market,
|
|
1579
|
-
});
|
|
1583
|
+
}));
|
|
1580
1584
|
}
|
|
1581
1585
|
return result;
|
|
1582
1586
|
}
|
|
@@ -1701,7 +1705,7 @@ class bybit extends bybit$1 {
|
|
|
1701
1705
|
symbol = symbol + '-' + this.yymmdd(expiry);
|
|
1702
1706
|
}
|
|
1703
1707
|
const contractSize = inverse ? this.safeNumber2(lotSizeFilter, 'minTradingQty', 'minOrderQty') : this.parseNumber('1');
|
|
1704
|
-
result.push({
|
|
1708
|
+
result.push(this.safeMarketStructure({
|
|
1705
1709
|
'id': id,
|
|
1706
1710
|
'symbol': symbol,
|
|
1707
1711
|
'base': base,
|
|
@@ -1751,7 +1755,7 @@ class bybit extends bybit$1 {
|
|
|
1751
1755
|
},
|
|
1752
1756
|
'created': this.safeInteger(market, 'launchTime'),
|
|
1753
1757
|
'info': market,
|
|
1754
|
-
});
|
|
1758
|
+
}));
|
|
1755
1759
|
}
|
|
1756
1760
|
return result;
|
|
1757
1761
|
}
|
|
@@ -1834,7 +1838,7 @@ class bybit extends bybit$1 {
|
|
|
1834
1838
|
const optionLetter = this.safeString(splitId, 3);
|
|
1835
1839
|
const isActive = (status === 'Trading');
|
|
1836
1840
|
if (isActive || (this.options['loadAllOptions']) || (this.options['loadExpiredOptions'])) {
|
|
1837
|
-
result.push({
|
|
1841
|
+
result.push(this.safeMarketStructure({
|
|
1838
1842
|
'id': id,
|
|
1839
1843
|
'symbol': base + '/' + quote + ':' + settle + '-' + this.yymmdd(expiry) + '-' + strike + '-' + optionLetter,
|
|
1840
1844
|
'base': base,
|
|
@@ -1884,7 +1888,7 @@ class bybit extends bybit$1 {
|
|
|
1884
1888
|
},
|
|
1885
1889
|
'created': this.safeInteger(market, 'launchTime'),
|
|
1886
1890
|
'info': market,
|
|
1887
|
-
});
|
|
1891
|
+
}));
|
|
1888
1892
|
}
|
|
1889
1893
|
}
|
|
1890
1894
|
return result;
|
package/dist/cjs/src/deribit.js
CHANGED
package/dist/cjs/src/gate.js
CHANGED
package/dist/cjs/src/gemini.js
CHANGED
package/dist/cjs/src/hitbtc.js
CHANGED
package/dist/cjs/src/hollaex.js
CHANGED
|
@@ -106,6 +106,7 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
106
106
|
'reduceMargin': true,
|
|
107
107
|
'repayCrossMargin': false,
|
|
108
108
|
'repayIsolatedMargin': false,
|
|
109
|
+
'sandbox': true,
|
|
109
110
|
'setLeverage': true,
|
|
110
111
|
'setMarginMode': true,
|
|
111
112
|
'setPositionMode': false,
|
|
@@ -440,6 +441,10 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
440
441
|
for (let i = 0; i < meta.length; i++) {
|
|
441
442
|
const market = this.safeDict(meta, i, {});
|
|
442
443
|
const marketName = this.safeString(market, 'name');
|
|
444
|
+
if (marketName.indexOf('/') < 0) {
|
|
445
|
+
// there are some weird spot markets in testnet, eg @2
|
|
446
|
+
continue;
|
|
447
|
+
}
|
|
443
448
|
const marketParts = marketName.split('/');
|
|
444
449
|
const baseName = this.safeString(marketParts, 0);
|
|
445
450
|
const quoteId = this.safeString(marketParts, 1);
|
package/dist/cjs/src/idex.js
CHANGED
package/dist/cjs/src/ndax.js
CHANGED
package/dist/cjs/src/okx.js
CHANGED
|
@@ -138,6 +138,7 @@ class okx extends okx$1 {
|
|
|
138
138
|
'fetchWithdrawalWhitelist': false,
|
|
139
139
|
'reduceMargin': true,
|
|
140
140
|
'repayCrossMargin': true,
|
|
141
|
+
'sandbox': true,
|
|
141
142
|
'setLeverage': true,
|
|
142
143
|
'setMargin': false,
|
|
143
144
|
'setMarginMode': true,
|
|
@@ -888,7 +889,24 @@ class okx extends okx$1 {
|
|
|
888
889
|
'60017': errors.BadRequest,
|
|
889
890
|
'60018': errors.BadRequest,
|
|
890
891
|
'60019': errors.BadRequest,
|
|
892
|
+
'60020': errors.ExchangeError,
|
|
893
|
+
'60021': errors.AccountNotEnabled,
|
|
894
|
+
'60022': errors.AuthenticationError,
|
|
895
|
+
'60023': errors.DDoSProtection,
|
|
896
|
+
'60024': errors.AuthenticationError,
|
|
897
|
+
'60025': errors.ExchangeError,
|
|
898
|
+
'60026': errors.AuthenticationError,
|
|
899
|
+
'60027': errors.ArgumentsRequired,
|
|
900
|
+
'60028': errors.NotSupported,
|
|
901
|
+
'60029': errors.AccountNotEnabled,
|
|
902
|
+
'60030': errors.AccountNotEnabled,
|
|
903
|
+
'60031': errors.AuthenticationError,
|
|
904
|
+
'60032': errors.AuthenticationError,
|
|
891
905
|
'63999': errors.ExchangeError,
|
|
906
|
+
'64000': errors.BadRequest,
|
|
907
|
+
'64001': errors.BadRequest,
|
|
908
|
+
'64002': errors.BadRequest,
|
|
909
|
+
'64003': errors.AccountNotEnabled,
|
|
892
910
|
'70010': errors.BadRequest,
|
|
893
911
|
'70013': errors.BadRequest,
|
|
894
912
|
'70016': errors.BadRequest, // Please specify your instrument settings for at least one instType.
|
package/dist/cjs/src/phemex.js
CHANGED
package/dist/cjs/src/poloniex.js
CHANGED
|
@@ -682,6 +682,8 @@ class bitfinex2 extends bitfinex2$1 {
|
|
|
682
682
|
const responseChecksum = this.safeInteger(message, 2);
|
|
683
683
|
if (responseChecksum !== localChecksum) {
|
|
684
684
|
const error = new errors.InvalidNonce(this.id + ' invalid checksum');
|
|
685
|
+
delete client.subscriptions[messageHash];
|
|
686
|
+
delete this.orderbooks[symbol];
|
|
685
687
|
client.reject(error, messageHash);
|
|
686
688
|
}
|
|
687
689
|
}
|
|
@@ -560,7 +560,10 @@ class bitget extends bitget$1 {
|
|
|
560
560
|
const responseChecksum = this.safeInteger(rawOrderBook, 'checksum');
|
|
561
561
|
if (calculatedChecksum !== responseChecksum) {
|
|
562
562
|
const error = new errors.InvalidNonce(this.id + ' invalid checksum');
|
|
563
|
+
delete client.subscriptions[messageHash];
|
|
564
|
+
delete this.orderbooks[symbol];
|
|
563
565
|
client.reject(error, messageHash);
|
|
566
|
+
return;
|
|
564
567
|
}
|
|
565
568
|
}
|
|
566
569
|
}
|
|
@@ -12,11 +12,11 @@ class bybit extends bybit$1 {
|
|
|
12
12
|
return this.deepExtend(super.describe(), {
|
|
13
13
|
'has': {
|
|
14
14
|
'ws': true,
|
|
15
|
-
'createOrderWs':
|
|
16
|
-
'editOrderWs':
|
|
15
|
+
'createOrderWs': true,
|
|
16
|
+
'editOrderWs': true,
|
|
17
17
|
'fetchOpenOrdersWs': false,
|
|
18
18
|
'fetchOrderWs': false,
|
|
19
|
-
'cancelOrderWs':
|
|
19
|
+
'cancelOrderWs': true,
|
|
20
20
|
'cancelOrdersWs': false,
|
|
21
21
|
'cancelAllOrdersWs': false,
|
|
22
22
|
'fetchTradesWs': false,
|
package/dist/cjs/src/pro/htx.js
CHANGED
|
@@ -217,6 +217,8 @@ class independentreserve extends independentreserve$1 {
|
|
|
217
217
|
const responseChecksum = this.safeInteger(orderBook, 'Crc32');
|
|
218
218
|
if (calculatedChecksum !== responseChecksum) {
|
|
219
219
|
const error = new errors.InvalidNonce(this.id + ' invalid checksum');
|
|
220
|
+
delete client.subscriptions[messageHash];
|
|
221
|
+
delete this.orderbooks[symbol];
|
|
220
222
|
client.reject(error, messageHash);
|
|
221
223
|
}
|
|
222
224
|
}
|
|
@@ -767,6 +767,8 @@ class kraken extends kraken$1 {
|
|
|
767
767
|
const localChecksum = this.crc32(payload, false);
|
|
768
768
|
if (localChecksum !== c) {
|
|
769
769
|
const error = new errors.InvalidNonce(this.id + ' invalid checksum');
|
|
770
|
+
delete client.subscriptions[messageHash];
|
|
771
|
+
delete this.orderbooks[symbol];
|
|
770
772
|
client.reject(error, messageHash);
|
|
771
773
|
return;
|
|
772
774
|
}
|