ccxt 4.4.85 → 4.4.87
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 +18 -7
- package/dist/ccxt.browser.min.js +3 -3
- package/dist/cjs/ccxt.js +16 -9
- package/dist/cjs/src/abstract/bittrade.js +9 -0
- package/dist/cjs/src/abstract/modetrade.js +9 -0
- package/dist/cjs/src/ascendex.js +189 -155
- package/dist/cjs/src/base/Exchange.js +10 -8
- package/dist/cjs/src/bequant.js +1 -1
- package/dist/cjs/src/binance.js +1 -1
- package/dist/cjs/src/bitget.js +5 -4
- package/dist/cjs/src/bitmart.js +1 -1
- package/dist/cjs/src/bitteam.js +31 -0
- package/dist/cjs/src/bittrade.js +2049 -0
- package/dist/cjs/src/coinbase.js +2 -6
- package/dist/cjs/src/coinmetro.js +5 -1
- package/dist/cjs/src/deribit.js +4 -5
- package/dist/cjs/src/derive.js +4 -5
- package/dist/cjs/src/ellipx.js +2 -3
- package/dist/cjs/src/gate.js +92 -76
- package/dist/cjs/src/hollaex.js +107 -49
- package/dist/cjs/src/htx.js +30 -52
- package/dist/cjs/src/hyperliquid.js +36 -20
- package/dist/cjs/src/kraken.js +5 -8
- package/dist/cjs/src/mexc.js +2 -2
- package/dist/cjs/src/modetrade.js +2839 -0
- package/dist/cjs/src/ndax.js +25 -24
- package/dist/cjs/src/okcoin.js +12 -31
- package/dist/cjs/src/okx.js +104 -2
- package/dist/cjs/src/okxus.js +53 -0
- package/dist/cjs/src/onetrading.js +9 -6
- package/dist/cjs/src/oxfun.js +42 -114
- package/dist/cjs/src/paradex.js +10 -1
- package/dist/cjs/src/phemex.js +4 -6
- package/dist/cjs/src/poloniex.js +181 -170
- package/dist/cjs/src/pro/binance.js +1 -0
- package/dist/cjs/src/pro/bittrade.js +605 -0
- package/dist/cjs/src/pro/luno.js +6 -5
- package/dist/cjs/src/pro/mexc.js +3 -0
- package/dist/cjs/src/pro/modetrade.js +1334 -0
- package/dist/cjs/src/pro/okxus.js +38 -0
- package/dist/cjs/src/probit.js +18 -51
- package/dist/cjs/src/timex.js +5 -10
- package/dist/cjs/src/vertex.js +3 -4
- package/dist/cjs/src/whitebit.js +41 -11
- package/dist/cjs/src/woo.js +101 -77
- package/dist/cjs/src/woofipro.js +24 -21
- package/dist/cjs/src/xt.js +36 -44
- package/js/ccxt.d.ts +20 -11
- package/js/ccxt.js +14 -8
- package/js/src/abstract/modetrade.d.ts +122 -0
- package/js/src/abstract/myokx.d.ts +2 -0
- package/js/src/abstract/okx.d.ts +2 -0
- package/js/src/abstract/okxus.d.ts +352 -0
- package/js/src/abstract/okxus.js +11 -0
- package/js/src/ascendex.d.ts +2 -0
- package/js/src/ascendex.js +189 -155
- package/js/src/base/Exchange.js +10 -8
- package/js/src/bequant.js +1 -1
- package/js/src/binance.js +1 -1
- package/js/src/bitget.js +5 -4
- package/js/src/bitmart.js +1 -1
- package/js/src/bitteam.js +31 -0
- package/js/src/{huobijp.d.ts → bittrade.d.ts} +29 -29
- package/js/src/{huobijp.js → bittrade.js} +35 -35
- package/js/src/coinbase.js +2 -6
- package/js/src/coinmetro.js +5 -1
- package/js/src/deribit.js +4 -5
- package/js/src/derive.js +4 -3
- package/js/src/ellipx.d.ts +1 -1
- package/js/src/ellipx.js +3 -5
- package/js/src/gate.js +92 -76
- package/js/src/hollaex.js +107 -49
- package/js/src/htx.js +30 -52
- package/js/src/hyperliquid.js +36 -20
- package/js/src/kraken.js +5 -8
- package/js/src/mexc.js +2 -2
- package/js/src/modetrade.d.ts +475 -0
- package/js/src/modetrade.js +2840 -0
- package/js/src/ndax.js +25 -24
- package/js/src/okcoin.js +12 -31
- package/js/src/okx.d.ts +24 -1
- package/js/src/okx.js +104 -2
- package/js/src/okxus.d.ts +4 -0
- package/js/src/okxus.js +54 -0
- package/js/src/onetrading.js +9 -6
- package/js/src/oxfun.js +42 -114
- package/js/src/paradex.js +10 -1
- package/js/src/phemex.js +4 -6
- package/js/src/poloniex.d.ts +2 -0
- package/js/src/poloniex.js +181 -170
- package/js/src/pro/binance.js +1 -0
- 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/luno.js +6 -5
- package/js/src/pro/mexc.js +3 -0
- package/js/src/pro/modetrade.d.ts +155 -0
- package/js/src/pro/modetrade.js +1335 -0
- package/js/src/pro/okxus.d.ts +4 -0
- package/js/src/pro/okxus.js +39 -0
- package/js/src/probit.js +18 -51
- package/js/src/timex.js +5 -10
- package/js/src/vertex.js +3 -4
- package/js/src/whitebit.js +42 -11
- package/js/src/woo.d.ts +2 -0
- package/js/src/woo.js +101 -77
- package/js/src/woofipro.d.ts +2 -1
- package/js/src/woofipro.js +24 -21
- package/js/src/xt.js +36 -44
- package/package.json +1 -1
- package/js/src/abstract/kuna.d.ts +0 -185
- package/js/src/kuna.d.ts +0 -335
- package/js/src/kuna.js +0 -2006
- /package/js/src/abstract/{huobijp.d.ts → bittrade.d.ts} +0 -0
- /package/js/src/abstract/{huobijp.js → bittrade.js} +0 -0
- /package/js/src/abstract/{kuna.js → modetrade.js} +0 -0
package/dist/cjs/src/coinbase.js
CHANGED
|
@@ -1452,10 +1452,6 @@ class coinbase extends coinbase$1 {
|
|
|
1452
1452
|
this.v3PublicGetBrokerageMarketProducts(this.extend(params, { 'product_type': 'FUTURE' })),
|
|
1453
1453
|
this.v3PublicGetBrokerageMarketProducts(this.extend(params, { 'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL' })),
|
|
1454
1454
|
];
|
|
1455
|
-
if (this.checkRequiredCredentials(false)) {
|
|
1456
|
-
unresolvedContractPromises.push(this.extend(params, { 'product_type': 'FUTURE' }));
|
|
1457
|
-
unresolvedContractPromises.push(this.extend(params, { 'product_type': 'FUTURE', 'contract_expiry_type': 'PERPETUAL' }));
|
|
1458
|
-
}
|
|
1459
1455
|
}
|
|
1460
1456
|
catch (e) {
|
|
1461
1457
|
unresolvedContractPromises = []; // the sync version of ccxt won't have the promise.all line so the request is made here. Some users can't access perpetual products
|
|
@@ -1472,8 +1468,8 @@ class coinbase extends coinbase$1 {
|
|
|
1472
1468
|
const fees = this.safeDict(promises, 1, {});
|
|
1473
1469
|
const expiringFutures = this.safeDict(contractPromises, 0, {});
|
|
1474
1470
|
const perpetualFutures = this.safeDict(contractPromises, 1, {});
|
|
1475
|
-
const expiringFees = this.safeDict(contractPromises,
|
|
1476
|
-
const perpetualFees = this.safeDict(contractPromises,
|
|
1471
|
+
const expiringFees = this.safeDict(contractPromises, 0, {});
|
|
1472
|
+
const perpetualFees = this.safeDict(contractPromises, 1, {});
|
|
1477
1473
|
//
|
|
1478
1474
|
// {
|
|
1479
1475
|
// "total_volume": 0,
|
|
@@ -385,7 +385,11 @@ class coinmetro extends coinmetro$1 {
|
|
|
385
385
|
else if (typeRaw === 'fiat') {
|
|
386
386
|
type = 'fiat';
|
|
387
387
|
}
|
|
388
|
-
|
|
388
|
+
let precisionDigits = this.safeString2(currency, 'digits', 'notabeneDecimals');
|
|
389
|
+
if (code === 'RENDER') {
|
|
390
|
+
// RENDER is an exception (with broken info)
|
|
391
|
+
precisionDigits = '4';
|
|
392
|
+
}
|
|
389
393
|
result[code] = this.safeCurrencyStructure({
|
|
390
394
|
'id': id,
|
|
391
395
|
'code': code,
|
package/dist/cjs/src/deribit.js
CHANGED
|
@@ -634,18 +634,17 @@ class deribit extends deribit$1 {
|
|
|
634
634
|
// "testnet": true
|
|
635
635
|
// }
|
|
636
636
|
//
|
|
637
|
-
const data = this.
|
|
637
|
+
const data = this.safeList(response, 'result', []);
|
|
638
638
|
const result = {};
|
|
639
639
|
for (let i = 0; i < data.length; i++) {
|
|
640
640
|
const currency = data[i];
|
|
641
641
|
const currencyId = this.safeString(currency, 'currency');
|
|
642
642
|
const code = this.safeCurrencyCode(currencyId);
|
|
643
|
-
|
|
644
|
-
result[code] = {
|
|
643
|
+
result[code] = this.safeCurrencyStructure({
|
|
645
644
|
'info': currency,
|
|
646
645
|
'code': code,
|
|
647
646
|
'id': currencyId,
|
|
648
|
-
'name':
|
|
647
|
+
'name': this.safeString(currency, 'currency_long'),
|
|
649
648
|
'active': undefined,
|
|
650
649
|
'deposit': undefined,
|
|
651
650
|
'withdraw': undefined,
|
|
@@ -667,7 +666,7 @@ class deribit extends deribit$1 {
|
|
|
667
666
|
},
|
|
668
667
|
},
|
|
669
668
|
'networks': undefined,
|
|
670
|
-
};
|
|
669
|
+
});
|
|
671
670
|
}
|
|
672
671
|
return result;
|
|
673
672
|
}
|
package/dist/cjs/src/derive.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('../ccxt.js');
|
|
4
3
|
var derive$1 = require('./abstract/derive.js');
|
|
5
|
-
var
|
|
4
|
+
var Precise = require('./base/Precise.js');
|
|
5
|
+
var errors = require('./base/errors.js');
|
|
6
|
+
var crypto = require('./base/functions/crypto.js');
|
|
6
7
|
var sha3 = require('./static_dependencies/noble-hashes/sha3.js');
|
|
7
8
|
var secp256k1 = require('./static_dependencies/noble-curves/secp256k1.js');
|
|
8
|
-
var
|
|
9
|
-
var errors = require('./base/errors.js');
|
|
10
|
-
var Precise = require('./base/Precise.js');
|
|
9
|
+
var number = require('./base/functions/number.js');
|
|
11
10
|
|
|
12
11
|
// ----------------------------------------------------------------------------
|
|
13
12
|
// ---------------------------------------------------------------------------
|
package/dist/cjs/src/ellipx.js
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var ellipx$1 = require('./abstract/ellipx.js');
|
|
4
4
|
var errors = require('./base/errors.js');
|
|
5
|
-
var number = require('./base/functions/number.js');
|
|
6
|
-
require('../ccxt.js');
|
|
7
|
-
var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
|
|
8
5
|
var ed25519 = require('./static_dependencies/noble-curves/ed25519.js');
|
|
9
6
|
var crypto = require('./base/functions/crypto.js');
|
|
10
7
|
var Precise = require('./base/Precise.js');
|
|
8
|
+
var sha256 = require('./static_dependencies/noble-hashes/sha256.js');
|
|
9
|
+
var number = require('./base/functions/number.js');
|
|
11
10
|
|
|
12
11
|
// ----------------------------------------------------------------------------
|
|
13
12
|
// ---------------------------------------------------------------------------
|
package/dist/cjs/src/gate.js
CHANGED
|
@@ -108,7 +108,7 @@ class gate extends gate$1 {
|
|
|
108
108
|
'fetchCurrencies': true,
|
|
109
109
|
'fetchDepositAddress': true,
|
|
110
110
|
'fetchDepositAddresses': false,
|
|
111
|
-
'fetchDepositAddressesByNetwork':
|
|
111
|
+
'fetchDepositAddressesByNetwork': true,
|
|
112
112
|
'fetchDeposits': true,
|
|
113
113
|
'fetchDepositWithdrawFee': 'emulated',
|
|
114
114
|
'fetchDepositWithdrawFees': true,
|
|
@@ -717,6 +717,16 @@ class gate extends gate$1 {
|
|
|
717
717
|
},
|
|
718
718
|
'networksById': {
|
|
719
719
|
'OPETH': 'OP',
|
|
720
|
+
'ETH': 'ERC20',
|
|
721
|
+
'ERC20': 'ERC20',
|
|
722
|
+
'TRX': 'TRC20',
|
|
723
|
+
'TRC20': 'TRC20',
|
|
724
|
+
'HT': 'HRC20',
|
|
725
|
+
'HECO': 'HRC20',
|
|
726
|
+
'BSC': 'BEP20',
|
|
727
|
+
'BEP20': 'BEP20',
|
|
728
|
+
'POLYGON': 'MATIC',
|
|
729
|
+
'POL': 'MATIC',
|
|
720
730
|
},
|
|
721
731
|
'timeInForce': {
|
|
722
732
|
'GTC': 'gtc',
|
|
@@ -1213,6 +1223,9 @@ class gate extends gate$1 {
|
|
|
1213
1223
|
if (this.options['adjustForTimeDifference']) {
|
|
1214
1224
|
await this.loadTimeDifference();
|
|
1215
1225
|
}
|
|
1226
|
+
if (this.checkRequiredCredentials(false)) {
|
|
1227
|
+
await this.loadUnifiedStatus();
|
|
1228
|
+
}
|
|
1216
1229
|
const sandboxMode = this.safeBool(this.options, 'sandboxMode', false);
|
|
1217
1230
|
let rawPromises = [
|
|
1218
1231
|
this.fetchContractMarkets(params),
|
|
@@ -1826,88 +1839,93 @@ class gate extends gate$1 {
|
|
|
1826
1839
|
if (apiBackup !== undefined) {
|
|
1827
1840
|
return undefined;
|
|
1828
1841
|
}
|
|
1829
|
-
if (this.checkRequiredCredentials(false)) {
|
|
1830
|
-
await this.loadUnifiedStatus();
|
|
1831
|
-
}
|
|
1832
1842
|
const response = await this.publicSpotGetCurrencies(params);
|
|
1833
1843
|
//
|
|
1834
|
-
//
|
|
1835
|
-
//
|
|
1836
|
-
//
|
|
1837
|
-
//
|
|
1838
|
-
//
|
|
1839
|
-
//
|
|
1840
|
-
//
|
|
1841
|
-
//
|
|
1842
|
-
//
|
|
1843
|
-
//
|
|
1844
|
-
//
|
|
1845
|
-
//
|
|
1844
|
+
// [
|
|
1845
|
+
// {
|
|
1846
|
+
// "currency": "USDT",
|
|
1847
|
+
// "name": "Tether",
|
|
1848
|
+
// "delisted": false,
|
|
1849
|
+
// "withdraw_disabled": false,
|
|
1850
|
+
// "withdraw_delayed": false,
|
|
1851
|
+
// "deposit_disabled": false,
|
|
1852
|
+
// "trade_disabled": false,
|
|
1853
|
+
// "fixed_rate": "",
|
|
1854
|
+
// "chain": "ETH",
|
|
1855
|
+
// "chains": [
|
|
1856
|
+
// {
|
|
1857
|
+
// "name": "ETH",
|
|
1858
|
+
// "addr": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
|
1859
|
+
// "withdraw_disabled": false,
|
|
1860
|
+
// "withdraw_delayed": false,
|
|
1861
|
+
// "deposit_disabled": false
|
|
1862
|
+
// },
|
|
1863
|
+
// {
|
|
1864
|
+
// "name": "ARBEVM",
|
|
1865
|
+
// "addr": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
|
|
1866
|
+
// "withdraw_disabled": false,
|
|
1867
|
+
// "withdraw_delayed": false,
|
|
1868
|
+
// "deposit_disabled": false
|
|
1869
|
+
// },
|
|
1870
|
+
// {
|
|
1871
|
+
// "name": "BSC",
|
|
1872
|
+
// "addr": "0x55d398326f99059fF775485246999027B3197955",
|
|
1873
|
+
// "withdraw_disabled": false,
|
|
1874
|
+
// "withdraw_delayed": false,
|
|
1875
|
+
// "deposit_disabled": false
|
|
1876
|
+
// },
|
|
1877
|
+
// ]
|
|
1878
|
+
// },
|
|
1879
|
+
// ]
|
|
1846
1880
|
//
|
|
1847
1881
|
const indexedCurrencies = this.indexBy(response, 'currency');
|
|
1848
1882
|
const result = {};
|
|
1849
1883
|
for (let i = 0; i < response.length; i++) {
|
|
1850
1884
|
const entry = response[i];
|
|
1851
1885
|
const currencyId = this.safeString(entry, 'currency');
|
|
1852
|
-
const
|
|
1853
|
-
const partFirst = this.safeString(parts, 0);
|
|
1854
|
-
// if there's an underscore then the second part is always the chain name (except the _OLD suffix)
|
|
1855
|
-
const currencyName = currencyId.endsWith('_OLD') ? currencyId : partFirst;
|
|
1856
|
-
const withdrawDisabled = this.safeBool(entry, 'withdraw_disabled', false);
|
|
1857
|
-
const depositDisabled = this.safeBool(entry, 'deposit_disabled', false);
|
|
1858
|
-
const tradeDisabled = this.safeBool(entry, 'trade_disabled', false);
|
|
1859
|
-
const precision = this.parseNumber('0.0001'); // temporary safe default, because no value provided from API
|
|
1860
|
-
const code = this.safeCurrencyCode(currencyName);
|
|
1886
|
+
const code = this.safeCurrencyCode(currencyId);
|
|
1861
1887
|
// check leveraged tokens (e.g. BTC3S, ETH5L)
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
'
|
|
1879
|
-
'
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
'
|
|
1884
|
-
|
|
1888
|
+
const type = this.isLeveragedCurrency(currencyId, true, indexedCurrencies) ? 'leveraged' : 'crypto';
|
|
1889
|
+
const chains = this.safeList(entry, 'chains', []);
|
|
1890
|
+
const networks = {};
|
|
1891
|
+
for (let j = 0; j < chains.length; j++) {
|
|
1892
|
+
const chain = chains[j];
|
|
1893
|
+
const networkId = this.safeString(chain, 'name');
|
|
1894
|
+
const networkCode = this.networkIdToCode(networkId);
|
|
1895
|
+
networks[networkCode] = {
|
|
1896
|
+
'info': chain,
|
|
1897
|
+
'id': networkId,
|
|
1898
|
+
'network': networkCode,
|
|
1899
|
+
'active': undefined,
|
|
1900
|
+
'deposit': !this.safeBool(chain, 'deposit_disabled'),
|
|
1901
|
+
'withdraw': !this.safeBool(chain, 'withdraw_disabled'),
|
|
1902
|
+
'fee': undefined,
|
|
1903
|
+
'precision': this.parseNumber('0.0001'),
|
|
1904
|
+
'limits': {
|
|
1905
|
+
'deposit': {
|
|
1906
|
+
'min': undefined,
|
|
1907
|
+
'max': undefined,
|
|
1908
|
+
},
|
|
1909
|
+
'withdraw': {
|
|
1910
|
+
'min': undefined,
|
|
1911
|
+
'max': undefined,
|
|
1912
|
+
},
|
|
1885
1913
|
},
|
|
1886
|
-
},
|
|
1887
|
-
'active': !tradeDisabled,
|
|
1888
|
-
'deposit': !depositDisabled,
|
|
1889
|
-
'withdraw': !withdrawDisabled,
|
|
1890
|
-
'fee': undefined,
|
|
1891
|
-
'precision': precision,
|
|
1892
|
-
};
|
|
1893
|
-
// check if first entry for the specific currency
|
|
1894
|
-
if (!(code in result)) {
|
|
1895
|
-
result[code] = {
|
|
1896
|
-
'id': currencyName,
|
|
1897
|
-
'lowerCaseId': currencyName.toLowerCase(),
|
|
1898
|
-
'code': code,
|
|
1899
|
-
'type': type,
|
|
1900
|
-
'precision': precision,
|
|
1901
|
-
'limits': undefined,
|
|
1902
|
-
'networks': {},
|
|
1903
|
-
'info': [], // will be filled below
|
|
1904
1914
|
};
|
|
1905
1915
|
}
|
|
1906
|
-
result[code]
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1916
|
+
result[code] = this.safeCurrencyStructure({
|
|
1917
|
+
'id': currencyId,
|
|
1918
|
+
'code': code,
|
|
1919
|
+
'name': this.safeString(entry, 'name'),
|
|
1920
|
+
'type': type,
|
|
1921
|
+
'active': !this.safeBool(entry, 'delisted'),
|
|
1922
|
+
'deposit': !this.safeBool(entry, 'deposit_disabled'),
|
|
1923
|
+
'withdraw': !this.safeBool(entry, 'withdraw_disabled'),
|
|
1924
|
+
'fee': undefined,
|
|
1925
|
+
'networks': networks,
|
|
1926
|
+
'precision': this.parseNumber('0.0001'),
|
|
1927
|
+
'info': entry,
|
|
1928
|
+
});
|
|
1911
1929
|
}
|
|
1912
1930
|
return result;
|
|
1913
1931
|
}
|
|
@@ -2179,9 +2197,7 @@ class gate extends gate$1 {
|
|
|
2179
2197
|
const chains = this.safeValue(response, 'multichain_addresses', []);
|
|
2180
2198
|
const currencyId = this.safeString(response, 'currency');
|
|
2181
2199
|
currency = this.safeCurrency(currencyId, currency);
|
|
2182
|
-
const parsed = this.parseDepositAddresses(chains,
|
|
2183
|
-
'currency': currency['id'],
|
|
2184
|
-
});
|
|
2200
|
+
const parsed = this.parseDepositAddresses(chains, undefined, false);
|
|
2185
2201
|
return this.indexBy(parsed, 'network');
|
|
2186
2202
|
}
|
|
2187
2203
|
/**
|
|
@@ -2199,8 +2215,8 @@ class gate extends gate$1 {
|
|
|
2199
2215
|
let networkCode = undefined;
|
|
2200
2216
|
[networkCode, params] = this.handleNetworkCodeAndParams(params);
|
|
2201
2217
|
const chainsIndexedById = await this.fetchDepositAddressesByNetwork(code, params);
|
|
2202
|
-
const
|
|
2203
|
-
return chainsIndexedById[
|
|
2218
|
+
const selectedNetworkIdOrCode = this.selectNetworkCodeFromUnifiedNetworks(code, networkCode, chainsIndexedById);
|
|
2219
|
+
return chainsIndexedById[selectedNetworkIdOrCode];
|
|
2204
2220
|
}
|
|
2205
2221
|
parseDepositAddress(depositAddress, currency = undefined) {
|
|
2206
2222
|
//
|
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
|
}
|