ccxt 4.3.45 → 4.3.47
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 +127 -127
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/base/Exchange.js +1 -0
- package/dist/cjs/src/base/functions/number.js +2 -2
- package/dist/cjs/src/binance.js +2 -0
- package/dist/cjs/src/bingx.js +25 -17
- package/dist/cjs/src/bitget.js +1 -1
- package/dist/cjs/src/bitmart.js +6 -1
- package/dist/cjs/src/bitteam.js +5 -7
- package/dist/cjs/src/coinmetro.js +8 -17
- package/dist/cjs/src/hyperliquid.js +56 -21
- package/dist/cjs/src/idex.js +1 -0
- package/dist/cjs/src/mexc.js +8 -6
- package/dist/cjs/src/okx.js +1 -0
- package/dist/cjs/src/oxfun.js +2 -2
- package/dist/cjs/src/pro/binanceus.js +0 -8
- package/dist/cjs/src/pro/coinex.js +3 -2
- package/dist/cjs/src/tokocrypto.js +8 -10
- package/dist/cjs/src/wavesexchange.js +1 -0
- package/dist/cjs/src/woofipro.js +1 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/abstract/binance.d.ts +2 -0
- package/js/src/abstract/binancecoinm.d.ts +2 -0
- package/js/src/abstract/binanceus.d.ts +2 -0
- package/js/src/abstract/binanceusdm.d.ts +2 -0
- package/js/src/abstract/mexc.d.ts +2 -0
- package/js/src/base/Exchange.d.ts +1 -0
- package/js/src/base/Exchange.js +1 -0
- package/js/src/base/functions/number.js +2 -2
- package/js/src/binance.js +2 -0
- package/js/src/bingx.js +26 -18
- package/js/src/bitget.js +1 -1
- package/js/src/bitmart.js +6 -1
- package/js/src/bitteam.js +6 -8
- package/js/src/coinmetro.js +9 -18
- package/js/src/hyperliquid.d.ts +4 -3
- package/js/src/hyperliquid.js +56 -21
- package/js/src/idex.js +1 -0
- package/js/src/mexc.js +8 -6
- package/js/src/okx.js +1 -0
- package/js/src/oxfun.js +2 -2
- package/js/src/pro/binanceus.js +0 -8
- package/js/src/pro/coinex.js +3 -2
- package/js/src/tokocrypto.js +9 -11
- package/js/src/wavesexchange.js +1 -0
- package/js/src/woofipro.js +1 -0
- package/package.json +1 -1
package/js/src/pro/coinex.js
CHANGED
|
@@ -657,12 +657,13 @@ export default class coinex extends coinexRest {
|
|
|
657
657
|
// "id": null
|
|
658
658
|
// }
|
|
659
659
|
//
|
|
660
|
+
const isSwap = client.url.indexOf('perpetual') >= 0;
|
|
661
|
+
const marketType = isSwap ? 'swap' : 'spot';
|
|
660
662
|
const params = this.safeValue(message, 'params', []);
|
|
661
663
|
const fullOrderBook = this.safeValue(params, 0);
|
|
662
664
|
let orderbook = this.safeValue(params, 1);
|
|
663
665
|
const marketId = this.safeString(params, 2);
|
|
664
|
-
const
|
|
665
|
-
const market = this.safeMarket(marketId, undefined, undefined, defaultType);
|
|
666
|
+
const market = this.safeMarket(marketId, undefined, undefined, marketType);
|
|
666
667
|
const symbol = market['symbol'];
|
|
667
668
|
const name = 'orderbook';
|
|
668
669
|
const messageHash = name + ':' + symbol;
|
package/js/src/tokocrypto.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// ---------------------------------------------------------------------------
|
|
8
8
|
import Exchange from './abstract/tokocrypto.js';
|
|
9
|
-
import { TRUNCATE,
|
|
9
|
+
import { TRUNCATE, TICK_SIZE } from './base/functions/number.js';
|
|
10
10
|
import { ExchangeError, ExchangeNotAvailable, InsufficientFunds, OrderNotFound, InvalidOrder, DDoSProtection, InvalidNonce, AuthenticationError, RateLimitExceeded, PermissionDenied, NotSupported, BadRequest, BadSymbol, AccountSuspended, OrderImmediatelyFillable, OnMaintenance, BadResponse, RequestTimeout, OrderNotFillable, MarginModeAlreadySet, ArgumentsRequired } from './base/errors.js';
|
|
11
11
|
import { Precise } from './base/Precise.js';
|
|
12
12
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
@@ -213,7 +213,7 @@ export default class tokocrypto extends Exchange {
|
|
|
213
213
|
'maker': this.parseNumber('0.0075'), // 0.1% trading fee, zero fees for all trading pairs before November 1
|
|
214
214
|
},
|
|
215
215
|
},
|
|
216
|
-
'precisionMode':
|
|
216
|
+
'precisionMode': TICK_SIZE,
|
|
217
217
|
'options': {
|
|
218
218
|
// 'fetchTradesMethod': 'binanceGetTrades', // binanceGetTrades, binanceGetAggTrades
|
|
219
219
|
'createMarketBuyOrderRequiresPrice': true,
|
|
@@ -720,10 +720,10 @@ export default class tokocrypto extends Exchange {
|
|
|
720
720
|
'strike': undefined,
|
|
721
721
|
'optionType': undefined,
|
|
722
722
|
'precision': {
|
|
723
|
-
'amount': this.
|
|
724
|
-
'price': this.
|
|
725
|
-
'base': this.
|
|
726
|
-
'quote': this.
|
|
723
|
+
'amount': this.parseNumber(this.parsePrecision(this.safeString(market, 'quantityPrecision'))),
|
|
724
|
+
'price': this.parseNumber(this.parsePrecision(this.safeString(market, 'pricePrecision'))),
|
|
725
|
+
'base': this.parseNumber(this.parsePrecision(this.safeString(market, 'baseAssetPrecision'))),
|
|
726
|
+
'quote': this.parseNumber(this.parsePrecision(this.safeString(market, 'quotePrecision'))),
|
|
727
727
|
},
|
|
728
728
|
'limits': {
|
|
729
729
|
'leverage': {
|
|
@@ -748,8 +748,7 @@ export default class tokocrypto extends Exchange {
|
|
|
748
748
|
};
|
|
749
749
|
if ('PRICE_FILTER' in filtersByType) {
|
|
750
750
|
const filter = this.safeValue(filtersByType, 'PRICE_FILTER', {});
|
|
751
|
-
|
|
752
|
-
entry['precision']['price'] = this.precisionFromString(tickSize);
|
|
751
|
+
entry['precision']['price'] = this.safeNumber(filter, 'tickSize');
|
|
753
752
|
// PRICE_FILTER reports zero values for maxPrice
|
|
754
753
|
// since they updated filter types in November 2018
|
|
755
754
|
// https://github.com/ccxt/ccxt/issues/4286
|
|
@@ -758,12 +757,11 @@ export default class tokocrypto extends Exchange {
|
|
|
758
757
|
'min': this.safeNumber(filter, 'minPrice'),
|
|
759
758
|
'max': this.safeNumber(filter, 'maxPrice'),
|
|
760
759
|
};
|
|
761
|
-
entry['precision']['price'] =
|
|
760
|
+
entry['precision']['price'] = filter['tickSize'];
|
|
762
761
|
}
|
|
763
762
|
if ('LOT_SIZE' in filtersByType) {
|
|
764
763
|
const filter = this.safeValue(filtersByType, 'LOT_SIZE', {});
|
|
765
|
-
|
|
766
|
-
entry['precision']['amount'] = this.precisionFromString(stepSize);
|
|
764
|
+
entry['precision']['amount'] = this.safeNumber(filter, 'stepSize');
|
|
767
765
|
entry['limits']['amount'] = {
|
|
768
766
|
'min': this.safeNumber(filter, 'minQty'),
|
|
769
767
|
'max': this.safeNumber(filter, 'maxQty'),
|
package/js/src/wavesexchange.js
CHANGED
package/js/src/woofipro.js
CHANGED
package/package.json
CHANGED