ccxt 4.2.88 → 4.2.89
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/build.sh +1 -1
- package/dist/ccxt.browser.js +234 -128
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +1 -1
- package/dist/cjs/src/ascendex.js +2 -0
- package/dist/cjs/src/base/Exchange.js +15 -7
- package/dist/cjs/src/binance.js +2 -0
- package/dist/cjs/src/bitflyer.js +2 -0
- package/dist/cjs/src/bitget.js +7 -1
- package/dist/cjs/src/bitmart.js +2 -0
- package/dist/cjs/src/bitstamp.js +83 -99
- package/dist/cjs/src/blofin.js +2 -0
- package/dist/cjs/src/bybit.js +2 -0
- package/dist/cjs/src/coinsph.js +2 -0
- package/dist/cjs/src/digifinex.js +2 -0
- package/dist/cjs/src/gate.js +2 -0
- package/dist/cjs/src/hitbtc.js +2 -0
- package/dist/cjs/src/htx.js +2 -0
- package/dist/cjs/src/kucoin.js +39 -15
- package/dist/cjs/src/latoken.js +4 -0
- package/dist/cjs/src/lbank.js +3 -1
- package/dist/cjs/src/luno.js +2 -0
- package/dist/cjs/src/mexc.js +54 -6
- package/dist/cjs/src/okx.js +2 -0
- package/dist/cjs/src/pro/bitget.js +2 -0
- package/dist/cjs/src/timex.js +2 -0
- package/js/ccxt.d.ts +1 -1
- package/js/ccxt.js +1 -1
- package/js/src/ascendex.d.ts +3 -3
- package/js/src/ascendex.js +2 -0
- package/js/src/base/Exchange.d.ts +8 -8
- package/js/src/base/Exchange.js +15 -7
- package/js/src/base/types.d.ts +34 -1
- package/js/src/bigone.d.ts +2 -2
- package/js/src/binance.d.ts +5 -15
- package/js/src/binance.js +2 -0
- package/js/src/bingx.d.ts +2 -2
- package/js/src/bit2c.d.ts +2 -2
- package/js/src/bitbank.d.ts +2 -2
- package/js/src/bitfinex.d.ts +2 -2
- package/js/src/bitfinex2.d.ts +3 -3
- package/js/src/bitflyer.d.ts +2 -7
- package/js/src/bitflyer.js +2 -0
- package/js/src/bitget.d.ts +6 -9
- package/js/src/bitget.js +7 -1
- package/js/src/bitmart.d.ts +4 -14
- package/js/src/bitmart.js +2 -0
- package/js/src/bitmex.d.ts +2 -2
- package/js/src/bitopro.d.ts +3 -3
- package/js/src/bitrue.d.ts +2 -2
- package/js/src/bitso.d.ts +2 -2
- package/js/src/bitstamp.d.ts +7 -19
- package/js/src/bitstamp.js +83 -99
- package/js/src/bitteam.d.ts +2 -2
- package/js/src/bitvavo.d.ts +3 -3
- package/js/src/bl3p.d.ts +2 -2
- package/js/src/blockchaincom.d.ts +2 -2
- package/js/src/blofin.d.ts +2 -7
- package/js/src/blofin.js +2 -0
- package/js/src/bybit.d.ts +5 -15
- package/js/src/bybit.js +2 -0
- package/js/src/cex.d.ts +3 -3
- package/js/src/coinbase.d.ts +2 -2
- package/js/src/coinbaseinternational.d.ts +2 -2
- package/js/src/coinbasepro.d.ts +3 -3
- package/js/src/coincheck.d.ts +2 -2
- package/js/src/coinex.d.ts +5 -19
- package/js/src/coinlist.d.ts +3 -3
- package/js/src/coinmate.d.ts +2 -9
- package/js/src/coinmetro.d.ts +2 -2
- package/js/src/coinone.d.ts +2 -2
- package/js/src/coinsph.d.ts +4 -14
- package/js/src/coinsph.js +2 -0
- package/js/src/currencycom.d.ts +3 -3
- package/js/src/delta.d.ts +2 -2
- package/js/src/deribit.d.ts +3 -3
- package/js/src/digifinex.d.ts +4 -14
- package/js/src/digifinex.js +2 -0
- package/js/src/exmo.d.ts +3 -3
- package/js/src/gate.d.ts +6 -9
- package/js/src/gate.js +2 -0
- package/js/src/gemini.d.ts +3 -3
- package/js/src/hitbtc.d.ts +5 -15
- package/js/src/hitbtc.js +2 -0
- package/js/src/hollaex.d.ts +3 -3
- package/js/src/htx.d.ts +4 -14
- package/js/src/htx.js +2 -0
- package/js/src/huobijp.d.ts +2 -2
- package/js/src/hyperliquid.d.ts +2 -2
- package/js/src/idex.d.ts +3 -3
- package/js/src/independentreserve.d.ts +2 -2
- package/js/src/kraken.d.ts +3 -10
- package/js/src/kucoin.d.ts +3 -10
- package/js/src/kucoin.js +39 -15
- package/js/src/kuna.d.ts +2 -2
- package/js/src/latoken.d.ts +7 -8
- package/js/src/latoken.js +4 -0
- package/js/src/lbank.d.ts +4 -9
- package/js/src/lbank.js +3 -1
- package/js/src/luno.d.ts +2 -7
- package/js/src/luno.js +2 -0
- package/js/src/lykke.d.ts +2 -2
- package/js/src/mexc.d.ts +3 -3
- package/js/src/mexc.js +54 -6
- package/js/src/ndax.d.ts +2 -2
- package/js/src/oceanex.d.ts +2 -2
- package/js/src/okcoin.d.ts +2 -2
- package/js/src/okx.d.ts +4 -14
- package/js/src/okx.js +2 -0
- package/js/src/onetrading.d.ts +3 -3
- package/js/src/phemex.d.ts +2 -2
- package/js/src/poloniex.d.ts +3 -3
- package/js/src/pro/bitget.js +2 -0
- package/js/src/pro/bitvavo.d.ts +2 -2
- package/js/src/probit.d.ts +2 -2
- package/js/src/timex.d.ts +4 -14
- package/js/src/timex.js +2 -0
- package/js/src/upbit.d.ts +2 -9
- package/js/src/wazirx.d.ts +2 -2
- package/js/src/whitebit.d.ts +3 -3
- package/js/src/woo.d.ts +3 -3
- package/js/src/yobit.d.ts +2 -2
- package/package.json +1 -1
- package/skip-tests.json +6 -1
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.2.
|
|
185
|
+
const version = '4.2.89';
|
|
186
186
|
Exchange["default"].ccxtVersion = version;
|
|
187
187
|
const exchanges = {
|
|
188
188
|
'ace': ace,
|
package/dist/cjs/src/ascendex.js
CHANGED
|
@@ -1483,6 +1483,8 @@ class ascendex extends ascendex$1 {
|
|
|
1483
1483
|
'symbol': symbol,
|
|
1484
1484
|
'maker': this.safeNumber(takerMaker, 'maker'),
|
|
1485
1485
|
'taker': this.safeNumber(takerMaker, 'taker'),
|
|
1486
|
+
'percentage': undefined,
|
|
1487
|
+
'tierBased': undefined,
|
|
1486
1488
|
};
|
|
1487
1489
|
}
|
|
1488
1490
|
return result;
|
|
@@ -109,7 +109,7 @@ class Exchange {
|
|
|
109
109
|
this.markets_by_id = undefined;
|
|
110
110
|
this.symbols = undefined;
|
|
111
111
|
this.ids = undefined;
|
|
112
|
-
this.currencies =
|
|
112
|
+
this.currencies = {};
|
|
113
113
|
this.baseCurrencies = undefined;
|
|
114
114
|
this.quoteCurrencies = undefined;
|
|
115
115
|
this.currencies_by_id = undefined;
|
|
@@ -3788,11 +3788,11 @@ class Exchange {
|
|
|
3788
3788
|
if (currencyId !== undefined) {
|
|
3789
3789
|
code = this.commonCurrencyCode(currencyId.toUpperCase());
|
|
3790
3790
|
}
|
|
3791
|
-
return {
|
|
3791
|
+
return this.safeCurrencyStructure({
|
|
3792
3792
|
'id': currencyId,
|
|
3793
3793
|
'code': code,
|
|
3794
3794
|
'precision': undefined,
|
|
3795
|
-
};
|
|
3795
|
+
});
|
|
3796
3796
|
}
|
|
3797
3797
|
safeMarket(marketId, market = undefined, delimiter = undefined, marketType = undefined) {
|
|
3798
3798
|
const result = this.safeMarketStructure({
|
|
@@ -4561,11 +4561,18 @@ class Exchange {
|
|
|
4561
4561
|
'total': undefined,
|
|
4562
4562
|
};
|
|
4563
4563
|
}
|
|
4564
|
-
commonCurrencyCode(
|
|
4564
|
+
commonCurrencyCode(code) {
|
|
4565
4565
|
if (!this.substituteCommonCurrencyCodes) {
|
|
4566
|
-
return
|
|
4566
|
+
return code;
|
|
4567
|
+
}
|
|
4568
|
+
// if the provided code already exists as a value in commonCurrencies dict, then we should not again transform it
|
|
4569
|
+
// more details at: https://github.com/ccxt/ccxt/issues/21112#issuecomment-2031293691
|
|
4570
|
+
const commonCurrencies = Object.values(this.commonCurrencies);
|
|
4571
|
+
const exists = this.inArray(code, commonCurrencies);
|
|
4572
|
+
if (exists) {
|
|
4573
|
+
return code;
|
|
4567
4574
|
}
|
|
4568
|
-
return this.safeString(this.commonCurrencies,
|
|
4575
|
+
return this.safeString(this.commonCurrencies, code, code);
|
|
4569
4576
|
}
|
|
4570
4577
|
currency(code) {
|
|
4571
4578
|
if (this.currencies === undefined) {
|
|
@@ -5028,7 +5035,8 @@ class Exchange {
|
|
|
5028
5035
|
if (!this.has['fetchTradingFees']) {
|
|
5029
5036
|
throw new errors.NotSupported(this.id + ' fetchTradingFee() is not supported yet');
|
|
5030
5037
|
}
|
|
5031
|
-
|
|
5038
|
+
const fees = await this.fetchTradingFees(params);
|
|
5039
|
+
return this.safeDict(fees, symbol);
|
|
5032
5040
|
}
|
|
5033
5041
|
parseOpenInterest(interest, market = undefined) {
|
|
5034
5042
|
throw new errors.NotSupported(this.id + ' parseOpenInterest () is not supported yet');
|
package/dist/cjs/src/binance.js
CHANGED
|
@@ -8653,6 +8653,8 @@ class binance extends binance$1 {
|
|
|
8653
8653
|
'symbol': symbol,
|
|
8654
8654
|
'maker': this.safeNumber2(fee, 'makerCommission', 'makerCommissionRate'),
|
|
8655
8655
|
'taker': this.safeNumber2(fee, 'takerCommission', 'takerCommissionRate'),
|
|
8656
|
+
'percentage': undefined,
|
|
8657
|
+
'tierBased': undefined,
|
|
8656
8658
|
};
|
|
8657
8659
|
}
|
|
8658
8660
|
async fetchTradingFee(symbol, params = {}) {
|
package/dist/cjs/src/bitflyer.js
CHANGED
|
@@ -540,6 +540,8 @@ class bitflyer extends bitflyer$1 {
|
|
|
540
540
|
'symbol': market['symbol'],
|
|
541
541
|
'maker': fee,
|
|
542
542
|
'taker': fee,
|
|
543
|
+
'percentage': undefined,
|
|
544
|
+
'tierBased': undefined,
|
|
543
545
|
};
|
|
544
546
|
}
|
|
545
547
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
package/dist/cjs/src/bitget.js
CHANGED
|
@@ -2624,7 +2624,11 @@ class bitget extends bitget$1 {
|
|
|
2624
2624
|
//
|
|
2625
2625
|
const marketId = this.safeString(ticker, 'symbol');
|
|
2626
2626
|
const close = this.safeString(ticker, 'lastPr');
|
|
2627
|
-
const
|
|
2627
|
+
const timestampString = this.omitZero(this.safeString(ticker, 'ts')); // exchange sometimes provided 0
|
|
2628
|
+
let timestamp = undefined;
|
|
2629
|
+
if (timestampString !== undefined) {
|
|
2630
|
+
timestamp = this.parseToInt(timestampString);
|
|
2631
|
+
}
|
|
2628
2632
|
const change = this.safeString(ticker, 'change24h');
|
|
2629
2633
|
const open24 = this.safeString(ticker, 'open24');
|
|
2630
2634
|
const open = this.safeString(ticker, 'open');
|
|
@@ -3277,6 +3281,8 @@ class bitget extends bitget$1 {
|
|
|
3277
3281
|
'symbol': this.safeSymbol(marketId, market),
|
|
3278
3282
|
'maker': this.safeNumber(data, 'makerFeeRate'),
|
|
3279
3283
|
'taker': this.safeNumber(data, 'takerFeeRate'),
|
|
3284
|
+
'percentage': undefined,
|
|
3285
|
+
'tierBased': undefined,
|
|
3280
3286
|
};
|
|
3281
3287
|
}
|
|
3282
3288
|
parseOHLCV(ohlcv, market = undefined) {
|
package/dist/cjs/src/bitmart.js
CHANGED
|
@@ -2095,6 +2095,8 @@ class bitmart extends bitmart$1 {
|
|
|
2095
2095
|
'symbol': symbol,
|
|
2096
2096
|
'maker': this.safeNumber(fee, 'maker_fee_rate'),
|
|
2097
2097
|
'taker': this.safeNumber(fee, 'taker_fee_rate'),
|
|
2098
|
+
'percentage': undefined,
|
|
2099
|
+
'tierBased': undefined,
|
|
2098
2100
|
};
|
|
2099
2101
|
}
|
|
2100
2102
|
async fetchTradingFee(symbol, params = {}) {
|
package/dist/cjs/src/bitstamp.js
CHANGED
|
@@ -428,6 +428,30 @@ class bitstamp extends bitstamp$1 {
|
|
|
428
428
|
'commonCurrencies': {
|
|
429
429
|
'UST': 'USTC',
|
|
430
430
|
},
|
|
431
|
+
// exchange-specific options
|
|
432
|
+
'options': {
|
|
433
|
+
'networksById': {
|
|
434
|
+
'bitcoin-cash': 'BCH',
|
|
435
|
+
'bitcoin': 'BTC',
|
|
436
|
+
'ethereum': 'ERC20',
|
|
437
|
+
'litecoin': 'LTC',
|
|
438
|
+
'stellar': 'XLM',
|
|
439
|
+
'xrpl': 'XRP',
|
|
440
|
+
'tron': 'TRC20',
|
|
441
|
+
'algorand': 'ALGO',
|
|
442
|
+
'flare': 'FLR',
|
|
443
|
+
'hedera': 'HBAR',
|
|
444
|
+
'cardana': 'ADA',
|
|
445
|
+
'songbird': 'FLR',
|
|
446
|
+
'avalanche-c-chain': 'AVAX',
|
|
447
|
+
'solana': 'SOL',
|
|
448
|
+
'polkadot': 'DOT',
|
|
449
|
+
'near': 'NEAR',
|
|
450
|
+
'doge': 'DOGE',
|
|
451
|
+
'sui': 'SUI',
|
|
452
|
+
'casper': 'CSRP',
|
|
453
|
+
},
|
|
454
|
+
},
|
|
431
455
|
'exceptions': {
|
|
432
456
|
'exact': {
|
|
433
457
|
'No permission found': errors.PermissionDenied,
|
|
@@ -1200,6 +1224,8 @@ class bitstamp extends bitstamp$1 {
|
|
|
1200
1224
|
'symbol': this.safeSymbol(marketId, market),
|
|
1201
1225
|
'maker': this.safeNumber(fees, 'maker'),
|
|
1202
1226
|
'taker': this.safeNumber(fees, 'taker'),
|
|
1227
|
+
'percentage': undefined,
|
|
1228
|
+
'tierBased': undefined,
|
|
1203
1229
|
};
|
|
1204
1230
|
}
|
|
1205
1231
|
parseTradingFees(fees) {
|
|
@@ -1245,60 +1271,41 @@ class bitstamp extends bitstamp$1 {
|
|
|
1245
1271
|
* @name bitstamp#fetchTransactionFees
|
|
1246
1272
|
* @deprecated
|
|
1247
1273
|
* @description please use fetchDepositWithdrawFees instead
|
|
1248
|
-
* @see https://www.bitstamp.net/api/#
|
|
1274
|
+
* @see https://www.bitstamp.net/api/#tag/Fees
|
|
1249
1275
|
* @param {string[]|undefined} codes list of unified currency codes
|
|
1250
1276
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
1251
1277
|
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1252
1278
|
*/
|
|
1253
1279
|
await this.loadMarkets();
|
|
1254
|
-
const
|
|
1255
|
-
|
|
1280
|
+
const response = await this.privatePostFeesWithdrawal(params);
|
|
1281
|
+
//
|
|
1282
|
+
// [
|
|
1283
|
+
// {
|
|
1284
|
+
// "currency": "btc",
|
|
1285
|
+
// "fee": "0.00015000",
|
|
1286
|
+
// "network": "bitcoin"
|
|
1287
|
+
// }
|
|
1288
|
+
// ...
|
|
1289
|
+
// ]
|
|
1290
|
+
//
|
|
1291
|
+
return this.parseTransactionFees(response);
|
|
1256
1292
|
}
|
|
1257
1293
|
parseTransactionFees(response, codes = undefined) {
|
|
1258
|
-
//
|
|
1259
|
-
// {
|
|
1260
|
-
// "yfi_available": "0.00000000",
|
|
1261
|
-
// "yfi_balance": "0.00000000",
|
|
1262
|
-
// "yfi_reserved": "0.00000000",
|
|
1263
|
-
// "yfi_withdrawal_fee": "0.00070000",
|
|
1264
|
-
// "yfieur_fee": "0.000",
|
|
1265
|
-
// "yfiusd_fee": "0.000",
|
|
1266
|
-
// "zrx_available": "0.00000000",
|
|
1267
|
-
// "zrx_balance": "0.00000000",
|
|
1268
|
-
// "zrx_reserved": "0.00000000",
|
|
1269
|
-
// "zrx_withdrawal_fee": "12.00000000",
|
|
1270
|
-
// "zrxeur_fee": "0.000",
|
|
1271
|
-
// "zrxusd_fee": "0.000",
|
|
1272
|
-
// ...
|
|
1273
|
-
// }
|
|
1274
|
-
//
|
|
1275
|
-
if (codes === undefined) {
|
|
1276
|
-
codes = Object.keys(this.currencies);
|
|
1277
|
-
}
|
|
1278
1294
|
const result = {};
|
|
1279
|
-
|
|
1280
|
-
const ids = Object.keys(
|
|
1295
|
+
const currencies = this.indexBy(response, 'currency');
|
|
1296
|
+
const ids = Object.keys(currencies);
|
|
1281
1297
|
for (let i = 0; i < ids.length; i++) {
|
|
1282
1298
|
const id = ids[i];
|
|
1283
|
-
const
|
|
1284
|
-
const code = this.safeCurrencyCode(
|
|
1285
|
-
if (codes !== undefined && !this.inArray(code, codes)) {
|
|
1299
|
+
const fees = this.safeValue(response, i, {});
|
|
1300
|
+
const code = this.safeCurrencyCode(id);
|
|
1301
|
+
if ((codes !== undefined) && !this.inArray(code, codes)) {
|
|
1286
1302
|
continue;
|
|
1287
1303
|
}
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
'info': {},
|
|
1294
|
-
};
|
|
1295
|
-
}
|
|
1296
|
-
if (currencyId === mainCurrencyId) {
|
|
1297
|
-
result[code]['info'][id] = this.safeNumber(response, id);
|
|
1298
|
-
}
|
|
1299
|
-
if (id.indexOf('_withdrawal_fee') >= 0) {
|
|
1300
|
-
result[code]['withdraw'] = this.safeNumber(response, id);
|
|
1301
|
-
}
|
|
1304
|
+
result[code] = {
|
|
1305
|
+
'withdraw_fee': this.safeNumber(fees, 'fee'),
|
|
1306
|
+
'deposit': {},
|
|
1307
|
+
'info': this.safeDict(currencies, id),
|
|
1308
|
+
};
|
|
1302
1309
|
}
|
|
1303
1310
|
return result;
|
|
1304
1311
|
}
|
|
@@ -1313,64 +1320,41 @@ class bitstamp extends bitstamp$1 {
|
|
|
1313
1320
|
* @returns {object[]} a list of [fee structures]{@link https://docs.ccxt.com/#/?id=fee-structure}
|
|
1314
1321
|
*/
|
|
1315
1322
|
await this.loadMarkets();
|
|
1316
|
-
const response = await this.
|
|
1317
|
-
//
|
|
1318
|
-
// {
|
|
1319
|
-
// "yfi_available": "0.00000000",
|
|
1320
|
-
// "yfi_balance": "0.00000000",
|
|
1321
|
-
// "yfi_reserved": "0.00000000",
|
|
1322
|
-
// "yfi_withdrawal_fee": "0.00070000",
|
|
1323
|
-
// "yfieur_fee": "0.000",
|
|
1324
|
-
// "yfiusd_fee": "0.000",
|
|
1325
|
-
// "zrx_available": "0.00000000",
|
|
1326
|
-
// "zrx_balance": "0.00000000",
|
|
1327
|
-
// "zrx_reserved": "0.00000000",
|
|
1328
|
-
// "zrx_withdrawal_fee": "12.00000000",
|
|
1329
|
-
// "zrxeur_fee": "0.000",
|
|
1330
|
-
// "zrxusd_fee": "0.000",
|
|
1331
|
-
// ...
|
|
1332
|
-
// }
|
|
1333
|
-
//
|
|
1334
|
-
return this.parseDepositWithdrawFees(response, codes);
|
|
1335
|
-
}
|
|
1336
|
-
parseDepositWithdrawFees(response, codes = undefined, currencyIdKey = undefined) {
|
|
1337
|
-
//
|
|
1338
|
-
// {
|
|
1339
|
-
// "yfi_available": "0.00000000",
|
|
1340
|
-
// "yfi_balance": "0.00000000",
|
|
1341
|
-
// "yfi_reserved": "0.00000000",
|
|
1342
|
-
// "yfi_withdrawal_fee": "0.00070000",
|
|
1343
|
-
// "yfieur_fee": "0.000",
|
|
1344
|
-
// "yfiusd_fee": "0.000",
|
|
1345
|
-
// "zrx_available": "0.00000000",
|
|
1346
|
-
// "zrx_balance": "0.00000000",
|
|
1347
|
-
// "zrx_reserved": "0.00000000",
|
|
1348
|
-
// "zrx_withdrawal_fee": "12.00000000",
|
|
1349
|
-
// "zrxeur_fee": "0.000",
|
|
1350
|
-
// "zrxusd_fee": "0.000",
|
|
1351
|
-
// ...
|
|
1352
|
-
// }
|
|
1323
|
+
const response = await this.privatePostFeesWithdrawal(params);
|
|
1353
1324
|
//
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
const
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1325
|
+
// [
|
|
1326
|
+
// {
|
|
1327
|
+
// "currency": "btc",
|
|
1328
|
+
// "fee": "0.00015000",
|
|
1329
|
+
// "network": "bitcoin"
|
|
1330
|
+
// }
|
|
1331
|
+
// ...
|
|
1332
|
+
// ]
|
|
1333
|
+
//
|
|
1334
|
+
const responseByCurrencyId = this.groupBy(response, 'currency');
|
|
1335
|
+
return this.parseDepositWithdrawFees(responseByCurrencyId, codes);
|
|
1336
|
+
}
|
|
1337
|
+
parseDepositWithdrawFee(fee, currency = undefined) {
|
|
1338
|
+
const result = this.depositWithdrawFee(fee);
|
|
1339
|
+
for (let j = 0; j < fee.length; j++) {
|
|
1340
|
+
const networkEntry = fee[j];
|
|
1341
|
+
const networkId = this.safeString(networkEntry, 'network');
|
|
1342
|
+
const networkCode = this.networkIdToCode(networkId);
|
|
1343
|
+
const withdrawFee = this.safeNumber(networkEntry, 'fee');
|
|
1344
|
+
result['withdraw'] = {
|
|
1345
|
+
'fee': withdrawFee,
|
|
1346
|
+
'percentage': undefined,
|
|
1347
|
+
};
|
|
1348
|
+
result['networks'][networkCode] = {
|
|
1349
|
+
'withdraw': {
|
|
1350
|
+
'fee': withdrawFee,
|
|
1351
|
+
'percentage': undefined,
|
|
1352
|
+
},
|
|
1353
|
+
'deposit': {
|
|
1354
|
+
'fee': undefined,
|
|
1355
|
+
'percentage': undefined,
|
|
1356
|
+
},
|
|
1357
|
+
};
|
|
1374
1358
|
}
|
|
1375
1359
|
return result;
|
|
1376
1360
|
}
|
package/dist/cjs/src/blofin.js
CHANGED
|
@@ -941,6 +941,8 @@ class blofin extends blofin$1 {
|
|
|
941
941
|
// blofin returns the fees as negative values opposed to other exchanges, so the sign needs to be flipped
|
|
942
942
|
'maker': this.parseNumber(Precise["default"].stringNeg(this.safeString2(fee, 'maker', 'makerU'))),
|
|
943
943
|
'taker': this.parseNumber(Precise["default"].stringNeg(this.safeString2(fee, 'taker', 'takerU'))),
|
|
944
|
+
'percentage': undefined,
|
|
945
|
+
'tierBased': undefined,
|
|
944
946
|
};
|
|
945
947
|
}
|
|
946
948
|
async fetchBalance(params = {}) {
|
package/dist/cjs/src/bybit.js
CHANGED
|
@@ -7264,6 +7264,8 @@ class bybit extends bybit$1 {
|
|
|
7264
7264
|
'symbol': symbol,
|
|
7265
7265
|
'maker': this.safeNumber(fee, 'makerFeeRate'),
|
|
7266
7266
|
'taker': this.safeNumber(fee, 'takerFeeRate'),
|
|
7267
|
+
'percentage': undefined,
|
|
7268
|
+
'tierBased': undefined,
|
|
7267
7269
|
};
|
|
7268
7270
|
}
|
|
7269
7271
|
async fetchTradingFee(symbol, params = {}) {
|
package/dist/cjs/src/coinsph.js
CHANGED
|
@@ -1574,6 +1574,8 @@ class coinsph extends coinsph$1 {
|
|
|
1574
1574
|
'symbol': symbol,
|
|
1575
1575
|
'maker': this.safeNumber(fee, 'makerCommission'),
|
|
1576
1576
|
'taker': this.safeNumber(fee, 'takerCommission'),
|
|
1577
|
+
'percentage': undefined,
|
|
1578
|
+
'tierBased': undefined,
|
|
1577
1579
|
};
|
|
1578
1580
|
}
|
|
1579
1581
|
async withdraw(code, amount, address, tag = undefined, params = {}) {
|
|
@@ -3366,6 +3366,8 @@ class digifinex extends digifinex$1 {
|
|
|
3366
3366
|
'symbol': symbol,
|
|
3367
3367
|
'maker': this.safeNumber(fee, 'maker_fee_rate'),
|
|
3368
3368
|
'taker': this.safeNumber(fee, 'taker_fee_rate'),
|
|
3369
|
+
'percentage': undefined,
|
|
3370
|
+
'tierBased': undefined,
|
|
3369
3371
|
};
|
|
3370
3372
|
}
|
|
3371
3373
|
async fetchPositions(symbols = undefined, params = {}) {
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -2071,6 +2071,8 @@ class gate extends gate$1 {
|
|
|
2071
2071
|
'symbol': this.safeString(market, 'symbol'),
|
|
2072
2072
|
'maker': this.safeNumber(info, makerKey),
|
|
2073
2073
|
'taker': this.safeNumber(info, takerKey),
|
|
2074
|
+
'percentage': undefined,
|
|
2075
|
+
'tierBased': undefined,
|
|
2074
2076
|
};
|
|
2075
2077
|
}
|
|
2076
2078
|
async fetchTransactionFees(codes = undefined, params = {}) {
|
package/dist/cjs/src/hitbtc.js
CHANGED
package/dist/cjs/src/htx.js
CHANGED
|
@@ -1500,6 +1500,8 @@ class htx extends htx$1 {
|
|
|
1500
1500
|
'symbol': this.safeSymbol(marketId, market),
|
|
1501
1501
|
'maker': this.safeNumber(fee, 'actualMakerRate'),
|
|
1502
1502
|
'taker': this.safeNumber(fee, 'actualTakerRate'),
|
|
1503
|
+
'percentage': undefined,
|
|
1504
|
+
'tierBased': undefined,
|
|
1503
1505
|
};
|
|
1504
1506
|
}
|
|
1505
1507
|
async fetchTradingFee(symbol, params = {}) {
|
package/dist/cjs/src/kucoin.js
CHANGED
|
@@ -3524,9 +3524,9 @@ class kucoin extends kucoin$1 {
|
|
|
3524
3524
|
}
|
|
3525
3525
|
parseBalanceHelper(entry) {
|
|
3526
3526
|
const account = this.account();
|
|
3527
|
-
account['used'] = this.
|
|
3528
|
-
account['free'] = this.
|
|
3529
|
-
account['total'] = this.
|
|
3527
|
+
account['used'] = this.safeString2(entry, 'holdBalance', 'hold');
|
|
3528
|
+
account['free'] = this.safeString2(entry, 'availableBalance', 'available');
|
|
3529
|
+
account['total'] = this.safeString2(entry, 'totalBalance', 'total');
|
|
3530
3530
|
const debt = this.safeString(entry, 'liability');
|
|
3531
3531
|
const interest = this.safeString(entry, 'interest');
|
|
3532
3532
|
account['debt'] = Precise["default"].stringAdd(debt, interest);
|
|
@@ -3584,7 +3584,7 @@ class kucoin extends kucoin$1 {
|
|
|
3584
3584
|
response = await this.privateGetAccounts(this.extend(request, query));
|
|
3585
3585
|
}
|
|
3586
3586
|
//
|
|
3587
|
-
// Spot
|
|
3587
|
+
// Spot
|
|
3588
3588
|
//
|
|
3589
3589
|
// {
|
|
3590
3590
|
// "code": "200000",
|
|
@@ -3600,35 +3600,59 @@ class kucoin extends kucoin$1 {
|
|
|
3600
3600
|
// ]
|
|
3601
3601
|
// }
|
|
3602
3602
|
//
|
|
3603
|
+
// Cross
|
|
3604
|
+
//
|
|
3605
|
+
// {
|
|
3606
|
+
// "code": "200000",
|
|
3607
|
+
// "data": {
|
|
3608
|
+
// "debtRatio": "0",
|
|
3609
|
+
// "accounts": [
|
|
3610
|
+
// {
|
|
3611
|
+
// "currency": "USDT",
|
|
3612
|
+
// "totalBalance": "5",
|
|
3613
|
+
// "availableBalance": "5",
|
|
3614
|
+
// "holdBalance": "0",
|
|
3615
|
+
// "liability": "0",
|
|
3616
|
+
// "maxBorrowSize": "20"
|
|
3617
|
+
// },
|
|
3618
|
+
// ]
|
|
3619
|
+
// }
|
|
3620
|
+
// }
|
|
3621
|
+
//
|
|
3603
3622
|
// Isolated
|
|
3604
3623
|
//
|
|
3605
3624
|
// {
|
|
3606
3625
|
// "code": "200000",
|
|
3607
3626
|
// "data": {
|
|
3608
|
-
// "
|
|
3609
|
-
// "
|
|
3627
|
+
// "totalAssetOfQuoteCurrency": "0",
|
|
3628
|
+
// "totalLiabilityOfQuoteCurrency": "0",
|
|
3629
|
+
// "timestamp": 1712085661155,
|
|
3610
3630
|
// "assets": [
|
|
3611
3631
|
// {
|
|
3612
3632
|
// "symbol": "MANA-USDT",
|
|
3613
|
-
// "status": "
|
|
3633
|
+
// "status": "EFFECTIVE",
|
|
3614
3634
|
// "debtRatio": "0",
|
|
3615
3635
|
// "baseAsset": {
|
|
3616
3636
|
// "currency": "MANA",
|
|
3617
|
-
// "
|
|
3618
|
-
// "
|
|
3619
|
-
// "
|
|
3637
|
+
// "borrowEnabled": true,
|
|
3638
|
+
// "transferInEnabled": true,
|
|
3639
|
+
// "total": "0",
|
|
3640
|
+
// "hold": "0",
|
|
3641
|
+
// "available": "0",
|
|
3620
3642
|
// "liability": "0",
|
|
3621
3643
|
// "interest": "0",
|
|
3622
|
-
// "
|
|
3644
|
+
// "maxBorrowSize": "0"
|
|
3623
3645
|
// },
|
|
3624
3646
|
// "quoteAsset": {
|
|
3625
3647
|
// "currency": "USDT",
|
|
3626
|
-
// "
|
|
3627
|
-
// "
|
|
3628
|
-
// "
|
|
3648
|
+
// "borrowEnabled": true,
|
|
3649
|
+
// "transferInEnabled": true,
|
|
3650
|
+
// "total": "0",
|
|
3651
|
+
// "hold": "0",
|
|
3652
|
+
// "available": "0",
|
|
3629
3653
|
// "liability": "0",
|
|
3630
3654
|
// "interest": "0",
|
|
3631
|
-
// "
|
|
3655
|
+
// "maxBorrowSize": "0"
|
|
3632
3656
|
// }
|
|
3633
3657
|
// },
|
|
3634
3658
|
// ...
|
package/dist/cjs/src/latoken.js
CHANGED
|
@@ -875,6 +875,8 @@ class latoken extends latoken$1 {
|
|
|
875
875
|
'symbol': market['symbol'],
|
|
876
876
|
'maker': this.safeNumber(response, 'makerFee'),
|
|
877
877
|
'taker': this.safeNumber(response, 'takerFee'),
|
|
878
|
+
'percentage': undefined,
|
|
879
|
+
'tierBased': undefined,
|
|
878
880
|
};
|
|
879
881
|
}
|
|
880
882
|
async fetchPrivateTradingFee(symbol, params = {}) {
|
|
@@ -898,6 +900,8 @@ class latoken extends latoken$1 {
|
|
|
898
900
|
'symbol': market['symbol'],
|
|
899
901
|
'maker': this.safeNumber(response, 'makerFee'),
|
|
900
902
|
'taker': this.safeNumber(response, 'takerFee'),
|
|
903
|
+
'percentage': undefined,
|
|
904
|
+
'tierBased': undefined,
|
|
901
905
|
};
|
|
902
906
|
}
|
|
903
907
|
async fetchMyTrades(symbol = undefined, since = undefined, limit = undefined, params = {}) {
|
package/dist/cjs/src/lbank.js
CHANGED
|
@@ -1241,6 +1241,8 @@ class lbank extends lbank$1 {
|
|
|
1241
1241
|
'symbol': symbol,
|
|
1242
1242
|
'maker': this.safeNumber(fee, 'makerCommission'),
|
|
1243
1243
|
'taker': this.safeNumber(fee, 'takerCommission'),
|
|
1244
|
+
'percentage': undefined,
|
|
1245
|
+
'tierBased': undefined,
|
|
1244
1246
|
};
|
|
1245
1247
|
}
|
|
1246
1248
|
async fetchTradingFee(symbol, params = {}) {
|
|
@@ -1255,7 +1257,7 @@ class lbank extends lbank$1 {
|
|
|
1255
1257
|
*/
|
|
1256
1258
|
const market = this.market(symbol);
|
|
1257
1259
|
const result = await this.fetchTradingFees(this.extend(params, { 'category': market['id'] }));
|
|
1258
|
-
return result;
|
|
1260
|
+
return this.safeDict(result, symbol);
|
|
1259
1261
|
}
|
|
1260
1262
|
async fetchTradingFees(params = {}) {
|
|
1261
1263
|
/**
|
package/dist/cjs/src/luno.js
CHANGED
|
@@ -894,6 +894,8 @@ class luno extends luno$1 {
|
|
|
894
894
|
'symbol': symbol,
|
|
895
895
|
'maker': this.safeNumber(response, 'maker_fee'),
|
|
896
896
|
'taker': this.safeNumber(response, 'taker_fee'),
|
|
897
|
+
'percentage': undefined,
|
|
898
|
+
'tierBased': undefined,
|
|
897
899
|
};
|
|
898
900
|
}
|
|
899
901
|
async createOrder(symbol, type, side, amount, price = undefined, params = {}) {
|
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -4299,8 +4299,9 @@ class mexc extends mexc$1 {
|
|
|
4299
4299
|
/**
|
|
4300
4300
|
* @method
|
|
4301
4301
|
* @name mexc#fetchLeverageTiers
|
|
4302
|
-
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes
|
|
4303
|
-
* @
|
|
4302
|
+
* @description retrieve information on the maximum leverage, and maintenance margin for trades of varying trade sizes, if a market has a leverage tier of 0, then the leverage tiers cannot be obtained for this market
|
|
4303
|
+
* @see https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
|
|
4304
|
+
* @param {string[]} [symbols] list of unified market symbols
|
|
4304
4305
|
* @param {object} [params] extra parameters specific to the exchange API endpoint
|
|
4305
4306
|
* @returns {object} a dictionary of [leverage tiers structures]{@link https://docs.ccxt.com/#/?id=leverage-tiers-structure}, indexed by market symbols
|
|
4306
4307
|
*/
|
|
@@ -4356,10 +4357,44 @@ class mexc extends mexc$1 {
|
|
|
4356
4357
|
return this.parseLeverageTiers(data, symbols, 'symbol');
|
|
4357
4358
|
}
|
|
4358
4359
|
parseMarketLeverageTiers(info, market = undefined) {
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4360
|
+
//
|
|
4361
|
+
// {
|
|
4362
|
+
// "symbol": "BTC_USDT",
|
|
4363
|
+
// "displayName": "BTC_USDT永续",
|
|
4364
|
+
// "displayNameEn": "BTC_USDT SWAP",
|
|
4365
|
+
// "positionOpenType": 3,
|
|
4366
|
+
// "baseCoin": "BTC",
|
|
4367
|
+
// "quoteCoin": "USDT",
|
|
4368
|
+
// "settleCoin": "USDT",
|
|
4369
|
+
// "contractSize": 0.0001,
|
|
4370
|
+
// "minLeverage": 1,
|
|
4371
|
+
// "maxLeverage": 125,
|
|
4372
|
+
// "priceScale": 2,
|
|
4373
|
+
// "volScale": 0,
|
|
4374
|
+
// "amountScale": 4,
|
|
4375
|
+
// "priceUnit": 0.5,
|
|
4376
|
+
// "volUnit": 1,
|
|
4377
|
+
// "minVol": 1,
|
|
4378
|
+
// "maxVol": 1000000,
|
|
4379
|
+
// "bidLimitPriceRate": 0.1,
|
|
4380
|
+
// "askLimitPriceRate": 0.1,
|
|
4381
|
+
// "takerFeeRate": 0.0006,
|
|
4382
|
+
// "makerFeeRate": 0.0002,
|
|
4383
|
+
// "maintenanceMarginRate": 0.004,
|
|
4384
|
+
// "initialMarginRate": 0.008,
|
|
4385
|
+
// "riskBaseVol": 10000,
|
|
4386
|
+
// "riskIncrVol": 200000,
|
|
4387
|
+
// "riskIncrMmr": 0.004,
|
|
4388
|
+
// "riskIncrImr": 0.004,
|
|
4389
|
+
// "riskLevelLimit": 5,
|
|
4390
|
+
// "priceCoefficientVariation": 0.1,
|
|
4391
|
+
// "indexOrigin": ["BINANCE","GATEIO","HUOBI","MXC"],
|
|
4392
|
+
// "state": 0, // 0 enabled, 1 delivery, 2 completed, 3 offline, 4 pause
|
|
4393
|
+
// "isNew": false,
|
|
4394
|
+
// "isHot": true,
|
|
4395
|
+
// "isHidden": false
|
|
4396
|
+
// }
|
|
4397
|
+
//
|
|
4363
4398
|
let maintenanceMarginRate = this.safeString(info, 'maintenanceMarginRate');
|
|
4364
4399
|
let initialMarginRate = this.safeString(info, 'initialMarginRate');
|
|
4365
4400
|
const maxVol = this.safeString(info, 'maxVol');
|
|
@@ -4369,6 +4404,19 @@ class mexc extends mexc$1 {
|
|
|
4369
4404
|
let floor = '0';
|
|
4370
4405
|
const tiers = [];
|
|
4371
4406
|
const quoteId = this.safeString(info, 'quoteCoin');
|
|
4407
|
+
if (riskIncrVol === '0') {
|
|
4408
|
+
return [
|
|
4409
|
+
{
|
|
4410
|
+
'tier': 0,
|
|
4411
|
+
'currency': this.safeCurrencyCode(quoteId),
|
|
4412
|
+
'notionalFloor': undefined,
|
|
4413
|
+
'notionalCap': undefined,
|
|
4414
|
+
'maintenanceMarginRate': undefined,
|
|
4415
|
+
'maxLeverage': this.safeNumber(info, 'maxLeverage'),
|
|
4416
|
+
'info': info,
|
|
4417
|
+
},
|
|
4418
|
+
];
|
|
4419
|
+
}
|
|
4372
4420
|
while (Precise["default"].stringLt(floor, maxVol)) {
|
|
4373
4421
|
const cap = Precise["default"].stringAdd(floor, riskIncrVol);
|
|
4374
4422
|
tiers.push({
|