ccxt 4.4.82 → 4.4.85
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 +5 -7
- package/dist/ccxt.browser.min.js +7 -7
- package/dist/cjs/ccxt.js +1 -9
- package/dist/cjs/src/apex.js +2 -1
- package/dist/cjs/src/base/Exchange.js +15 -2
- package/dist/cjs/src/bitget.js +1 -3
- 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/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 +56 -40
- 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/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/hyperliquid.js +2 -2
- 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/paradex.js +119 -3
- package/dist/cjs/src/pro/binance.js +31 -33
- package/dist/cjs/src/pro/bithumb.js +5 -3
- package/dist/cjs/src/pro/kraken.js +289 -79
- package/dist/cjs/src/pro/mexc.js +302 -8
- package/dist/cjs/src/pro/poloniex.js +6 -2
- package/examples/js/cli.js +127 -13
- package/js/ccxt.d.ts +2 -11
- package/js/ccxt.js +2 -8
- package/js/src/abstract/blofin.d.ts +8 -0
- package/js/src/abstract/btcbox.d.ts +1 -0
- package/js/src/apex.js +2 -1
- 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/bitget.js +1 -3
- package/js/src/bitrue.js +14 -35
- package/js/src/bitso.js +33 -0
- package/js/src/bitstamp.js +33 -0
- 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 +56 -40
- 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/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/hyperliquid.js +2 -2
- 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/paradex.d.ts +12 -1
- package/js/src/paradex.js +119 -3
- package/js/src/pro/binance.d.ts +26 -26
- package/js/src/pro/binance.js +31 -33
- package/js/src/pro/bithumb.js +5 -3
- package/js/src/pro/kraken.d.ts +7 -6
- package/js/src/pro/kraken.js +290 -80
- package/js/src/pro/mexc.d.ts +58 -0
- package/js/src/pro/mexc.js +302 -8
- 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/bl3p.js +0 -11
- package/js/src/abstract/idex.d.ts +0 -29
- package/js/src/abstract/idex.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/pro/idex.d.ts +0 -81
- package/js/src/pro/idex.js +0 -720
package/js/src/derive.js
CHANGED
|
@@ -453,14 +453,50 @@ export default class derive extends Exchange {
|
|
|
453
453
|
const result = {};
|
|
454
454
|
const tokenResponse = await this.publicGetGetAllCurrencies(params);
|
|
455
455
|
//
|
|
456
|
-
//
|
|
457
|
-
//
|
|
458
|
-
//
|
|
459
|
-
//
|
|
460
|
-
//
|
|
461
|
-
//
|
|
462
|
-
//
|
|
463
|
-
//
|
|
456
|
+
// {
|
|
457
|
+
// "result": [
|
|
458
|
+
// {
|
|
459
|
+
// "currency": "SEI",
|
|
460
|
+
// "instrument_types": [
|
|
461
|
+
// "perp"
|
|
462
|
+
// ],
|
|
463
|
+
// "protocol_asset_addresses": {
|
|
464
|
+
// "perp": "0x7225889B75fd34C68eA3098dAE04D50553C09840",
|
|
465
|
+
// "option": null,
|
|
466
|
+
// "spot": null,
|
|
467
|
+
// "underlying_erc20": null
|
|
468
|
+
// },
|
|
469
|
+
// "managers": [
|
|
470
|
+
// {
|
|
471
|
+
// "address": "0x28c9ddF9A3B29c2E6a561c1BC520954e5A33de5D",
|
|
472
|
+
// "margin_type": "SM",
|
|
473
|
+
// "currency": null
|
|
474
|
+
// }
|
|
475
|
+
// ],
|
|
476
|
+
// "srm_im_discount": "0",
|
|
477
|
+
// "srm_mm_discount": "0",
|
|
478
|
+
// "pm2_collateral_discounts": [],
|
|
479
|
+
// "borrow_apy": "0",
|
|
480
|
+
// "supply_apy": "0",
|
|
481
|
+
// "total_borrow": "0",
|
|
482
|
+
// "total_supply": "0",
|
|
483
|
+
// "asset_cap_and_supply_per_manager": {
|
|
484
|
+
// "perp": {
|
|
485
|
+
// "SM": [
|
|
486
|
+
// {
|
|
487
|
+
// "current_open_interest": "0",
|
|
488
|
+
// "interest_cap": "2000000",
|
|
489
|
+
// "manager_currency": null
|
|
490
|
+
// }
|
|
491
|
+
// ]
|
|
492
|
+
// },
|
|
493
|
+
// "option": {},
|
|
494
|
+
// "erc20": {}
|
|
495
|
+
// },
|
|
496
|
+
// "market_type": "SRM_PERP_ONLY",
|
|
497
|
+
// "spot_price": "0.2193542905042081",
|
|
498
|
+
// "spot_price_24h": "0.238381655533635830"
|
|
499
|
+
// },
|
|
464
500
|
// "id": "7e07fe1d-0ab4-4d2b-9e22-b65ce9e232dc"
|
|
465
501
|
// }
|
|
466
502
|
//
|
|
@@ -469,7 +505,7 @@ export default class derive extends Exchange {
|
|
|
469
505
|
const currency = currencies[i];
|
|
470
506
|
const currencyId = this.safeString(currency, 'currency');
|
|
471
507
|
const code = this.safeCurrencyCode(currencyId);
|
|
472
|
-
result[code] = {
|
|
508
|
+
result[code] = this.safeCurrencyStructure({
|
|
473
509
|
'id': currencyId,
|
|
474
510
|
'name': undefined,
|
|
475
511
|
'code': code,
|
|
@@ -490,7 +526,7 @@ export default class derive extends Exchange {
|
|
|
490
526
|
},
|
|
491
527
|
},
|
|
492
528
|
'info': currency,
|
|
493
|
-
};
|
|
529
|
+
});
|
|
494
530
|
}
|
|
495
531
|
return result;
|
|
496
532
|
}
|
package/js/src/ellipx.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import Exchange from './abstract/ellipx.js';
|
|
2
|
-
import { Str, Int, int, Dict, Num, Market, Ticker, OrderBook, OHLCV,
|
|
2
|
+
import { Str, Int, int, Dict, Num, Market, Ticker, OrderBook, OHLCV, Currencies, Trade, Balances, OrderType, OrderSide, Order, DepositAddress, TradingFeeInterface, Transaction } from '../ccxt.js';
|
|
3
3
|
/**
|
|
4
4
|
* @class ellipx
|
|
5
5
|
* @augments Exchange
|
|
@@ -73,7 +73,6 @@ export default class ellipx extends Exchange {
|
|
|
73
73
|
* @returns {Promise<Currencies>} An object of currency structures indexed by currency codes
|
|
74
74
|
*/
|
|
75
75
|
fetchCurrencies(params?: {}): Promise<Currencies>;
|
|
76
|
-
parseCurrency(currency: any): Currency;
|
|
77
76
|
/**
|
|
78
77
|
* @method
|
|
79
78
|
* @name ellipx#fetchTrades
|
|
@@ -222,7 +221,7 @@ export default class ellipx extends Exchange {
|
|
|
222
221
|
* @name ellipx#withdraw
|
|
223
222
|
* @description Make a withdrawal request
|
|
224
223
|
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.zegupoa8g4t9
|
|
225
|
-
* @param {string} code
|
|
224
|
+
* @param {string} code unified currency code
|
|
226
225
|
* @param {number} amount Amount to withdraw
|
|
227
226
|
* @param {string} address Destination wallet address
|
|
228
227
|
* @param {string} [tag] Additional tag/memo for currencies that require it
|
package/js/src/ellipx.js
CHANGED
|
@@ -10,7 +10,6 @@ import { AuthenticationError, BadRequest, DDoSProtection, ExchangeError, Permiss
|
|
|
10
10
|
// import { Precise } from './base/Precise.js';
|
|
11
11
|
import { TICK_SIZE } from './base/functions/number.js';
|
|
12
12
|
// import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
13
|
-
// import type { Account, Balances, Bool, Currencies, Currency, Dict, FundingRateHistory, LastPrice, LastPrices, Leverage, LeverageTier, LeverageTiers, Int, Market, Num, OHLCV, Order, OrderBook, OrderRequest, OrderSide, OrderType, Position, Str, Strings, Ticker, Tickers, Trade, TradingFeeInterface, TradingFees, Transaction, TransferEntry } from './base/types.js';
|
|
14
13
|
import { Precise } from '../ccxt.js';
|
|
15
14
|
import { sha256 } from './static_dependencies/noble-hashes/sha256.js';
|
|
16
15
|
import { ed25519 } from './static_dependencies/noble-curves/ed25519.js';
|
|
@@ -810,85 +809,181 @@ export default class ellipx extends Exchange {
|
|
|
810
809
|
'results_per_page': 100,
|
|
811
810
|
'_expand': '/Crypto_Token,/Crypto_Chain',
|
|
812
811
|
}, params));
|
|
813
|
-
const
|
|
814
|
-
const data = this.
|
|
812
|
+
const result = {};
|
|
813
|
+
const data = this.safeList(response, 'data', []);
|
|
815
814
|
for (let i = 0; i < data.length; i++) {
|
|
816
|
-
const
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
815
|
+
const networkEntry = data[i];
|
|
816
|
+
//
|
|
817
|
+
// {
|
|
818
|
+
// "Crypto_Token_Info__": "crtev-5nsn35-f4ir-g5hp-iaft-i4ztx6zu",
|
|
819
|
+
// "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
|
|
820
|
+
// "Crypto_Chain__": "chain-xjbini-7wlz-dmzf-gm7z-zf7ei6fq",
|
|
821
|
+
// "Type": "native",
|
|
822
|
+
// "Symbol": null,
|
|
823
|
+
// "Name": null,
|
|
824
|
+
// "Contract_Address": null,
|
|
825
|
+
// "Minimum_Deposit": {
|
|
826
|
+
// "v": "6",
|
|
827
|
+
// "e": "6",
|
|
828
|
+
// "f": "6.0e-6"
|
|
829
|
+
// },
|
|
830
|
+
// "Minimum_Withdraw": {
|
|
831
|
+
// "v": "15",
|
|
832
|
+
// "e": "5",
|
|
833
|
+
// "f": "0.00015"
|
|
834
|
+
// },
|
|
835
|
+
// "Withdraw_Fee": {
|
|
836
|
+
// "v": "1",
|
|
837
|
+
// "e": "4",
|
|
838
|
+
// "f": "0.0001"
|
|
839
|
+
// },
|
|
840
|
+
// "Minimum_Collect": null,
|
|
841
|
+
// "Status": "valid",
|
|
842
|
+
// "Can_Deposit": "Y",
|
|
843
|
+
// "Decimals": null,
|
|
844
|
+
// "Priority": "100",
|
|
845
|
+
// "Created": {
|
|
846
|
+
// "unix": "1727552199",
|
|
847
|
+
// "us": "0",
|
|
848
|
+
// "iso": "2024-09-28 19:36:39.000000",
|
|
849
|
+
// "tz": "UTC",
|
|
850
|
+
// "full": "1727552199000000",
|
|
851
|
+
// "unixms": "1727552199000"
|
|
852
|
+
// },
|
|
853
|
+
// "Crypto_Token": {
|
|
854
|
+
// "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
|
|
855
|
+
// "Name": "Bitcoin",
|
|
856
|
+
// "Symbol": "BTC",
|
|
857
|
+
// "Decimals": "8",
|
|
858
|
+
// "CMC_Id": "1",
|
|
859
|
+
// "Priority": "100",
|
|
860
|
+
// "Can_Deposit": "Y",
|
|
861
|
+
// "Category": "token",
|
|
862
|
+
// "Testnet": "N",
|
|
863
|
+
// "Created": {
|
|
864
|
+
// "unix": "1727552113",
|
|
865
|
+
// "us": "0",
|
|
866
|
+
// "iso": "2024-09-28 19:35:13.000000",
|
|
867
|
+
// "tz": "UTC",
|
|
868
|
+
// "full": "1727552113000000",
|
|
869
|
+
// "unixms": "1727552113000"
|
|
870
|
+
// },
|
|
871
|
+
// "Logo": [
|
|
872
|
+
// {
|
|
873
|
+
// "Crypto_Token_Logo__": "ctklg-aoozyr-rzm5-fphf-dhm7-5wbtetha",
|
|
874
|
+
// "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
|
|
875
|
+
// "Blob__": "blob-d6hvgx-37s5-dh5h-ogj5-qxqvnaoy",
|
|
876
|
+
// "Default": "Y",
|
|
877
|
+
// "Format": "png",
|
|
878
|
+
// "Priority": "0",
|
|
879
|
+
// "Created": {
|
|
880
|
+
// "unix": "1730196627",
|
|
881
|
+
// "us": "929660",
|
|
882
|
+
// "iso": "2024-10-29 10:10:27.929660",
|
|
883
|
+
// "tz": "UTC",
|
|
884
|
+
// "full": "1730196627929660",
|
|
885
|
+
// "unixms": "1730196627929"
|
|
886
|
+
// },
|
|
887
|
+
// "Source": {
|
|
888
|
+
// "Media_Image__": "blob-d6hvgx-37s5-dh5h-ogj5-qxqvnaoy",
|
|
889
|
+
// "Url": "https://static.atonline.net/image/m_X7_tnmIYFCwn6EUVQuMKqrCuPB3CMl4ONTegeYpC0wIg68YZM0CuBpbjspnYwz/1a942eab068a2173e66d08c736283cfe22e1c1ed"
|
|
890
|
+
// }
|
|
891
|
+
// }
|
|
892
|
+
// ]
|
|
893
|
+
// },
|
|
894
|
+
// "Crypto_Chain": {
|
|
895
|
+
// "Crypto_Chain__": "chain-xjbini-7wlz-dmzf-gm7z-zf7ei6fq",
|
|
896
|
+
// "EVM_Chain__": null,
|
|
897
|
+
// "Crypto_Token__": "crtok-c5v3mh-grfn-hl5d-lmel-fvggbf4i",
|
|
898
|
+
// "Name": "Bitcoin",
|
|
899
|
+
// "Key": "bitcoin",
|
|
900
|
+
// "Type": "Bitcoin",
|
|
901
|
+
// "Curve": "secp256k1",
|
|
902
|
+
// "Backend_Url": null,
|
|
903
|
+
// "Wallet_Verification_Methods": {
|
|
904
|
+
// "signature": true
|
|
905
|
+
// },
|
|
906
|
+
// "Block_Margin": "3",
|
|
907
|
+
// "Created": {
|
|
908
|
+
// "unix": "1725340084",
|
|
909
|
+
// "us": "0",
|
|
910
|
+
// "iso": "2024-09-03 05:08:04.000000",
|
|
911
|
+
// "tz": "UTC",
|
|
912
|
+
// "full": "1725340084000000",
|
|
913
|
+
// "unixms": "1725340084000"
|
|
914
|
+
// }
|
|
915
|
+
// }
|
|
916
|
+
// }
|
|
917
|
+
//
|
|
918
|
+
const id = this.safeString(networkEntry, 'Crypto_Token__');
|
|
919
|
+
const token = this.safeDict(networkEntry, 'Crypto_Token', {});
|
|
920
|
+
const code = this.safeCurrencyCode(this.safeString(token, 'Symbol'));
|
|
921
|
+
if (!(code in result)) {
|
|
922
|
+
result[code] = {
|
|
923
|
+
'id': id,
|
|
924
|
+
'code': code,
|
|
925
|
+
'info': [],
|
|
926
|
+
'type': undefined,
|
|
927
|
+
'name': this.safeString(token, 'Name'),
|
|
928
|
+
'active': undefined,
|
|
929
|
+
'deposit': undefined,
|
|
930
|
+
'withdraw': undefined,
|
|
931
|
+
'fee': undefined,
|
|
932
|
+
'precision': undefined,
|
|
933
|
+
'limits': {
|
|
934
|
+
'amount': {
|
|
935
|
+
'min': undefined,
|
|
936
|
+
'max': undefined,
|
|
937
|
+
},
|
|
938
|
+
'withdraw': {
|
|
939
|
+
'min': undefined,
|
|
940
|
+
'max': undefined,
|
|
941
|
+
},
|
|
942
|
+
'deposit': {
|
|
943
|
+
'min': undefined,
|
|
944
|
+
'max': undefined,
|
|
945
|
+
},
|
|
946
|
+
},
|
|
947
|
+
'networks': {},
|
|
948
|
+
};
|
|
820
949
|
}
|
|
950
|
+
const networkId = this.safeString(networkEntry, 'Crypto_Chain__');
|
|
951
|
+
const cryptoChainDict = this.safeString(networkEntry, 'Crypto_Chain');
|
|
952
|
+
const networkName = this.safeString(cryptoChainDict, 'Type', 'default');
|
|
953
|
+
const networkCode = this.networkIdToCode(networkName);
|
|
954
|
+
result[code]['networks'][networkCode] = {
|
|
955
|
+
'id': networkId,
|
|
956
|
+
'network': networkCode,
|
|
957
|
+
'active': this.safeString(networkEntry, 'Status') === 'valid',
|
|
958
|
+
'deposit': this.safeString(networkEntry, 'Can_Deposit') === 'Y',
|
|
959
|
+
'withdraw': undefined,
|
|
960
|
+
'fee': this.parseNumber(this.parseAmount(networkEntry['Withdraw_Fee'])),
|
|
961
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(token, 'Decimals'))),
|
|
962
|
+
'limits': {
|
|
963
|
+
'amount': {
|
|
964
|
+
'min': undefined,
|
|
965
|
+
'max': undefined,
|
|
966
|
+
},
|
|
967
|
+
'withdraw': {
|
|
968
|
+
'min': this.parseAmount(networkEntry['Minimum_Withdraw']),
|
|
969
|
+
'max': undefined,
|
|
970
|
+
},
|
|
971
|
+
'deposit': {
|
|
972
|
+
'min': this.parseAmount(networkEntry['Minimum_Deposit']),
|
|
973
|
+
'max': undefined,
|
|
974
|
+
},
|
|
975
|
+
},
|
|
976
|
+
};
|
|
977
|
+
const infos = this.safeList(result[code], 'info', []);
|
|
978
|
+
infos.push(networkEntry);
|
|
979
|
+
result[code]['info'] = infos;
|
|
821
980
|
}
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
const code = this.safeCurrencyCode(this.safeString(token, 'Symbol'));
|
|
828
|
-
const name = this.safeString(token, 'Name');
|
|
829
|
-
const active = this.safeString(currency, 'Status') === 'valid';
|
|
830
|
-
const deposit = this.safeString(currency, 'Can_Deposit') === 'Y';
|
|
831
|
-
const withdraw = this.safeString(currency, 'Status') === 'valid';
|
|
832
|
-
let fee = undefined;
|
|
833
|
-
if (currency['Withdraw_Fee'] !== undefined) {
|
|
834
|
-
fee = this.parseNumber(this.parseAmount(currency['Withdraw_Fee']));
|
|
835
|
-
}
|
|
836
|
-
const precision = this.parseNumber(this.parsePrecision(this.safeString(token, 'Decimals')));
|
|
837
|
-
let minDeposit = undefined;
|
|
838
|
-
if (currency['Minimum_Deposit'] !== undefined) {
|
|
839
|
-
minDeposit = this.parseAmount(currency['Minimum_Deposit']);
|
|
840
|
-
}
|
|
841
|
-
let minWithdraw = undefined;
|
|
842
|
-
if (currency['Minimum_Withdraw'] !== undefined) {
|
|
843
|
-
minWithdraw = this.parseAmount(currency['Minimum_Withdraw']);
|
|
981
|
+
// only after all entries are formed in currencies, restructure each entry
|
|
982
|
+
const allKeys = Object.keys(result);
|
|
983
|
+
for (let i = 0; i < allKeys.length; i++) {
|
|
984
|
+
const code = allKeys[i];
|
|
985
|
+
result[code] = this.safeCurrencyStructure(result[code]); // this is needed after adding network entry
|
|
844
986
|
}
|
|
845
|
-
const networkId = this.safeString(currency, 'Crypto_Chain__');
|
|
846
|
-
const networkData = this.safeValue(currency, 'Crypto_Chain', {});
|
|
847
|
-
const networkCode = this.safeString(networkData, 'Type', 'default');
|
|
848
|
-
const networks = {
|
|
849
|
-
'string': undefined,
|
|
850
|
-
'info': networkCode === 'default' ? {} : networkData,
|
|
851
|
-
'id': networkId || id || '',
|
|
852
|
-
'network': networkCode,
|
|
853
|
-
'active': active,
|
|
854
|
-
'deposit': deposit,
|
|
855
|
-
'withdraw': withdraw,
|
|
856
|
-
'fee': fee,
|
|
857
|
-
'precision': precision,
|
|
858
|
-
'limits': {
|
|
859
|
-
'deposit': {
|
|
860
|
-
'min': minDeposit,
|
|
861
|
-
'max': undefined,
|
|
862
|
-
},
|
|
863
|
-
'withdraw': {
|
|
864
|
-
'min': minWithdraw,
|
|
865
|
-
'max': undefined,
|
|
866
|
-
},
|
|
867
|
-
},
|
|
868
|
-
};
|
|
869
|
-
const result = {
|
|
870
|
-
'info': currency,
|
|
871
|
-
'id': id,
|
|
872
|
-
'code': code,
|
|
873
|
-
'name': name,
|
|
874
|
-
'active': active,
|
|
875
|
-
'deposit': deposit,
|
|
876
|
-
'withdraw': withdraw,
|
|
877
|
-
'fee': fee,
|
|
878
|
-
'precision': precision,
|
|
879
|
-
'type': undefined,
|
|
880
|
-
'limits': {
|
|
881
|
-
'amount': {
|
|
882
|
-
'min': undefined,
|
|
883
|
-
'max': undefined,
|
|
884
|
-
},
|
|
885
|
-
'withdraw': {
|
|
886
|
-
'min': minWithdraw,
|
|
887
|
-
'max': undefined,
|
|
888
|
-
},
|
|
889
|
-
},
|
|
890
|
-
'networks': networks,
|
|
891
|
-
};
|
|
892
987
|
return result;
|
|
893
988
|
}
|
|
894
989
|
/**
|
|
@@ -1088,14 +1183,14 @@ export default class ellipx extends Exchange {
|
|
|
1088
1183
|
for (let i = 0; i < dataArray.length; i++) {
|
|
1089
1184
|
const entry = dataArray[i];
|
|
1090
1185
|
const balance = this.safeDict(entry, 'Balance', {});
|
|
1091
|
-
const
|
|
1092
|
-
if (
|
|
1186
|
+
const code = this.safeString(balance, 'currency');
|
|
1187
|
+
if (code !== undefined) {
|
|
1093
1188
|
const account = {
|
|
1094
1189
|
'free': this.parseAmount(entry['Unencumbered_Balance']['value_xint']),
|
|
1095
1190
|
'used': this.parseAmount(entry['Liabilities']['value_xint']),
|
|
1096
1191
|
'total': this.parseAmount(balance['value_xint']),
|
|
1097
1192
|
};
|
|
1098
|
-
result[
|
|
1193
|
+
result[code] = account;
|
|
1099
1194
|
}
|
|
1100
1195
|
}
|
|
1101
1196
|
return this.safeBalance(result);
|
|
@@ -1718,7 +1813,7 @@ export default class ellipx extends Exchange {
|
|
|
1718
1813
|
* @name ellipx#withdraw
|
|
1719
1814
|
* @description Make a withdrawal request
|
|
1720
1815
|
* @see https://docs.google.com/document/d/1ZXzTQYffKE_EglTaKptxGQERRnunuLHEMmar7VC9syM/edit?tab=t.0#heading=h.zegupoa8g4t9
|
|
1721
|
-
* @param {string} code
|
|
1816
|
+
* @param {string} code unified currency code
|
|
1722
1817
|
* @param {number} amount Amount to withdraw
|
|
1723
1818
|
* @param {string} address Destination wallet address
|
|
1724
1819
|
* @param {string} [tag] Additional tag/memo for currencies that require it
|
package/js/src/gate.js
CHANGED
package/js/src/gemini.js
CHANGED
|
@@ -264,7 +264,7 @@ export default class gemini extends Exchange {
|
|
|
264
264
|
'fetchMarketFromWebRetries': 10,
|
|
265
265
|
'fetchMarketsFromAPI': {
|
|
266
266
|
'fetchDetailsForAllSymbols': false,
|
|
267
|
-
'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH'],
|
|
267
|
+
'quoteCurrencies': ['USDT', 'GUSD', 'USD', 'DAI', 'EUR', 'GBP', 'SGD', 'BTC', 'ETH', 'LTC', 'BCH', 'SOL'],
|
|
268
268
|
},
|
|
269
269
|
'fetchMarkets': {
|
|
270
270
|
'webApiEnable': true,
|
|
@@ -424,8 +424,6 @@ export default class gemini extends Exchange {
|
|
|
424
424
|
let networkCode = undefined;
|
|
425
425
|
if (networkId !== undefined) {
|
|
426
426
|
networkCode = this.networkIdToCode(networkId);
|
|
427
|
-
}
|
|
428
|
-
if (networkCode !== undefined) {
|
|
429
427
|
networks[networkCode] = {
|
|
430
428
|
'info': currency,
|
|
431
429
|
'id': networkId,
|
|
@@ -447,7 +445,7 @@ export default class gemini extends Exchange {
|
|
|
447
445
|
},
|
|
448
446
|
};
|
|
449
447
|
}
|
|
450
|
-
result[code] = {
|
|
448
|
+
result[code] = this.safeCurrencyStructure({
|
|
451
449
|
'info': currency,
|
|
452
450
|
'id': id,
|
|
453
451
|
'code': code,
|
|
@@ -469,7 +467,7 @@ export default class gemini extends Exchange {
|
|
|
469
467
|
},
|
|
470
468
|
},
|
|
471
469
|
'networks': networks,
|
|
472
|
-
};
|
|
470
|
+
});
|
|
473
471
|
}
|
|
474
472
|
return result;
|
|
475
473
|
}
|
package/js/src/hitbtc.js
CHANGED
|
@@ -920,29 +920,46 @@ export default class hitbtc extends Exchange {
|
|
|
920
920
|
async fetchCurrencies(params = {}) {
|
|
921
921
|
const response = await this.publicGetPublicCurrency(params);
|
|
922
922
|
//
|
|
923
|
-
//
|
|
924
|
-
//
|
|
925
|
-
//
|
|
926
|
-
//
|
|
927
|
-
//
|
|
928
|
-
//
|
|
929
|
-
//
|
|
930
|
-
//
|
|
931
|
-
//
|
|
932
|
-
//
|
|
933
|
-
//
|
|
934
|
-
//
|
|
935
|
-
//
|
|
936
|
-
//
|
|
937
|
-
//
|
|
938
|
-
//
|
|
939
|
-
//
|
|
940
|
-
//
|
|
941
|
-
//
|
|
942
|
-
//
|
|
943
|
-
//
|
|
944
|
-
//
|
|
945
|
-
//
|
|
923
|
+
// {
|
|
924
|
+
// "DFC": {
|
|
925
|
+
// "full_name": "DeFiScale",
|
|
926
|
+
// "crypto": true,
|
|
927
|
+
// "payin_enabled": false,
|
|
928
|
+
// "payout_enabled": true,
|
|
929
|
+
// "transfer_enabled": false,
|
|
930
|
+
// "transfer_to_wallet_enabled": true,
|
|
931
|
+
// "transfer_to_exchange_enabled": false,
|
|
932
|
+
// "sign": "D",
|
|
933
|
+
// "crypto_payment_id_name": "",
|
|
934
|
+
// "crypto_explorer": "https://etherscan.io/tx/{tx}",
|
|
935
|
+
// "precision_transfer": "0.00000001",
|
|
936
|
+
// "delisted": false,
|
|
937
|
+
// "networks": [
|
|
938
|
+
// {
|
|
939
|
+
// "code": "ETH",
|
|
940
|
+
// "network_name": "Ethereum",
|
|
941
|
+
// "network": "ETH",
|
|
942
|
+
// "protocol": "ERC-20",
|
|
943
|
+
// "default": true,
|
|
944
|
+
// "is_ens_available": true,
|
|
945
|
+
// "payin_enabled": true,
|
|
946
|
+
// "payout_enabled": true,
|
|
947
|
+
// "precision_payout": "0.000000000000000001",
|
|
948
|
+
// "payout_fee": "277000.0000000000",
|
|
949
|
+
// "payout_is_payment_id": false,
|
|
950
|
+
// "payin_payment_id": false,
|
|
951
|
+
// "payin_confirmations": "2",
|
|
952
|
+
// "contract_address": "0x1b2a76da77d03b7fc21189d9838f55bd849014af",
|
|
953
|
+
// "crypto_payment_id_name": "",
|
|
954
|
+
// "crypto_explorer": "https://etherscan.io/tx/{tx}",
|
|
955
|
+
// "is_multichain": true,
|
|
956
|
+
// "asset_id": {
|
|
957
|
+
// "contract_address": "0x1b2a76da77d03b7fc21189d9838f55bd849014af"
|
|
958
|
+
// }
|
|
959
|
+
// }
|
|
960
|
+
// ]
|
|
961
|
+
// },
|
|
962
|
+
// }
|
|
946
963
|
//
|
|
947
964
|
const result = {};
|
|
948
965
|
const currencies = Object.keys(response);
|
|
@@ -950,50 +967,22 @@ export default class hitbtc extends Exchange {
|
|
|
950
967
|
const currencyId = currencies[i];
|
|
951
968
|
const code = this.safeCurrencyCode(currencyId);
|
|
952
969
|
const entry = response[currencyId];
|
|
953
|
-
const
|
|
954
|
-
const precision = this.safeNumber(entry, 'precision_transfer');
|
|
955
|
-
const payinEnabled = this.safeBool(entry, 'payin_enabled', false);
|
|
956
|
-
const payoutEnabled = this.safeBool(entry, 'payout_enabled', false);
|
|
957
|
-
const transferEnabled = this.safeBool(entry, 'transfer_enabled', false);
|
|
958
|
-
const active = payinEnabled && payoutEnabled && transferEnabled;
|
|
959
|
-
const rawNetworks = this.safeValue(entry, 'networks', []);
|
|
960
|
-
const isCrypto = this.safeBool(entry, 'crypto');
|
|
961
|
-
const type = isCrypto ? 'crypto' : 'fiat';
|
|
970
|
+
const rawNetworks = this.safeList(entry, 'networks', []);
|
|
962
971
|
const networks = {};
|
|
963
|
-
let fee = undefined;
|
|
964
|
-
let depositEnabled = undefined;
|
|
965
|
-
let withdrawEnabled = undefined;
|
|
966
972
|
for (let j = 0; j < rawNetworks.length; j++) {
|
|
967
973
|
const rawNetwork = rawNetworks[j];
|
|
968
974
|
const networkId = this.safeString2(rawNetwork, 'protocol', 'network');
|
|
969
975
|
let networkCode = this.networkIdToCode(networkId);
|
|
970
|
-
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() :
|
|
971
|
-
fee = this.safeNumber(rawNetwork, 'payout_fee');
|
|
972
|
-
const networkPrecision = this.safeNumber(rawNetwork, 'precision_payout');
|
|
973
|
-
const payinEnabledNetwork = this.safeBool(rawNetwork, 'payin_enabled', false);
|
|
974
|
-
const payoutEnabledNetwork = this.safeBool(rawNetwork, 'payout_enabled', false);
|
|
975
|
-
const activeNetwork = payinEnabledNetwork && payoutEnabledNetwork;
|
|
976
|
-
if (payinEnabledNetwork && !depositEnabled) {
|
|
977
|
-
depositEnabled = true;
|
|
978
|
-
}
|
|
979
|
-
else if (!payinEnabledNetwork) {
|
|
980
|
-
depositEnabled = false;
|
|
981
|
-
}
|
|
982
|
-
if (payoutEnabledNetwork && !withdrawEnabled) {
|
|
983
|
-
withdrawEnabled = true;
|
|
984
|
-
}
|
|
985
|
-
else if (!payoutEnabledNetwork) {
|
|
986
|
-
withdrawEnabled = false;
|
|
987
|
-
}
|
|
976
|
+
networkCode = (networkCode !== undefined) ? networkCode.toUpperCase() : code; // as hitbtc is white label, ensure we safeguard from possible bugs
|
|
988
977
|
networks[networkCode] = {
|
|
989
978
|
'info': rawNetwork,
|
|
990
979
|
'id': networkId,
|
|
991
980
|
'network': networkCode,
|
|
992
|
-
'
|
|
993
|
-
'
|
|
994
|
-
'deposit':
|
|
995
|
-
'withdraw':
|
|
996
|
-
'precision':
|
|
981
|
+
'active': undefined,
|
|
982
|
+
'fee': this.safeNumber(rawNetwork, 'payout_fee'),
|
|
983
|
+
'deposit': this.safeBool(rawNetwork, 'payin_enabled'),
|
|
984
|
+
'withdraw': this.safeBool(rawNetwork, 'payout_enabled'),
|
|
985
|
+
'precision': this.safeNumber(rawNetwork, 'precision_payout'),
|
|
997
986
|
'limits': {
|
|
998
987
|
'withdraw': {
|
|
999
988
|
'min': undefined,
|
|
@@ -1002,27 +991,25 @@ export default class hitbtc extends Exchange {
|
|
|
1002
991
|
},
|
|
1003
992
|
};
|
|
1004
993
|
}
|
|
1005
|
-
|
|
1006
|
-
const networksLength = networksKeys.length;
|
|
1007
|
-
result[code] = {
|
|
994
|
+
result[code] = this.safeCurrencyStructure({
|
|
1008
995
|
'info': entry,
|
|
1009
996
|
'code': code,
|
|
1010
997
|
'id': currencyId,
|
|
1011
|
-
'precision':
|
|
1012
|
-
'name':
|
|
1013
|
-
'active':
|
|
1014
|
-
'deposit':
|
|
1015
|
-
'withdraw':
|
|
998
|
+
'precision': this.safeNumber(entry, 'precision_transfer'),
|
|
999
|
+
'name': this.safeString(entry, 'full_name'),
|
|
1000
|
+
'active': !this.safeBool(entry, 'delisted'),
|
|
1001
|
+
'deposit': this.safeBool(entry, 'payin_enabled'),
|
|
1002
|
+
'withdraw': this.safeBool(entry, 'payout_enabled'),
|
|
1016
1003
|
'networks': networks,
|
|
1017
|
-
'fee':
|
|
1004
|
+
'fee': undefined,
|
|
1018
1005
|
'limits': {
|
|
1019
1006
|
'amount': {
|
|
1020
1007
|
'min': undefined,
|
|
1021
1008
|
'max': undefined,
|
|
1022
1009
|
},
|
|
1023
1010
|
},
|
|
1024
|
-
'type':
|
|
1025
|
-
};
|
|
1011
|
+
'type': undefined, // 'crypto' field emits incorrect values
|
|
1012
|
+
});
|
|
1026
1013
|
}
|
|
1027
1014
|
return result;
|
|
1028
1015
|
}
|
package/js/src/hyperliquid.js
CHANGED
|
@@ -360,7 +360,7 @@ export default class hyperliquid extends Exchange {
|
|
|
360
360
|
const id = i;
|
|
361
361
|
const name = this.safeString(data, 'name');
|
|
362
362
|
const code = this.safeCurrencyCode(name);
|
|
363
|
-
result[code] = {
|
|
363
|
+
result[code] = this.safeCurrencyStructure({
|
|
364
364
|
'id': id,
|
|
365
365
|
'name': name,
|
|
366
366
|
'code': code,
|
|
@@ -382,7 +382,7 @@ export default class hyperliquid extends Exchange {
|
|
|
382
382
|
'max': undefined,
|
|
383
383
|
},
|
|
384
384
|
},
|
|
385
|
-
};
|
|
385
|
+
});
|
|
386
386
|
}
|
|
387
387
|
return result;
|
|
388
388
|
}
|