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/js/src/delta.js
CHANGED
|
@@ -509,31 +509,49 @@ export default class delta extends Exchange {
|
|
|
509
509
|
async fetchCurrencies(params = {}) {
|
|
510
510
|
const response = await this.publicGetAssets(params);
|
|
511
511
|
//
|
|
512
|
-
//
|
|
513
|
-
//
|
|
514
|
-
//
|
|
515
|
-
//
|
|
516
|
-
//
|
|
517
|
-
//
|
|
518
|
-
//
|
|
519
|
-
//
|
|
520
|
-
//
|
|
521
|
-
//
|
|
522
|
-
//
|
|
523
|
-
//
|
|
524
|
-
//
|
|
525
|
-
//
|
|
526
|
-
//
|
|
527
|
-
//
|
|
528
|
-
//
|
|
529
|
-
//
|
|
530
|
-
//
|
|
531
|
-
//
|
|
532
|
-
//
|
|
533
|
-
//
|
|
534
|
-
//
|
|
535
|
-
//
|
|
536
|
-
//
|
|
512
|
+
// {
|
|
513
|
+
// "result": [
|
|
514
|
+
// {
|
|
515
|
+
// "base_withdrawal_fee": "0.005000000000000000",
|
|
516
|
+
// "id": "1",
|
|
517
|
+
// "interest_credit": false,
|
|
518
|
+
// "interest_slabs": null,
|
|
519
|
+
// "kyc_deposit_limit": "0.000000000000000000",
|
|
520
|
+
// "kyc_withdrawal_limit": "0.000000000000000000",
|
|
521
|
+
// "min_withdrawal_amount": "0.010000000000000000",
|
|
522
|
+
// "minimum_precision": "4",
|
|
523
|
+
// "name": "Ethereum",
|
|
524
|
+
// "networks": [
|
|
525
|
+
// {
|
|
526
|
+
// "allowed_deposit_groups": null,
|
|
527
|
+
// "base_withdrawal_fee": "0.0025",
|
|
528
|
+
// "deposit_status": "enabled",
|
|
529
|
+
// "memo_required": false,
|
|
530
|
+
// "min_deposit_amount": "0.000050000000000000",
|
|
531
|
+
// "min_withdrawal_amount": "0.010000000000000000",
|
|
532
|
+
// "minimum_deposit_confirmations": "12",
|
|
533
|
+
// "network": "ERC20",
|
|
534
|
+
// "variable_withdrawal_fee": "0",
|
|
535
|
+
// "withdrawal_status": "enabled"
|
|
536
|
+
// },
|
|
537
|
+
// {
|
|
538
|
+
// "allowed_deposit_groups": null,
|
|
539
|
+
// "base_withdrawal_fee": "0.0001",
|
|
540
|
+
// "deposit_status": "enabled",
|
|
541
|
+
// "memo_required": false,
|
|
542
|
+
// "min_deposit_amount": "0.000050000000000000",
|
|
543
|
+
// "min_withdrawal_amount": "0.000300000000000000",
|
|
544
|
+
// "minimum_deposit_confirmations": "15",
|
|
545
|
+
// "network": "BEP20(BSC)",
|
|
546
|
+
// "variable_withdrawal_fee": "0",
|
|
547
|
+
// "withdrawal_status": "enabled"
|
|
548
|
+
// }
|
|
549
|
+
// ],
|
|
550
|
+
// "precision": "18",
|
|
551
|
+
// "sort_priority": "3",
|
|
552
|
+
// "symbol": "ETH",
|
|
553
|
+
// "variable_withdrawal_fee": "0.000000000000000000"
|
|
554
|
+
// },
|
|
537
555
|
// ],
|
|
538
556
|
// "success":true
|
|
539
557
|
// }
|
|
@@ -545,20 +563,42 @@ export default class delta extends Exchange {
|
|
|
545
563
|
const id = this.safeString(currency, 'symbol');
|
|
546
564
|
const numericId = this.safeInteger(currency, 'id');
|
|
547
565
|
const code = this.safeCurrencyCode(id);
|
|
548
|
-
const
|
|
549
|
-
const
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
566
|
+
const chains = this.safeList(currency, 'networks', []);
|
|
567
|
+
const networks = {};
|
|
568
|
+
for (let j = 0; j < chains.length; j++) {
|
|
569
|
+
const chain = chains[j];
|
|
570
|
+
const networkId = this.safeString(chain, 'network');
|
|
571
|
+
const networkCode = this.networkIdToCode(networkId);
|
|
572
|
+
networks[networkCode] = {
|
|
573
|
+
'id': networkId,
|
|
574
|
+
'network': networkCode,
|
|
575
|
+
'name': this.safeString(chain, 'name'),
|
|
576
|
+
'info': chain,
|
|
577
|
+
'active': this.safeString(chain, 'status') === 'enabled',
|
|
578
|
+
'deposit': this.safeString(chain, 'deposit_status') === 'enabled',
|
|
579
|
+
'withdraw': this.safeString(chain, 'withdrawal_status') === 'enabled',
|
|
580
|
+
'fee': this.safeNumber(chain, 'base_withdrawal_fee'),
|
|
581
|
+
'limits': {
|
|
582
|
+
'deposit': {
|
|
583
|
+
'min': this.safeNumber(chain, 'min_deposit_amount'),
|
|
584
|
+
'max': undefined,
|
|
585
|
+
},
|
|
586
|
+
'withdraw': {
|
|
587
|
+
'min': this.safeNumber(chain, 'min_withdrawal_amount'),
|
|
588
|
+
'max': undefined,
|
|
589
|
+
},
|
|
590
|
+
},
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
result[code] = this.safeCurrencyStructure({
|
|
554
594
|
'id': id,
|
|
555
595
|
'numericId': numericId,
|
|
556
596
|
'code': code,
|
|
557
597
|
'name': this.safeString(currency, 'name'),
|
|
558
598
|
'info': currency,
|
|
559
|
-
'active':
|
|
560
|
-
'deposit':
|
|
561
|
-
'withdraw':
|
|
599
|
+
'active': undefined,
|
|
600
|
+
'deposit': this.safeString(currency, 'deposit_status') === 'enabled',
|
|
601
|
+
'withdraw': this.safeString(currency, 'withdrawal_status') === 'enabled',
|
|
562
602
|
'fee': this.safeNumber(currency, 'base_withdrawal_fee'),
|
|
563
603
|
'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'precision'))),
|
|
564
604
|
'limits': {
|
|
@@ -568,9 +608,9 @@ export default class delta extends Exchange {
|
|
|
568
608
|
'max': undefined,
|
|
569
609
|
},
|
|
570
610
|
},
|
|
571
|
-
'networks':
|
|
611
|
+
'networks': networks,
|
|
572
612
|
'type': 'crypto',
|
|
573
|
-
};
|
|
613
|
+
});
|
|
574
614
|
}
|
|
575
615
|
return result;
|
|
576
616
|
}
|
package/js/src/deribit.js
CHANGED
|
@@ -637,18 +637,17 @@ export default class deribit extends Exchange {
|
|
|
637
637
|
// "testnet": true
|
|
638
638
|
// }
|
|
639
639
|
//
|
|
640
|
-
const data = this.
|
|
640
|
+
const data = this.safeList(response, 'result', []);
|
|
641
641
|
const result = {};
|
|
642
642
|
for (let i = 0; i < data.length; i++) {
|
|
643
643
|
const currency = data[i];
|
|
644
644
|
const currencyId = this.safeString(currency, 'currency');
|
|
645
645
|
const code = this.safeCurrencyCode(currencyId);
|
|
646
|
-
|
|
647
|
-
result[code] = {
|
|
646
|
+
result[code] = this.safeCurrencyStructure({
|
|
648
647
|
'info': currency,
|
|
649
648
|
'code': code,
|
|
650
649
|
'id': currencyId,
|
|
651
|
-
'name':
|
|
650
|
+
'name': this.safeString(currency, 'currency_long'),
|
|
652
651
|
'active': undefined,
|
|
653
652
|
'deposit': undefined,
|
|
654
653
|
'withdraw': undefined,
|
|
@@ -670,7 +669,7 @@ export default class deribit extends Exchange {
|
|
|
670
669
|
},
|
|
671
670
|
},
|
|
672
671
|
'networks': undefined,
|
|
673
|
-
};
|
|
672
|
+
});
|
|
674
673
|
}
|
|
675
674
|
return result;
|
|
676
675
|
}
|
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
|
}
|