ccxt 4.4.82 → 4.4.86
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 +6 -9
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +6 -17
- package/dist/cjs/src/abstract/bittrade.js +9 -0
- package/dist/cjs/src/apex.js +2 -1
- package/dist/cjs/src/ascendex.js +189 -155
- package/dist/cjs/src/base/Exchange.js +15 -2
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/bitget.js +6 -7
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitrue.js +14 -35
- package/dist/cjs/src/bitso.js +33 -0
- package/dist/cjs/src/bitstamp.js +33 -0
- package/dist/cjs/src/bittrade.js +2049 -0
- package/dist/cjs/src/blofin.js +154 -13
- package/dist/cjs/src/btcbox.js +25 -5
- package/dist/cjs/src/bybit.js +16 -40
- package/dist/cjs/src/cex.js +2 -4
- package/dist/cjs/src/coinbase.js +58 -46
- package/dist/cjs/src/coinbaseexchange.js +142 -32
- package/dist/cjs/src/coincatch.js +14 -67
- package/dist/cjs/src/coinex.js +29 -32
- package/dist/cjs/src/coinlist.js +16 -15
- package/dist/cjs/src/coinmetro.js +22 -11
- package/dist/cjs/src/coinone.js +8 -10
- package/dist/cjs/src/coinsph.js +126 -1
- package/dist/cjs/src/cryptocom.js +111 -1
- package/dist/cjs/src/cryptomus.js +43 -89
- package/dist/cjs/src/delta.js +76 -36
- package/dist/cjs/src/deribit.js +4 -5
- package/dist/cjs/src/derive.js +46 -10
- package/dist/cjs/src/ellipx.js +175 -79
- package/dist/cjs/src/gate.js +1 -1
- package/dist/cjs/src/gemini.js +3 -5
- package/dist/cjs/src/hitbtc.js +56 -69
- package/dist/cjs/src/hollaex.js +107 -49
- package/dist/cjs/src/htx.js +20 -44
- package/dist/cjs/src/hyperliquid.js +6 -6
- package/dist/cjs/src/kraken.js +29 -24
- package/dist/cjs/src/kucoinfutures.js +6 -0
- package/dist/cjs/src/lbank.js +1 -1
- package/dist/cjs/src/mexc.js +2 -2
- package/dist/cjs/src/ndax.js +25 -24
- package/dist/cjs/src/okcoin.js +12 -31
- package/dist/cjs/src/okx.js +9 -0
- package/dist/cjs/src/onetrading.js +9 -6
- package/dist/cjs/src/oxfun.js +42 -114
- package/dist/cjs/src/paradex.js +124 -4
- package/dist/cjs/src/pro/binance.js +32 -33
- package/dist/cjs/src/pro/bithumb.js +5 -3
- package/dist/cjs/src/pro/bittrade.js +605 -0
- package/dist/cjs/src/pro/kraken.js +289 -79
- package/dist/cjs/src/pro/luno.js +6 -5
- package/dist/cjs/src/pro/mexc.js +304 -7
- package/dist/cjs/src/pro/poloniex.js +6 -2
- package/examples/js/cli.js +127 -13
- package/js/ccxt.d.ts +8 -20
- package/js/ccxt.js +6 -14
- package/js/src/abstract/blofin.d.ts +8 -0
- package/js/src/abstract/btcbox.d.ts +1 -0
- package/js/src/abstract/myokx.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +2 -0
- package/js/src/apex.js +2 -1
- package/js/src/ascendex.d.ts +2 -0
- package/js/src/ascendex.js +189 -155
- package/js/src/base/Exchange.d.ts +15 -1
- package/js/src/base/Exchange.js +15 -2
- package/js/src/base/types.d.ts +3 -0
- package/js/src/bequant.js +1 -1
- package/js/src/bitget.js +6 -7
- package/js/src/bitmart.js +1 -1
- package/js/src/bitrue.js +14 -35
- package/js/src/bitso.js +33 -0
- package/js/src/bitstamp.js +33 -0
- package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
- package/js/src/{huobijp.js → bittrade.js} +35 -35
- package/js/src/blofin.d.ts +42 -2
- package/js/src/blofin.js +154 -13
- package/js/src/btcbox.js +25 -5
- package/js/src/bybit.js +16 -40
- package/js/src/cex.js +2 -4
- package/js/src/coinbase.js +58 -46
- package/js/src/coinbaseexchange.js +142 -32
- package/js/src/coincatch.js +14 -67
- package/js/src/coinex.js +28 -29
- package/js/src/coinlist.js +16 -15
- package/js/src/coinmetro.js +22 -11
- package/js/src/coinone.js +8 -10
- package/js/src/coinsph.d.ts +10 -1
- package/js/src/coinsph.js +126 -1
- package/js/src/cryptocom.d.ts +10 -1
- package/js/src/cryptocom.js +111 -1
- package/js/src/cryptomus.js +43 -89
- package/js/src/delta.js +76 -36
- package/js/src/deribit.js +4 -5
- package/js/src/derive.js +46 -10
- package/js/src/ellipx.d.ts +2 -3
- package/js/src/ellipx.js +175 -80
- package/js/src/gate.js +1 -1
- package/js/src/gemini.js +3 -5
- package/js/src/hitbtc.js +56 -69
- package/js/src/hollaex.js +107 -49
- package/js/src/htx.js +20 -44
- package/js/src/hyperliquid.js +6 -6
- package/js/src/kraken.js +29 -24
- package/js/src/kucoinfutures.d.ts +1 -0
- package/js/src/kucoinfutures.js +6 -0
- package/js/src/lbank.js +1 -1
- package/js/src/mexc.js +2 -2
- package/js/src/ndax.js +25 -24
- package/js/src/okcoin.js +12 -31
- package/js/src/okx.js +9 -0
- package/js/src/onetrading.js +9 -6
- package/js/src/oxfun.js +42 -114
- package/js/src/paradex.d.ts +12 -1
- package/js/src/paradex.js +124 -4
- package/js/src/pro/binance.d.ts +26 -26
- package/js/src/pro/binance.js +32 -33
- package/js/src/pro/bithumb.js +5 -3
- package/js/src/pro/{huobijp.d.ts → bittrade.d.ts} +6 -6
- package/js/src/pro/{huobijp.js → bittrade.js} +7 -7
- package/js/src/pro/kraken.d.ts +7 -6
- package/js/src/pro/kraken.js +290 -80
- package/js/src/pro/luno.js +6 -5
- package/js/src/pro/mexc.d.ts +58 -0
- package/js/src/pro/mexc.js +304 -7
- package/js/src/pro/poloniex.d.ts +1 -1
- package/js/src/pro/poloniex.js +6 -2
- package/package.json +1 -1
- package/js/src/abstract/bl3p.d.ts +0 -22
- package/js/src/abstract/huobijp.js +0 -11
- package/js/src/abstract/idex.d.ts +0 -29
- package/js/src/abstract/idex.js +0 -11
- package/js/src/abstract/kuna.d.ts +0 -185
- package/js/src/abstract/kuna.js +0 -11
- package/js/src/bl3p.d.ts +0 -116
- package/js/src/bl3p.js +0 -552
- package/js/src/idex.d.ts +0 -312
- package/js/src/idex.js +0 -1961
- package/js/src/kuna.d.ts +0 -335
- package/js/src/kuna.js +0 -2006
- package/js/src/pro/idex.d.ts +0 -81
- package/js/src/pro/idex.js +0 -720
- /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
- /package/js/src/abstract/{bl3p.js → bittrade.js} +0 -0
package/dist/cjs/src/hitbtc.js
CHANGED
|
@@ -918,29 +918,46 @@ class hitbtc extends hitbtc$1 {
|
|
|
918
918
|
async fetchCurrencies(params = {}) {
|
|
919
919
|
const response = await this.publicGetPublicCurrency(params);
|
|
920
920
|
//
|
|
921
|
-
//
|
|
922
|
-
//
|
|
923
|
-
//
|
|
924
|
-
//
|
|
925
|
-
//
|
|
926
|
-
//
|
|
927
|
-
//
|
|
928
|
-
//
|
|
929
|
-
//
|
|
930
|
-
//
|
|
931
|
-
//
|
|
932
|
-
//
|
|
933
|
-
//
|
|
934
|
-
//
|
|
935
|
-
//
|
|
936
|
-
//
|
|
937
|
-
//
|
|
938
|
-
//
|
|
939
|
-
//
|
|
940
|
-
//
|
|
941
|
-
//
|
|
942
|
-
//
|
|
943
|
-
//
|
|
921
|
+
// {
|
|
922
|
+
// "DFC": {
|
|
923
|
+
// "full_name": "DeFiScale",
|
|
924
|
+
// "crypto": true,
|
|
925
|
+
// "payin_enabled": false,
|
|
926
|
+
// "payout_enabled": true,
|
|
927
|
+
// "transfer_enabled": false,
|
|
928
|
+
// "transfer_to_wallet_enabled": true,
|
|
929
|
+
// "transfer_to_exchange_enabled": false,
|
|
930
|
+
// "sign": "D",
|
|
931
|
+
// "crypto_payment_id_name": "",
|
|
932
|
+
// "crypto_explorer": "https://etherscan.io/tx/{tx}",
|
|
933
|
+
// "precision_transfer": "0.00000001",
|
|
934
|
+
// "delisted": false,
|
|
935
|
+
// "networks": [
|
|
936
|
+
// {
|
|
937
|
+
// "code": "ETH",
|
|
938
|
+
// "network_name": "Ethereum",
|
|
939
|
+
// "network": "ETH",
|
|
940
|
+
// "protocol": "ERC-20",
|
|
941
|
+
// "default": true,
|
|
942
|
+
// "is_ens_available": true,
|
|
943
|
+
// "payin_enabled": true,
|
|
944
|
+
// "payout_enabled": true,
|
|
945
|
+
// "precision_payout": "0.000000000000000001",
|
|
946
|
+
// "payout_fee": "277000.0000000000",
|
|
947
|
+
// "payout_is_payment_id": false,
|
|
948
|
+
// "payin_payment_id": false,
|
|
949
|
+
// "payin_confirmations": "2",
|
|
950
|
+
// "contract_address": "0x1b2a76da77d03b7fc21189d9838f55bd849014af",
|
|
951
|
+
// "crypto_payment_id_name": "",
|
|
952
|
+
// "crypto_explorer": "https://etherscan.io/tx/{tx}",
|
|
953
|
+
// "is_multichain": true,
|
|
954
|
+
// "asset_id": {
|
|
955
|
+
// "contract_address": "0x1b2a76da77d03b7fc21189d9838f55bd849014af"
|
|
956
|
+
// }
|
|
957
|
+
// }
|
|
958
|
+
// ]
|
|
959
|
+
// },
|
|
960
|
+
// }
|
|
944
961
|
//
|
|
945
962
|
const result = {};
|
|
946
963
|
const currencies = Object.keys(response);
|
|
@@ -948,50 +965,22 @@ class hitbtc extends hitbtc$1 {
|
|
|
948
965
|
const currencyId = currencies[i];
|
|
949
966
|
const code = this.safeCurrencyCode(currencyId);
|
|
950
967
|
const entry = response[currencyId];
|
|
951
|
-
const
|
|
952
|
-
const precision = this.safeNumber(entry, 'precision_transfer');
|
|
953
|
-
const payinEnabled = this.safeBool(entry, 'payin_enabled', false);
|
|
954
|
-
const payoutEnabled = this.safeBool(entry, 'payout_enabled', false);
|
|
955
|
-
const transferEnabled = this.safeBool(entry, 'transfer_enabled', false);
|
|
956
|
-
const active = payinEnabled && payoutEnabled && transferEnabled;
|
|
957
|
-
const rawNetworks = this.safeValue(entry, 'networks', []);
|
|
958
|
-
const isCrypto = this.safeBool(entry, 'crypto');
|
|
959
|
-
const type = isCrypto ? 'crypto' : 'fiat';
|
|
968
|
+
const rawNetworks = this.safeList(entry, 'networks', []);
|
|
960
969
|
const networks = {};
|
|
961
|
-
let fee = undefined;
|
|
962
|
-
let depositEnabled = undefined;
|
|
963
|
-
let withdrawEnabled = undefined;
|
|
964
970
|
for (let j = 0; j < rawNetworks.length; j++) {
|
|
965
971
|
const rawNetwork = rawNetworks[j];
|
|
966
972
|
const networkId = this.safeString2(rawNetwork, 'protocol', 'network');
|
|
967
973
|
let networkCode = this.networkIdToCode(networkId);
|
|
968
|
-
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() :
|
|
969
|
-
fee = this.safeNumber(rawNetwork, 'payout_fee');
|
|
970
|
-
const networkPrecision = this.safeNumber(rawNetwork, 'precision_payout');
|
|
971
|
-
const payinEnabledNetwork = this.safeBool(rawNetwork, 'payin_enabled', false);
|
|
972
|
-
const payoutEnabledNetwork = this.safeBool(rawNetwork, 'payout_enabled', false);
|
|
973
|
-
const activeNetwork = payinEnabledNetwork && payoutEnabledNetwork;
|
|
974
|
-
if (payinEnabledNetwork && !depositEnabled) {
|
|
975
|
-
depositEnabled = true;
|
|
976
|
-
}
|
|
977
|
-
else if (!payinEnabledNetwork) {
|
|
978
|
-
depositEnabled = false;
|
|
979
|
-
}
|
|
980
|
-
if (payoutEnabledNetwork && !withdrawEnabled) {
|
|
981
|
-
withdrawEnabled = true;
|
|
982
|
-
}
|
|
983
|
-
else if (!payoutEnabledNetwork) {
|
|
984
|
-
withdrawEnabled = false;
|
|
985
|
-
}
|
|
974
|
+
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : code; // as hitbtc is white label, ensure we safeguard from possible bugs
|
|
986
975
|
networks[networkCode] = {
|
|
987
976
|
'info': rawNetwork,
|
|
988
977
|
'id': networkId,
|
|
989
978
|
'network': networkCode,
|
|
990
|
-
'
|
|
991
|
-
'
|
|
992
|
-
'deposit':
|
|
993
|
-
'withdraw':
|
|
994
|
-
'precision':
|
|
979
|
+
'active': undefined,
|
|
980
|
+
'fee': this.safeNumber(rawNetwork, 'payout_fee'),
|
|
981
|
+
'deposit': this.safeBool(rawNetwork, 'payin_enabled'),
|
|
982
|
+
'withdraw': this.safeBool(rawNetwork, 'payout_enabled'),
|
|
983
|
+
'precision': this.safeNumber(rawNetwork, 'precision_payout'),
|
|
995
984
|
'limits': {
|
|
996
985
|
'withdraw': {
|
|
997
986
|
'min': undefined,
|
|
@@ -1000,27 +989,25 @@ class hitbtc extends hitbtc$1 {
|
|
|
1000
989
|
},
|
|
1001
990
|
};
|
|
1002
991
|
}
|
|
1003
|
-
|
|
1004
|
-
const networksLength = networksKeys.length;
|
|
1005
|
-
result[code] = {
|
|
992
|
+
result[code] = this.safeCurrencyStructure({
|
|
1006
993
|
'info': entry,
|
|
1007
994
|
'code': code,
|
|
1008
995
|
'id': currencyId,
|
|
1009
|
-
'precision':
|
|
1010
|
-
'name':
|
|
1011
|
-
'active':
|
|
1012
|
-
'deposit':
|
|
1013
|
-
'withdraw':
|
|
996
|
+
'precision': this.safeNumber(entry, 'precision_transfer'),
|
|
997
|
+
'name': this.safeString(entry, 'full_name'),
|
|
998
|
+
'active': !this.safeBool(entry, 'delisted'),
|
|
999
|
+
'deposit': this.safeBool(entry, 'payin_enabled'),
|
|
1000
|
+
'withdraw': this.safeBool(entry, 'payout_enabled'),
|
|
1014
1001
|
'networks': networks,
|
|
1015
|
-
'fee':
|
|
1002
|
+
'fee': undefined,
|
|
1016
1003
|
'limits': {
|
|
1017
1004
|
'amount': {
|
|
1018
1005
|
'min': undefined,
|
|
1019
1006
|
'max': undefined,
|
|
1020
1007
|
},
|
|
1021
1008
|
},
|
|
1022
|
-
'type':
|
|
1023
|
-
};
|
|
1009
|
+
'type': undefined, // 'crypto' field emits incorrect values
|
|
1010
|
+
});
|
|
1024
1011
|
}
|
|
1025
1012
|
return result;
|
|
1026
1013
|
}
|
package/dist/cjs/src/hollaex.js
CHANGED
|
@@ -284,6 +284,14 @@ class hollaex extends hollaex$1 {
|
|
|
284
284
|
'BNB': 'bnb',
|
|
285
285
|
'MATIC': 'matic',
|
|
286
286
|
},
|
|
287
|
+
'networksById': {
|
|
288
|
+
'eth': 'ERC20',
|
|
289
|
+
'ETH': 'ERC20',
|
|
290
|
+
'ERC20': 'ERC20',
|
|
291
|
+
'trx': 'TRC20',
|
|
292
|
+
'TRX': 'TRC20',
|
|
293
|
+
'TRC20': 'TRC20',
|
|
294
|
+
},
|
|
287
295
|
},
|
|
288
296
|
});
|
|
289
297
|
}
|
|
@@ -414,66 +422,116 @@ class hollaex extends hollaex$1 {
|
|
|
414
422
|
async fetchCurrencies(params = {}) {
|
|
415
423
|
const response = await this.publicGetConstants(params);
|
|
416
424
|
//
|
|
417
|
-
//
|
|
418
|
-
//
|
|
419
|
-
//
|
|
420
|
-
//
|
|
421
|
-
//
|
|
422
|
-
//
|
|
423
|
-
//
|
|
424
|
-
//
|
|
425
|
-
//
|
|
426
|
-
//
|
|
427
|
-
//
|
|
428
|
-
//
|
|
429
|
-
//
|
|
430
|
-
//
|
|
431
|
-
//
|
|
432
|
-
//
|
|
433
|
-
//
|
|
434
|
-
//
|
|
435
|
-
//
|
|
436
|
-
//
|
|
437
|
-
//
|
|
438
|
-
//
|
|
439
|
-
//
|
|
440
|
-
//
|
|
441
|
-
//
|
|
442
|
-
//
|
|
443
|
-
//
|
|
444
|
-
//
|
|
445
|
-
//
|
|
446
|
-
//
|
|
425
|
+
// {
|
|
426
|
+
// "coins": {
|
|
427
|
+
// "usdt": {
|
|
428
|
+
// "id": "6",
|
|
429
|
+
// "fullname": "USD Tether",
|
|
430
|
+
// "symbol": "usdt",
|
|
431
|
+
// "active": true,
|
|
432
|
+
// "verified": true,
|
|
433
|
+
// "allow_deposit": true,
|
|
434
|
+
// "allow_withdrawal": true,
|
|
435
|
+
// "withdrawal_fee": "20",
|
|
436
|
+
// "min": "1",
|
|
437
|
+
// "max": "10000000",
|
|
438
|
+
// "increment_unit": "0.0001",
|
|
439
|
+
// "logo": "https://hollaex-resources.s3.ap-southeast-1.amazonaws.com/icons/usdt.svg",
|
|
440
|
+
// "code": "usdt",
|
|
441
|
+
// "is_public": true,
|
|
442
|
+
// "meta": {
|
|
443
|
+
// "color": "#27a17a",
|
|
444
|
+
// "website": "https://tether.to",
|
|
445
|
+
// "explorer": "https://blockchair.com/tether",
|
|
446
|
+
// "decimal_points": "6"
|
|
447
|
+
// },
|
|
448
|
+
// "estimated_price": "1",
|
|
449
|
+
// "description": "<p>Tether (USDT) is a stablecoin pegged 1:1 to the US dollar. It is a digital currency that aims to maintain its value while allowing for fast and secure transfer of funds. It was the first stablecoin, and is the most widely used due stablecoin due to its stability and low volatility compared to other cryptocurrencies. It was launched in 2014 by Tether Limited.</p>",
|
|
450
|
+
// "type": "blockchain",
|
|
451
|
+
// "network": "eth,trx,bnb,matic",
|
|
452
|
+
// "standard": "",
|
|
453
|
+
// "issuer": "HollaEx",
|
|
454
|
+
// "withdrawal_fees": {
|
|
455
|
+
// "bnb": {
|
|
456
|
+
// "value": "0.8",
|
|
457
|
+
// "active": true,
|
|
458
|
+
// "symbol": "usdt"
|
|
459
|
+
// },
|
|
460
|
+
// "eth": {
|
|
461
|
+
// "value": "1.5",
|
|
462
|
+
// "active": true,
|
|
463
|
+
// "symbol": "usdt"
|
|
464
|
+
// },
|
|
465
|
+
// "trx": {
|
|
466
|
+
// "value": "4",
|
|
467
|
+
// "active": true,
|
|
468
|
+
// "symbol": "usdt"
|
|
469
|
+
// },
|
|
470
|
+
// "matic": {
|
|
471
|
+
// "value": "0.3",
|
|
472
|
+
// "active": true,
|
|
473
|
+
// "symbol": "usdt"
|
|
474
|
+
// }
|
|
475
|
+
// },
|
|
476
|
+
// "display_name": null,
|
|
477
|
+
// "deposit_fees": null,
|
|
478
|
+
// "is_risky": false,
|
|
479
|
+
// "market_cap": "144568098696.29",
|
|
480
|
+
// "category": "stable",
|
|
481
|
+
// "created_at": "2019-08-09T10:45:43.367Z",
|
|
482
|
+
// "updated_at": "2025-03-25T17:12:37.970Z",
|
|
483
|
+
// "created_by": "168",
|
|
484
|
+
// "owner_id": "1"
|
|
485
|
+
// },
|
|
447
486
|
// },
|
|
448
487
|
// "network":"https://api.hollaex.network"
|
|
449
488
|
// }
|
|
450
489
|
//
|
|
451
|
-
const coins = this.
|
|
490
|
+
const coins = this.safeDict(response, 'coins', {});
|
|
452
491
|
const keys = Object.keys(coins);
|
|
453
492
|
const result = {};
|
|
454
493
|
for (let i = 0; i < keys.length; i++) {
|
|
455
494
|
const key = keys[i];
|
|
456
495
|
const currency = coins[key];
|
|
457
496
|
const id = this.safeString(currency, 'symbol');
|
|
458
|
-
const numericId = this.safeInteger(currency, 'id');
|
|
459
497
|
const code = this.safeCurrencyCode(id);
|
|
460
|
-
const
|
|
461
|
-
const
|
|
462
|
-
const
|
|
463
|
-
const
|
|
464
|
-
const
|
|
465
|
-
const
|
|
466
|
-
|
|
467
|
-
|
|
498
|
+
const withdrawalLimits = this.safeList(currency, 'withdrawal_limits', []);
|
|
499
|
+
const rawType = this.safeString(currency, 'type');
|
|
500
|
+
const type = (rawType === 'blockchain') ? 'crypto' : 'other';
|
|
501
|
+
const rawNetworks = this.safeDict(currency, 'withdrawal_fees', {});
|
|
502
|
+
const networks = {};
|
|
503
|
+
const networkIds = Object.keys(rawNetworks);
|
|
504
|
+
for (let j = 0; j < networkIds.length; j++) {
|
|
505
|
+
const networkId = networkIds[j];
|
|
506
|
+
const networkEntry = this.safeDict(rawNetworks, networkId);
|
|
507
|
+
const networkCode = this.networkIdToCode(networkId);
|
|
508
|
+
networks[networkCode] = {
|
|
509
|
+
'id': networkId,
|
|
510
|
+
'network': networkCode,
|
|
511
|
+
'active': this.safeBool(networkEntry, 'active'),
|
|
512
|
+
'deposit': undefined,
|
|
513
|
+
'withdraw': undefined,
|
|
514
|
+
'fee': this.safeNumber(networkEntry, 'value'),
|
|
515
|
+
'precision': undefined,
|
|
516
|
+
'limits': {
|
|
517
|
+
'withdraw': {
|
|
518
|
+
'min': undefined,
|
|
519
|
+
'max': undefined,
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
'info': networkEntry,
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
result[code] = this.safeCurrencyStructure({
|
|
468
526
|
'id': id,
|
|
469
|
-
'numericId':
|
|
527
|
+
'numericId': this.safeInteger(currency, 'id'),
|
|
470
528
|
'code': code,
|
|
471
529
|
'info': currency,
|
|
472
|
-
'name':
|
|
473
|
-
'active': active,
|
|
474
|
-
'deposit':
|
|
475
|
-
'withdraw':
|
|
476
|
-
'fee':
|
|
530
|
+
'name': this.safeString(currency, 'fullname'),
|
|
531
|
+
'active': this.safeBool(currency, 'active'),
|
|
532
|
+
'deposit': this.safeBool(currency, 'allow_deposit'),
|
|
533
|
+
'withdraw': this.safeBool(currency, 'allow_withdrawal'),
|
|
534
|
+
'fee': this.safeNumber(currency, 'withdrawal_fee'),
|
|
477
535
|
'precision': this.safeNumber(currency, 'increment_unit'),
|
|
478
536
|
'limits': {
|
|
479
537
|
'amount': {
|
|
@@ -485,9 +543,9 @@ class hollaex extends hollaex$1 {
|
|
|
485
543
|
'max': this.safeValue(withdrawalLimits, 0),
|
|
486
544
|
},
|
|
487
545
|
},
|
|
488
|
-
'networks':
|
|
489
|
-
'type':
|
|
490
|
-
};
|
|
546
|
+
'networks': networks,
|
|
547
|
+
'type': type,
|
|
548
|
+
});
|
|
491
549
|
}
|
|
492
550
|
return result;
|
|
493
551
|
}
|
package/dist/cjs/src/htx.js
CHANGED
|
@@ -3433,9 +3433,8 @@ class htx extends htx$1 {
|
|
|
3433
3433
|
// }
|
|
3434
3434
|
// ]
|
|
3435
3435
|
// }
|
|
3436
|
-
// }
|
|
3437
3436
|
//
|
|
3438
|
-
const data = this.
|
|
3437
|
+
const data = this.safeList(response, 'data', []);
|
|
3439
3438
|
const result = {};
|
|
3440
3439
|
this.options['networkChainIdsByNames'] = {};
|
|
3441
3440
|
this.options['networkNamesByChainIds'] = {};
|
|
@@ -3443,19 +3442,11 @@ class htx extends htx$1 {
|
|
|
3443
3442
|
const entry = data[i];
|
|
3444
3443
|
const currencyId = this.safeString(entry, 'currency');
|
|
3445
3444
|
const code = this.safeCurrencyCode(currencyId);
|
|
3446
|
-
this.options['networkChainIdsByNames'][code] = {};
|
|
3447
|
-
const chains = this.safeValue(entry, 'chains', []);
|
|
3448
|
-
const networks = {};
|
|
3449
|
-
const instStatus = this.safeString(entry, 'instStatus');
|
|
3450
3445
|
const assetType = this.safeString(entry, 'assetType');
|
|
3451
3446
|
const type = assetType === '1' ? 'crypto' : 'fiat';
|
|
3452
|
-
|
|
3453
|
-
|
|
3454
|
-
|
|
3455
|
-
let minWithdraw = undefined;
|
|
3456
|
-
let maxWithdraw = undefined;
|
|
3457
|
-
let deposit = false;
|
|
3458
|
-
let withdraw = false;
|
|
3447
|
+
this.options['networkChainIdsByNames'][code] = {};
|
|
3448
|
+
const chains = this.safeList(entry, 'chains', []);
|
|
3449
|
+
const networks = {};
|
|
3459
3450
|
for (let j = 0; j < chains.length; j++) {
|
|
3460
3451
|
const chainEntry = chains[j];
|
|
3461
3452
|
const uniqueChainId = this.safeString(chainEntry, 'chain'); // i.e. usdterc20, trc20usdt ...
|
|
@@ -3463,49 +3454,34 @@ class htx extends htx$1 {
|
|
|
3463
3454
|
this.options['networkChainIdsByNames'][code][title] = uniqueChainId;
|
|
3464
3455
|
this.options['networkNamesByChainIds'][uniqueChainId] = title;
|
|
3465
3456
|
const networkCode = this.networkIdToCode(uniqueChainId);
|
|
3466
|
-
minDeposit = this.safeNumber(chainEntry, 'minDepositAmt');
|
|
3467
|
-
minWithdraw = this.safeNumber(chainEntry, 'minWithdrawAmt');
|
|
3468
|
-
maxWithdraw = this.safeNumber(chainEntry, 'maxWithdrawAmt');
|
|
3469
|
-
const withdrawStatus = this.safeString(chainEntry, 'withdrawStatus');
|
|
3470
|
-
const depositStatus = this.safeString(chainEntry, 'depositStatus');
|
|
3471
|
-
const withdrawEnabled = (withdrawStatus === 'allowed');
|
|
3472
|
-
const depositEnabled = (depositStatus === 'allowed');
|
|
3473
|
-
withdraw = (withdrawEnabled) ? withdrawEnabled : withdraw;
|
|
3474
|
-
deposit = (depositEnabled) ? depositEnabled : deposit;
|
|
3475
|
-
const active = withdrawEnabled && depositEnabled;
|
|
3476
|
-
const precision = this.parsePrecision(this.safeString(chainEntry, 'withdrawPrecision'));
|
|
3477
|
-
if (precision !== undefined) {
|
|
3478
|
-
minPrecision = (minPrecision === undefined) ? precision : Precise["default"].stringMin(precision, minPrecision);
|
|
3479
|
-
}
|
|
3480
|
-
const fee = this.safeNumber(chainEntry, 'transactFeeWithdraw');
|
|
3481
3457
|
networks[networkCode] = {
|
|
3482
3458
|
'info': chainEntry,
|
|
3483
3459
|
'id': uniqueChainId,
|
|
3484
3460
|
'network': networkCode,
|
|
3485
3461
|
'limits': {
|
|
3486
3462
|
'deposit': {
|
|
3487
|
-
'min':
|
|
3463
|
+
'min': this.safeNumber(chainEntry, 'minDepositAmt'),
|
|
3488
3464
|
'max': undefined,
|
|
3489
3465
|
},
|
|
3490
3466
|
'withdraw': {
|
|
3491
|
-
'min':
|
|
3492
|
-
'max':
|
|
3467
|
+
'min': this.safeNumber(chainEntry, 'minWithdrawAmt'),
|
|
3468
|
+
'max': this.safeNumber(chainEntry, 'maxWithdrawAmt'),
|
|
3493
3469
|
},
|
|
3494
3470
|
},
|
|
3495
|
-
'active':
|
|
3496
|
-
'deposit':
|
|
3497
|
-
'withdraw':
|
|
3498
|
-
'fee':
|
|
3499
|
-
'precision': this.parseNumber(
|
|
3471
|
+
'active': undefined,
|
|
3472
|
+
'deposit': this.safeString(chainEntry, 'depositStatus') === 'allowed',
|
|
3473
|
+
'withdraw': this.safeString(chainEntry, 'withdrawStatus') === 'allowed',
|
|
3474
|
+
'fee': this.safeNumber(chainEntry, 'transactFeeWithdraw'),
|
|
3475
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(chainEntry, 'withdrawPrecision'))),
|
|
3500
3476
|
};
|
|
3501
3477
|
}
|
|
3502
|
-
result[code] = {
|
|
3478
|
+
result[code] = this.safeCurrencyStructure({
|
|
3503
3479
|
'info': entry,
|
|
3504
3480
|
'code': code,
|
|
3505
3481
|
'id': currencyId,
|
|
3506
|
-
'active':
|
|
3507
|
-
'deposit':
|
|
3508
|
-
'withdraw':
|
|
3482
|
+
'active': this.safeString(entry, 'instStatus') === 'normal',
|
|
3483
|
+
'deposit': undefined,
|
|
3484
|
+
'withdraw': undefined,
|
|
3509
3485
|
'fee': undefined,
|
|
3510
3486
|
'name': undefined,
|
|
3511
3487
|
'type': type,
|
|
@@ -3515,17 +3491,17 @@ class htx extends htx$1 {
|
|
|
3515
3491
|
'max': undefined,
|
|
3516
3492
|
},
|
|
3517
3493
|
'withdraw': {
|
|
3518
|
-
'min':
|
|
3519
|
-
'max':
|
|
3494
|
+
'min': undefined,
|
|
3495
|
+
'max': undefined,
|
|
3520
3496
|
},
|
|
3521
3497
|
'deposit': {
|
|
3522
3498
|
'min': undefined,
|
|
3523
3499
|
'max': undefined,
|
|
3524
3500
|
},
|
|
3525
3501
|
},
|
|
3526
|
-
'precision':
|
|
3502
|
+
'precision': undefined,
|
|
3527
3503
|
'networks': networks,
|
|
3528
|
-
};
|
|
3504
|
+
});
|
|
3529
3505
|
}
|
|
3530
3506
|
return result;
|
|
3531
3507
|
}
|
|
@@ -175,12 +175,12 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
175
175
|
},
|
|
176
176
|
'fees': {
|
|
177
177
|
'swap': {
|
|
178
|
-
'taker': this.parseNumber('0.
|
|
179
|
-
'maker': this.parseNumber('0.
|
|
178
|
+
'taker': this.parseNumber('0.00045'),
|
|
179
|
+
'maker': this.parseNumber('0.00015'),
|
|
180
180
|
},
|
|
181
181
|
'spot': {
|
|
182
|
-
'taker': this.parseNumber('0.
|
|
183
|
-
'maker': this.parseNumber('0.
|
|
182
|
+
'taker': this.parseNumber('0.0007'),
|
|
183
|
+
'maker': this.parseNumber('0.0004'),
|
|
184
184
|
},
|
|
185
185
|
},
|
|
186
186
|
'requiredCredentials': {
|
|
@@ -357,7 +357,7 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
357
357
|
const id = i;
|
|
358
358
|
const name = this.safeString(data, 'name');
|
|
359
359
|
const code = this.safeCurrencyCode(name);
|
|
360
|
-
result[code] = {
|
|
360
|
+
result[code] = this.safeCurrencyStructure({
|
|
361
361
|
'id': id,
|
|
362
362
|
'name': name,
|
|
363
363
|
'code': code,
|
|
@@ -379,7 +379,7 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
379
379
|
'max': undefined,
|
|
380
380
|
},
|
|
381
381
|
},
|
|
382
|
-
};
|
|
382
|
+
});
|
|
383
383
|
}
|
|
384
384
|
return result;
|
|
385
385
|
}
|
package/dist/cjs/src/kraken.js
CHANGED
|
@@ -1646,6 +1646,8 @@ class kraken extends kraken$1 {
|
|
|
1646
1646
|
'volume': this.amountToPrecision(symbol, amount),
|
|
1647
1647
|
};
|
|
1648
1648
|
const orderRequest = this.orderRequest('createOrder', symbol, type, request, amount, price, params);
|
|
1649
|
+
const flags = this.safeString(orderRequest[0], 'oflags', '');
|
|
1650
|
+
const isUsingCost = flags.indexOf('viqc') > -1;
|
|
1649
1651
|
const response = await this.privatePostAddOrder(this.extend(orderRequest[0], orderRequest[1]));
|
|
1650
1652
|
//
|
|
1651
1653
|
// {
|
|
@@ -1657,6 +1659,10 @@ class kraken extends kraken$1 {
|
|
|
1657
1659
|
// }
|
|
1658
1660
|
//
|
|
1659
1661
|
const result = this.safeDict(response, 'result');
|
|
1662
|
+
result['usingCost'] = isUsingCost;
|
|
1663
|
+
// it's impossible to know if the order was created using cost or base currency
|
|
1664
|
+
// becuase kraken only returns something like this: { order: 'buy 10.00000000 LTCUSD @ market' }
|
|
1665
|
+
// this usingCost flag is used to help the parsing but omited from the order
|
|
1660
1666
|
return this.parseOrder(result);
|
|
1661
1667
|
}
|
|
1662
1668
|
findMarketByAltnameOrId(id) {
|
|
@@ -1749,22 +1755,15 @@ class kraken extends kraken$1 {
|
|
|
1749
1755
|
// }
|
|
1750
1756
|
//
|
|
1751
1757
|
// ws - createOrder
|
|
1752
|
-
//
|
|
1753
|
-
//
|
|
1754
|
-
//
|
|
1755
|
-
//
|
|
1756
|
-
// "status": 'ok',
|
|
1757
|
-
// "txid": 'OAVXZH-XIE54-JCYYDG'
|
|
1758
|
-
// }
|
|
1758
|
+
// {
|
|
1759
|
+
// "order_id": "OXM2QD-EALR2-YBAVEU"
|
|
1760
|
+
// }
|
|
1761
|
+
//
|
|
1759
1762
|
// ws - editOrder
|
|
1760
|
-
//
|
|
1761
|
-
//
|
|
1762
|
-
//
|
|
1763
|
-
//
|
|
1764
|
-
// "reqid": 3,
|
|
1765
|
-
// "status": "ok",
|
|
1766
|
-
// "txid": "OTI672-HJFAO-XOIPPK"
|
|
1767
|
-
// }
|
|
1763
|
+
// {
|
|
1764
|
+
// "amend_id": "TJSMEH-AA67V-YUSQ6O",
|
|
1765
|
+
// "order_id": "OXM2QD-EALR2-YBAVEU"
|
|
1766
|
+
// }
|
|
1768
1767
|
//
|
|
1769
1768
|
// {
|
|
1770
1769
|
// "error": [],
|
|
@@ -1832,6 +1831,8 @@ class kraken extends kraken$1 {
|
|
|
1832
1831
|
// "oflags": "fciq"
|
|
1833
1832
|
// }
|
|
1834
1833
|
//
|
|
1834
|
+
const isUsingCost = this.safeBool(order, 'usingCost', false);
|
|
1835
|
+
order = this.omit(order, 'usingCost');
|
|
1835
1836
|
const description = this.safeDict(order, 'descr', {});
|
|
1836
1837
|
const orderDescriptionObj = this.safeDict(order, 'descr'); // can be null
|
|
1837
1838
|
let orderDescription = undefined;
|
|
@@ -1846,11 +1847,17 @@ class kraken extends kraken$1 {
|
|
|
1846
1847
|
let marketId = undefined;
|
|
1847
1848
|
let price = undefined;
|
|
1848
1849
|
let amount = undefined;
|
|
1850
|
+
let cost = undefined;
|
|
1849
1851
|
let triggerPrice = undefined;
|
|
1850
1852
|
if (orderDescription !== undefined) {
|
|
1851
1853
|
const parts = orderDescription.split(' ');
|
|
1852
1854
|
side = this.safeString(parts, 0);
|
|
1853
|
-
|
|
1855
|
+
if (!isUsingCost) {
|
|
1856
|
+
amount = this.safeString(parts, 1);
|
|
1857
|
+
}
|
|
1858
|
+
else {
|
|
1859
|
+
cost = this.safeString(parts, 1);
|
|
1860
|
+
}
|
|
1854
1861
|
marketId = this.safeString(parts, 2);
|
|
1855
1862
|
const part4 = this.safeString(parts, 4);
|
|
1856
1863
|
const part5 = this.safeString(parts, 5);
|
|
@@ -1887,15 +1894,13 @@ class kraken extends kraken$1 {
|
|
|
1887
1894
|
// kraken truncates the cost in the api response so we will ignore it and calculate it from average & filled
|
|
1888
1895
|
// const cost = this.safeString (order, 'cost');
|
|
1889
1896
|
price = this.safeString(description, 'price', price);
|
|
1890
|
-
// when type =
|
|
1891
|
-
if ((price !== undefined) && price.endsWith('%')) {
|
|
1897
|
+
// when type = trailing stop returns price = '+50.0000%'
|
|
1898
|
+
if ((price !== undefined) && (price.endsWith('%') || Precise["default"].stringEquals(price, '0.00000') || Precise["default"].stringEquals(price, '0'))) {
|
|
1892
1899
|
price = undefined; // this is not the price we want
|
|
1893
1900
|
}
|
|
1894
|
-
if (
|
|
1901
|
+
if (price === undefined) {
|
|
1895
1902
|
price = this.safeString(description, 'price2');
|
|
1896
|
-
|
|
1897
|
-
if ((price === undefined) || Precise["default"].stringEquals(price, '0')) {
|
|
1898
|
-
price = this.safeString(order, 'price', price);
|
|
1903
|
+
price = this.safeString2(order, 'limitprice', 'price', price);
|
|
1899
1904
|
}
|
|
1900
1905
|
const flags = this.safeString(order, 'oflags', '');
|
|
1901
1906
|
let isPostOnly = flags.indexOf('post') > -1;
|
|
@@ -1917,7 +1922,7 @@ class kraken extends kraken$1 {
|
|
|
1917
1922
|
}
|
|
1918
1923
|
}
|
|
1919
1924
|
const status = this.parseOrderStatus(this.safeString(order, 'status'));
|
|
1920
|
-
let id = this.safeStringN(order, ['id', 'txid', 'amend_id']);
|
|
1925
|
+
let id = this.safeStringN(order, ['id', 'txid', 'order_id', 'amend_id']);
|
|
1921
1926
|
if ((id === undefined) || (id.startsWith('['))) {
|
|
1922
1927
|
const txid = this.safeList(order, 'txid');
|
|
1923
1928
|
id = this.safeString(txid, 0);
|
|
@@ -1985,7 +1990,7 @@ class kraken extends kraken$1 {
|
|
|
1985
1990
|
'triggerPrice': triggerPrice,
|
|
1986
1991
|
'takeProfitPrice': takeProfitPrice,
|
|
1987
1992
|
'stopLossPrice': stopLossPrice,
|
|
1988
|
-
'cost':
|
|
1993
|
+
'cost': cost,
|
|
1989
1994
|
'amount': amount,
|
|
1990
1995
|
'filled': filled,
|
|
1991
1996
|
'average': average,
|