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/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
|
}
|
|
@@ -4564,6 +4540,8 @@ class htx extends htx$1 {
|
|
|
4564
4540
|
const request = {};
|
|
4565
4541
|
let marketType = undefined;
|
|
4566
4542
|
[marketType, params] = this.handleMarketTypeAndParams('fetchOpenOrders', market, params);
|
|
4543
|
+
let subType = undefined;
|
|
4544
|
+
[subType, params] = this.handleSubTypeAndParams('fetchOpenOrders', market, params, 'linear');
|
|
4567
4545
|
let response = undefined;
|
|
4568
4546
|
if (marketType === 'spot') {
|
|
4569
4547
|
if (symbol !== undefined) {
|
|
@@ -4592,18 +4570,18 @@ class htx extends htx$1 {
|
|
|
4592
4570
|
response = await this.spotPrivateGetV1OrderOpenOrders(this.extend(request, params));
|
|
4593
4571
|
}
|
|
4594
4572
|
else {
|
|
4595
|
-
if (symbol
|
|
4596
|
-
throw new
|
|
4573
|
+
if (symbol !== undefined) {
|
|
4574
|
+
// throw new ArgumentsRequired (this.id + ' fetchOpenOrders() requires a symbol argument');
|
|
4575
|
+
request['contract_code'] = market['id'];
|
|
4597
4576
|
}
|
|
4598
4577
|
if (limit !== undefined) {
|
|
4599
4578
|
request['page_size'] = limit;
|
|
4600
4579
|
}
|
|
4601
|
-
request['contract_code'] = market['id'];
|
|
4602
4580
|
const trigger = this.safeBool2(params, 'stop', 'trigger');
|
|
4603
4581
|
const stopLossTakeProfit = this.safeValue(params, 'stopLossTakeProfit');
|
|
4604
4582
|
const trailing = this.safeBool(params, 'trailing', false);
|
|
4605
4583
|
params = this.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger']);
|
|
4606
|
-
if (
|
|
4584
|
+
if (subType === 'linear') {
|
|
4607
4585
|
let marginMode = undefined;
|
|
4608
4586
|
[marginMode, params] = this.handleMarginModeAndParams('fetchOpenOrders', params);
|
|
4609
4587
|
marginMode = (marginMode === undefined) ? 'cross' : marginMode;
|
|
@@ -4636,8 +4614,8 @@ class htx extends htx$1 {
|
|
|
4636
4614
|
}
|
|
4637
4615
|
}
|
|
4638
4616
|
}
|
|
4639
|
-
else if (
|
|
4640
|
-
if (
|
|
4617
|
+
else if (subType === 'inverse') {
|
|
4618
|
+
if (marketType === 'swap') {
|
|
4641
4619
|
if (trigger) {
|
|
4642
4620
|
response = await this.contractPrivatePostSwapApiV1SwapTriggerOpenorders(this.extend(request, params));
|
|
4643
4621
|
}
|
|
@@ -4651,8 +4629,8 @@ class htx extends htx$1 {
|
|
|
4651
4629
|
response = await this.contractPrivatePostSwapApiV1SwapOpenorders(this.extend(request, params));
|
|
4652
4630
|
}
|
|
4653
4631
|
}
|
|
4654
|
-
else if (
|
|
4655
|
-
request['symbol'] = market
|
|
4632
|
+
else if (marketType === 'future') {
|
|
4633
|
+
request['symbol'] = this.safeString(market, 'settleId', 'usdt');
|
|
4656
4634
|
if (trigger) {
|
|
4657
4635
|
response = await this.contractPrivatePostApiV1ContractTriggerOpenorders(this.extend(request, params));
|
|
4658
4636
|
}
|
|
@@ -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': {
|
|
@@ -1526,7 +1526,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1526
1526
|
}
|
|
1527
1527
|
orderReq.push(orderObj);
|
|
1528
1528
|
}
|
|
1529
|
-
|
|
1529
|
+
let vaultAddress = undefined;
|
|
1530
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'createOrder', 'vaultAddress');
|
|
1531
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
1530
1532
|
const orderAction = {
|
|
1531
1533
|
'type': 'order',
|
|
1532
1534
|
'orders': orderReq,
|
|
@@ -1621,7 +1623,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1621
1623
|
}
|
|
1622
1624
|
}
|
|
1623
1625
|
cancelAction['cancels'] = cancelReq;
|
|
1624
|
-
|
|
1626
|
+
let vaultAddress = undefined;
|
|
1627
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'cancelOrders', 'vaultAddress');
|
|
1628
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
1625
1629
|
const signature = this.signL1Action(cancelAction, nonce, vaultAddress);
|
|
1626
1630
|
request['action'] = cancelAction;
|
|
1627
1631
|
request['signature'] = signature;
|
|
@@ -1705,7 +1709,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1705
1709
|
}
|
|
1706
1710
|
cancelAction['type'] = cancelByCloid ? 'cancelByCloid' : 'cancel';
|
|
1707
1711
|
cancelAction['cancels'] = cancelReq;
|
|
1708
|
-
|
|
1712
|
+
let vaultAddress = undefined;
|
|
1713
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'cancelOrdersForSymbols', 'vaultAddress');
|
|
1714
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
1709
1715
|
const signature = this.signL1Action(cancelAction, nonce, vaultAddress);
|
|
1710
1716
|
request['action'] = cancelAction;
|
|
1711
1717
|
request['signature'] = signature;
|
|
@@ -1751,7 +1757,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1751
1757
|
'type': 'scheduleCancel',
|
|
1752
1758
|
'time': nonce + timeout,
|
|
1753
1759
|
};
|
|
1754
|
-
|
|
1760
|
+
let vaultAddress = undefined;
|
|
1761
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'cancelAllOrdersAfter', 'vaultAddress');
|
|
1762
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
1755
1763
|
const signature = this.signL1Action(cancelAction, nonce, vaultAddress);
|
|
1756
1764
|
request['action'] = cancelAction;
|
|
1757
1765
|
request['signature'] = signature;
|
|
@@ -1876,7 +1884,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1876
1884
|
'type': 'batchModify',
|
|
1877
1885
|
'modifies': modifies,
|
|
1878
1886
|
};
|
|
1879
|
-
|
|
1887
|
+
let vaultAddress = undefined;
|
|
1888
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'editOrder', 'vaultAddress');
|
|
1889
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
1880
1890
|
const signature = this.signL1Action(modifyAction, nonce, vaultAddress);
|
|
1881
1891
|
const request = {
|
|
1882
1892
|
'action': modifyAction,
|
|
@@ -1885,7 +1895,6 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
1885
1895
|
// 'vaultAddress': vaultAddress,
|
|
1886
1896
|
};
|
|
1887
1897
|
if (vaultAddress !== undefined) {
|
|
1888
|
-
params = this.omit(params, 'vaultAddress');
|
|
1889
1898
|
request['vaultAddress'] = vaultAddress;
|
|
1890
1899
|
}
|
|
1891
1900
|
return request;
|
|
@@ -2740,9 +2749,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2740
2749
|
'isCross': isCross,
|
|
2741
2750
|
'leverage': leverage,
|
|
2742
2751
|
};
|
|
2743
|
-
let vaultAddress =
|
|
2752
|
+
let vaultAddress = undefined;
|
|
2753
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'setMarginMode', 'vaultAddress');
|
|
2744
2754
|
if (vaultAddress !== undefined) {
|
|
2745
|
-
params = this.omit(params, 'vaultAddress');
|
|
2746
2755
|
if (vaultAddress.startsWith('0x')) {
|
|
2747
2756
|
vaultAddress = vaultAddress.replace('0x', '');
|
|
2748
2757
|
}
|
|
@@ -2795,7 +2804,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2795
2804
|
'isCross': isCross,
|
|
2796
2805
|
'leverage': leverage,
|
|
2797
2806
|
};
|
|
2798
|
-
|
|
2807
|
+
let vaultAddress = undefined;
|
|
2808
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'setLeverage', 'vaultAddress');
|
|
2809
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
2799
2810
|
const signature = this.signL1Action(updateAction, nonce, vaultAddress);
|
|
2800
2811
|
const request = {
|
|
2801
2812
|
'action': updateAction,
|
|
@@ -2859,7 +2870,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2859
2870
|
'isBuy': true,
|
|
2860
2871
|
'ntli': sz,
|
|
2861
2872
|
};
|
|
2862
|
-
|
|
2873
|
+
let vaultAddress = undefined;
|
|
2874
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'modifyMargin', 'vaultAddress');
|
|
2875
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
2863
2876
|
const signature = this.signL1Action(updateAction, nonce, vaultAddress);
|
|
2864
2877
|
const request = {
|
|
2865
2878
|
'action': updateAction,
|
|
@@ -2868,7 +2881,6 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2868
2881
|
// 'vaultAddress': vaultAddress,
|
|
2869
2882
|
};
|
|
2870
2883
|
if (vaultAddress !== undefined) {
|
|
2871
|
-
params = this.omit(params, 'vaultAddress');
|
|
2872
2884
|
request['vaultAddress'] = vaultAddress;
|
|
2873
2885
|
}
|
|
2874
2886
|
const response = await this.privatePostExchange(request);
|
|
@@ -2927,8 +2939,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
2927
2939
|
throw new errors.NotSupported(this.id + ' transfer() only support spot <> swap transfer');
|
|
2928
2940
|
}
|
|
2929
2941
|
let strAmount = this.numberToString(amount);
|
|
2930
|
-
|
|
2931
|
-
params = this.
|
|
2942
|
+
let vaultAddress = undefined;
|
|
2943
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'transfer', 'vaultAddress');
|
|
2944
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
2932
2945
|
if (vaultAddress !== undefined) {
|
|
2933
2946
|
strAmount = strAmount + ' subaccount:' + vaultAddress;
|
|
2934
2947
|
}
|
|
@@ -3031,7 +3044,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
3031
3044
|
throw new errors.NotSupported(this.id + ' withdraw() only support USDC');
|
|
3032
3045
|
}
|
|
3033
3046
|
}
|
|
3034
|
-
|
|
3047
|
+
let vaultAddress = undefined;
|
|
3048
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'withdraw', 'vaultAddress');
|
|
3049
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
3035
3050
|
params = this.omit(params, 'vaultAddress');
|
|
3036
3051
|
const nonce = this.milliseconds();
|
|
3037
3052
|
let action = {};
|
|
@@ -3657,8 +3672,9 @@ class hyperliquid extends hyperliquid$1 {
|
|
|
3657
3672
|
}
|
|
3658
3673
|
parseCreateEditOrderArgs(id, symbol, type, side, amount, price = undefined, params = {}) {
|
|
3659
3674
|
const market = this.market(symbol);
|
|
3660
|
-
|
|
3661
|
-
params = this.
|
|
3675
|
+
let vaultAddress = undefined;
|
|
3676
|
+
[vaultAddress, params] = this.handleOptionAndParams(params, 'createOrder', 'vaultAddress');
|
|
3677
|
+
vaultAddress = this.formatVaultAddress(vaultAddress);
|
|
3662
3678
|
symbol = market['symbol'];
|
|
3663
3679
|
const order = {
|
|
3664
3680
|
'symbol': symbol,
|
package/dist/cjs/src/kraken.js
CHANGED
|
@@ -855,24 +855,21 @@ class kraken extends kraken$1 {
|
|
|
855
855
|
code = this.safeCurrencyCode(id);
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
|
-
const precision = this.parseNumber(this.parsePrecision(this.safeString(currency, 'decimals')));
|
|
859
|
-
// assumes all currencies are active except those listed above
|
|
860
|
-
const active = this.safeString(currency, 'status') === 'enabled';
|
|
861
858
|
const isFiat = code.indexOf('.HOLD') >= 0;
|
|
862
|
-
result[code] = {
|
|
859
|
+
result[code] = this.safeCurrencyStructure({
|
|
863
860
|
'id': id,
|
|
864
861
|
'code': code,
|
|
865
862
|
'info': currency,
|
|
866
863
|
'name': this.safeString(currency, 'altname'),
|
|
867
|
-
'active':
|
|
864
|
+
'active': this.safeString(currency, 'status') === 'enabled',
|
|
868
865
|
'type': isFiat ? 'fiat' : 'crypto',
|
|
869
866
|
'deposit': undefined,
|
|
870
867
|
'withdraw': undefined,
|
|
871
868
|
'fee': undefined,
|
|
872
|
-
'precision':
|
|
869
|
+
'precision': this.parseNumber(this.parsePrecision(this.safeString(currency, 'decimals'))),
|
|
873
870
|
'limits': {
|
|
874
871
|
'amount': {
|
|
875
|
-
'min':
|
|
872
|
+
'min': undefined,
|
|
876
873
|
'max': undefined,
|
|
877
874
|
},
|
|
878
875
|
'withdraw': {
|
|
@@ -881,7 +878,7 @@ class kraken extends kraken$1 {
|
|
|
881
878
|
},
|
|
882
879
|
},
|
|
883
880
|
'networks': {},
|
|
884
|
-
};
|
|
881
|
+
});
|
|
885
882
|
}
|
|
886
883
|
return result;
|
|
887
884
|
}
|
package/dist/cjs/src/mexc.js
CHANGED
|
@@ -1087,7 +1087,6 @@ class mexc extends mexc$1 {
|
|
|
1087
1087
|
const currency = response[i];
|
|
1088
1088
|
const id = this.safeString(currency, 'coin');
|
|
1089
1089
|
const code = this.safeCurrencyCode(id);
|
|
1090
|
-
const name = this.safeString(currency, 'name');
|
|
1091
1090
|
const networks = {};
|
|
1092
1091
|
const chains = this.safeValue(currency, 'networkList', []);
|
|
1093
1092
|
for (let j = 0; j < chains.length; j++) {
|
|
@@ -1109,13 +1108,14 @@ class mexc extends mexc$1 {
|
|
|
1109
1108
|
'max': this.safeString(chain, 'withdrawMax'),
|
|
1110
1109
|
},
|
|
1111
1110
|
},
|
|
1111
|
+
'contract': this.safeString(chain, 'contract'),
|
|
1112
1112
|
};
|
|
1113
1113
|
}
|
|
1114
1114
|
result[code] = this.safeCurrencyStructure({
|
|
1115
1115
|
'info': currency,
|
|
1116
1116
|
'id': id,
|
|
1117
1117
|
'code': code,
|
|
1118
|
-
'name': name,
|
|
1118
|
+
'name': this.safeString(currency, 'name'),
|
|
1119
1119
|
'active': undefined,
|
|
1120
1120
|
'deposit': undefined,
|
|
1121
1121
|
'withdraw': undefined,
|