ccxt 4.4.86__py2.py3-none-any.whl → 4.4.88__py2.py3-none-any.whl
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.
- ccxt/__init__.py +5 -1
- ccxt/abstract/modetrade.py +119 -0
- ccxt/abstract/okxus.py +349 -0
- ccxt/async_support/__init__.py +5 -1
- ccxt/async_support/base/exchange.py +8 -5
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bitteam.py +31 -0
- ccxt/async_support/bybit.py +19 -57
- ccxt/async_support/coinmetro.py +3 -0
- ccxt/async_support/gate.py +91 -73
- ccxt/async_support/htx.py +10 -8
- ccxt/async_support/hyperliquid.py +32 -16
- ccxt/async_support/kraken.py +5 -8
- ccxt/async_support/modetrade.py +2727 -0
- ccxt/async_support/okx.py +90 -3
- ccxt/async_support/okxus.py +54 -0
- ccxt/async_support/paradex.py +4 -1
- ccxt/async_support/phemex.py +4 -6
- ccxt/async_support/poloniex.py +172 -159
- ccxt/async_support/probit.py +18 -47
- ccxt/async_support/timex.py +5 -10
- ccxt/async_support/vertex.py +3 -4
- ccxt/async_support/whitebit.py +41 -11
- ccxt/async_support/woo.py +101 -75
- ccxt/async_support/woofipro.py +25 -20
- ccxt/async_support/xt.py +31 -41
- ccxt/base/exchange.py +13 -9
- ccxt/binance.py +1 -1
- ccxt/bitteam.py +31 -0
- ccxt/bybit.py +19 -57
- ccxt/coinmetro.py +3 -0
- ccxt/gate.py +91 -73
- ccxt/htx.py +10 -8
- ccxt/hyperliquid.py +32 -16
- ccxt/kraken.py +5 -8
- ccxt/modetrade.py +2727 -0
- ccxt/okx.py +90 -3
- ccxt/okxus.py +54 -0
- ccxt/paradex.py +4 -1
- ccxt/phemex.py +4 -6
- ccxt/poloniex.py +172 -159
- ccxt/pro/__init__.py +69 -1
- ccxt/pro/modetrade.py +1271 -0
- ccxt/pro/okxus.py +38 -0
- ccxt/probit.py +18 -47
- ccxt/test/tests_async.py +17 -1
- ccxt/test/tests_sync.py +17 -1
- ccxt/timex.py +5 -10
- ccxt/vertex.py +3 -4
- ccxt/whitebit.py +41 -11
- ccxt/woo.py +100 -75
- ccxt/woofipro.py +24 -20
- ccxt/xt.py +31 -41
- {ccxt-4.4.86.dist-info → ccxt-4.4.88.dist-info}/METADATA +18 -6
- {ccxt-4.4.86.dist-info → ccxt-4.4.88.dist-info}/RECORD +58 -50
- {ccxt-4.4.86.dist-info → ccxt-4.4.88.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.86.dist-info → ccxt-4.4.88.dist-info}/WHEEL +0 -0
- {ccxt-4.4.86.dist-info → ccxt-4.4.88.dist-info}/top_level.txt +0 -0
ccxt/gate.py
CHANGED
@@ -125,7 +125,7 @@ class gate(Exchange, ImplicitAPI):
|
|
125
125
|
'fetchCurrencies': True,
|
126
126
|
'fetchDepositAddress': True,
|
127
127
|
'fetchDepositAddresses': False,
|
128
|
-
'fetchDepositAddressesByNetwork':
|
128
|
+
'fetchDepositAddressesByNetwork': True,
|
129
129
|
'fetchDeposits': True,
|
130
130
|
'fetchDepositWithdrawFee': 'emulated',
|
131
131
|
'fetchDepositWithdrawFees': True,
|
@@ -734,6 +734,16 @@ class gate(Exchange, ImplicitAPI):
|
|
734
734
|
},
|
735
735
|
'networksById': {
|
736
736
|
'OPETH': 'OP',
|
737
|
+
'ETH': 'ERC20', # for GOlang
|
738
|
+
'ERC20': 'ERC20',
|
739
|
+
'TRX': 'TRC20',
|
740
|
+
'TRC20': 'TRC20',
|
741
|
+
'HT': 'HRC20',
|
742
|
+
'HECO': 'HRC20',
|
743
|
+
'BSC': 'BEP20',
|
744
|
+
'BEP20': 'BEP20',
|
745
|
+
'POLYGON': 'MATIC',
|
746
|
+
'POL': 'MATIC',
|
737
747
|
},
|
738
748
|
'timeInForce': {
|
739
749
|
'GTC': 'gtc',
|
@@ -1223,6 +1233,8 @@ class gate(Exchange, ImplicitAPI):
|
|
1223
1233
|
"""
|
1224
1234
|
if self.options['adjustForTimeDifference']:
|
1225
1235
|
self.load_time_difference()
|
1236
|
+
if self.check_required_credentials(False):
|
1237
|
+
self.load_unified_status()
|
1226
1238
|
sandboxMode = self.safe_bool(self.options, 'sandboxMode', False)
|
1227
1239
|
rawPromises = [
|
1228
1240
|
self.fetch_contract_markets(params),
|
@@ -1796,84 +1808,92 @@ class gate(Exchange, ImplicitAPI):
|
|
1796
1808
|
apiBackup = self.safe_value(self.urls, 'apiBackup')
|
1797
1809
|
if apiBackup is not None:
|
1798
1810
|
return None
|
1799
|
-
if self.check_required_credentials(False):
|
1800
|
-
self.load_unified_status()
|
1801
1811
|
response = self.publicSpotGetCurrencies(params)
|
1802
1812
|
#
|
1803
|
-
#
|
1804
|
-
#
|
1805
|
-
#
|
1806
|
-
#
|
1807
|
-
#
|
1808
|
-
#
|
1809
|
-
#
|
1810
|
-
#
|
1811
|
-
#
|
1812
|
-
#
|
1813
|
-
#
|
1814
|
-
#
|
1813
|
+
# [
|
1814
|
+
# {
|
1815
|
+
# "currency": "USDT",
|
1816
|
+
# "name": "Tether",
|
1817
|
+
# "delisted": False,
|
1818
|
+
# "withdraw_disabled": False,
|
1819
|
+
# "withdraw_delayed": False,
|
1820
|
+
# "deposit_disabled": False,
|
1821
|
+
# "trade_disabled": False,
|
1822
|
+
# "fixed_rate": "",
|
1823
|
+
# "chain": "ETH",
|
1824
|
+
# "chains": [
|
1825
|
+
# {
|
1826
|
+
# "name": "ETH",
|
1827
|
+
# "addr": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
|
1828
|
+
# "withdraw_disabled": False,
|
1829
|
+
# "withdraw_delayed": False,
|
1830
|
+
# "deposit_disabled": False
|
1831
|
+
# },
|
1832
|
+
# {
|
1833
|
+
# "name": "ARBEVM",
|
1834
|
+
# "addr": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",
|
1835
|
+
# "withdraw_disabled": False,
|
1836
|
+
# "withdraw_delayed": False,
|
1837
|
+
# "deposit_disabled": False
|
1838
|
+
# },
|
1839
|
+
# {
|
1840
|
+
# "name": "BSC",
|
1841
|
+
# "addr": "0x55d398326f99059fF775485246999027B3197955",
|
1842
|
+
# "withdraw_disabled": False,
|
1843
|
+
# "withdraw_delayed": False,
|
1844
|
+
# "deposit_disabled": False
|
1845
|
+
# },
|
1846
|
+
# ]
|
1847
|
+
# },
|
1848
|
+
# ]
|
1815
1849
|
#
|
1816
1850
|
indexedCurrencies = self.index_by(response, 'currency')
|
1817
1851
|
result: dict = {}
|
1818
1852
|
for i in range(0, len(response)):
|
1819
1853
|
entry = response[i]
|
1820
1854
|
currencyId = self.safe_string(entry, 'currency')
|
1821
|
-
|
1822
|
-
partFirst = self.safe_string(parts, 0)
|
1823
|
-
# if there's an underscore then the second part is always the chain name(except the _OLD suffix)
|
1824
|
-
currencyName = currencyId if currencyId.endswith('_OLD') else partFirst
|
1825
|
-
withdrawDisabled = self.safe_bool(entry, 'withdraw_disabled', False)
|
1826
|
-
depositDisabled = self.safe_bool(entry, 'deposit_disabled', False)
|
1827
|
-
tradeDisabled = self.safe_bool(entry, 'trade_disabled', False)
|
1828
|
-
precision = self.parse_number('0.0001') # temporary safe default, because no value provided from API
|
1829
|
-
code = self.safe_currency_code(currencyName)
|
1855
|
+
code = self.safe_currency_code(currencyId)
|
1830
1856
|
# check leveraged tokens(e.g. BTC3S, ETH5L)
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
'
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1857
|
+
type = 'leveraged' if self.is_leveraged_currency(currencyId, True, indexedCurrencies) else 'crypto'
|
1858
|
+
chains = self.safe_list(entry, 'chains', [])
|
1859
|
+
networks = {}
|
1860
|
+
for j in range(0, len(chains)):
|
1861
|
+
chain = chains[j]
|
1862
|
+
networkId = self.safe_string(chain, 'name')
|
1863
|
+
networkCode = self.network_id_to_code(networkId)
|
1864
|
+
networks[networkCode] = {
|
1865
|
+
'info': chain,
|
1866
|
+
'id': networkId,
|
1867
|
+
'network': networkCode,
|
1868
|
+
'active': None,
|
1869
|
+
'deposit': not self.safe_bool(chain, 'deposit_disabled'),
|
1870
|
+
'withdraw': not self.safe_bool(chain, 'withdraw_disabled'),
|
1871
|
+
'fee': None,
|
1872
|
+
'precision': self.parse_number('0.0001'), # temporary safe default, because no value provided from API,
|
1873
|
+
'limits': {
|
1874
|
+
'deposit': {
|
1875
|
+
'min': None,
|
1876
|
+
'max': None,
|
1877
|
+
},
|
1878
|
+
'withdraw': {
|
1879
|
+
'min': None,
|
1880
|
+
'max': None,
|
1881
|
+
},
|
1852
1882
|
},
|
1853
|
-
},
|
1854
|
-
'active': not tradeDisabled,
|
1855
|
-
'deposit': not depositDisabled,
|
1856
|
-
'withdraw': not withdrawDisabled,
|
1857
|
-
'fee': None,
|
1858
|
-
'precision': precision,
|
1859
|
-
}
|
1860
|
-
# check if first entry for the specific currency
|
1861
|
-
if not (code in result):
|
1862
|
-
result[code] = {
|
1863
|
-
'id': currencyName,
|
1864
|
-
'lowerCaseId': currencyName.lower(),
|
1865
|
-
'code': code,
|
1866
|
-
'type': type,
|
1867
|
-
'precision': precision,
|
1868
|
-
'limits': None,
|
1869
|
-
'networks': {},
|
1870
|
-
'info': [], # will be filled below
|
1871
1883
|
}
|
1872
|
-
result[code]
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1884
|
+
result[code] = self.safe_currency_structure({
|
1885
|
+
'id': currencyId,
|
1886
|
+
'code': code,
|
1887
|
+
'name': self.safe_string(entry, 'name'),
|
1888
|
+
'type': type,
|
1889
|
+
'active': not self.safe_bool(entry, 'delisted'),
|
1890
|
+
'deposit': not self.safe_bool(entry, 'deposit_disabled'),
|
1891
|
+
'withdraw': not self.safe_bool(entry, 'withdraw_disabled'),
|
1892
|
+
'fee': None,
|
1893
|
+
'networks': networks,
|
1894
|
+
'precision': self.parse_number('0.0001'),
|
1895
|
+
'info': entry,
|
1896
|
+
})
|
1877
1897
|
return result
|
1878
1898
|
|
1879
1899
|
def fetch_funding_rate(self, symbol: str, params={}) -> FundingRate:
|
@@ -2138,9 +2158,7 @@ class gate(Exchange, ImplicitAPI):
|
|
2138
2158
|
chains = self.safe_value(response, 'multichain_addresses', [])
|
2139
2159
|
currencyId = self.safe_string(response, 'currency')
|
2140
2160
|
currency = self.safe_currency(currencyId, currency)
|
2141
|
-
parsed = self.parse_deposit_addresses(chains,
|
2142
|
-
'currency': currency['id'],
|
2143
|
-
})
|
2161
|
+
parsed = self.parse_deposit_addresses(chains, None, False)
|
2144
2162
|
return self.index_by(parsed, 'network')
|
2145
2163
|
|
2146
2164
|
def fetch_deposit_address(self, code: str, params={}) -> DepositAddress:
|
@@ -2158,8 +2176,8 @@ class gate(Exchange, ImplicitAPI):
|
|
2158
2176
|
networkCode = None
|
2159
2177
|
networkCode, params = self.handle_network_code_and_params(params)
|
2160
2178
|
chainsIndexedById = self.fetch_deposit_addresses_by_network(code, params)
|
2161
|
-
|
2162
|
-
return chainsIndexedById[
|
2179
|
+
selectedNetworkIdOrCode = self.select_network_code_from_unified_networks(code, networkCode, chainsIndexedById)
|
2180
|
+
return chainsIndexedById[selectedNetworkIdOrCode]
|
2163
2181
|
|
2164
2182
|
def parse_deposit_address(self, depositAddress, currency=None):
|
2165
2183
|
#
|
ccxt/htx.py
CHANGED
@@ -4286,6 +4286,8 @@ class htx(Exchange, ImplicitAPI):
|
|
4286
4286
|
request: dict = {}
|
4287
4287
|
marketType = None
|
4288
4288
|
marketType, params = self.handle_market_type_and_params('fetchOpenOrders', market, params)
|
4289
|
+
subType = None
|
4290
|
+
subType, params = self.handle_sub_type_and_params('fetchOpenOrders', market, params, 'linear')
|
4289
4291
|
response = None
|
4290
4292
|
if marketType == 'spot':
|
4291
4293
|
if symbol is not None:
|
@@ -4307,16 +4309,16 @@ class htx(Exchange, ImplicitAPI):
|
|
4307
4309
|
params = self.omit(params, 'account-id')
|
4308
4310
|
response = self.spotPrivateGetV1OrderOpenOrders(self.extend(request, params))
|
4309
4311
|
else:
|
4310
|
-
if symbol is None:
|
4311
|
-
raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
|
4312
|
+
if symbol is not None:
|
4313
|
+
# raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
|
4314
|
+
request['contract_code'] = market['id']
|
4312
4315
|
if limit is not None:
|
4313
4316
|
request['page_size'] = limit
|
4314
|
-
request['contract_code'] = market['id']
|
4315
4317
|
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
4316
4318
|
stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
|
4317
4319
|
trailing = self.safe_bool(params, 'trailing', False)
|
4318
4320
|
params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
|
4319
|
-
if
|
4321
|
+
if subType == 'linear':
|
4320
4322
|
marginMode = None
|
4321
4323
|
marginMode, params = self.handle_margin_mode_and_params('fetchOpenOrders', params)
|
4322
4324
|
marginMode = 'cross' if (marginMode is None) else marginMode
|
@@ -4338,8 +4340,8 @@ class htx(Exchange, ImplicitAPI):
|
|
4338
4340
|
response = self.contractPrivatePostLinearSwapApiV1SwapCrossTrackOpenorders(self.extend(request, params))
|
4339
4341
|
else:
|
4340
4342
|
response = self.contractPrivatePostLinearSwapApiV1SwapCrossOpenorders(self.extend(request, params))
|
4341
|
-
elif
|
4342
|
-
if
|
4343
|
+
elif subType == 'inverse':
|
4344
|
+
if marketType == 'swap':
|
4343
4345
|
if trigger:
|
4344
4346
|
response = self.contractPrivatePostSwapApiV1SwapTriggerOpenorders(self.extend(request, params))
|
4345
4347
|
elif stopLossTakeProfit:
|
@@ -4348,8 +4350,8 @@ class htx(Exchange, ImplicitAPI):
|
|
4348
4350
|
response = self.contractPrivatePostSwapApiV1SwapTrackOpenorders(self.extend(request, params))
|
4349
4351
|
else:
|
4350
4352
|
response = self.contractPrivatePostSwapApiV1SwapOpenorders(self.extend(request, params))
|
4351
|
-
elif
|
4352
|
-
request['symbol'] = market
|
4353
|
+
elif marketType == 'future':
|
4354
|
+
request['symbol'] = self.safe_string(market, 'settleId', 'usdt')
|
4353
4355
|
if trigger:
|
4354
4356
|
response = self.contractPrivatePostApiV1ContractTriggerOpenorders(self.extend(request, params))
|
4355
4357
|
elif stopLossTakeProfit:
|
ccxt/hyperliquid.py
CHANGED
@@ -1494,7 +1494,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1494
1494
|
if clientOrderId is not None:
|
1495
1495
|
orderObj['c'] = clientOrderId
|
1496
1496
|
orderReq.append(orderObj)
|
1497
|
-
vaultAddress =
|
1497
|
+
vaultAddress = None
|
1498
|
+
vaultAddress, params = self.handle_option_and_params(params, 'createOrder', 'vaultAddress')
|
1499
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1498
1500
|
orderAction: dict = {
|
1499
1501
|
'type': 'order',
|
1500
1502
|
'orders': orderReq,
|
@@ -1581,7 +1583,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1581
1583
|
'o': self.parse_to_numeric(ids[i]),
|
1582
1584
|
})
|
1583
1585
|
cancelAction['cancels'] = cancelReq
|
1584
|
-
vaultAddress =
|
1586
|
+
vaultAddress = None
|
1587
|
+
vaultAddress, params = self.handle_option_and_params(params, 'cancelOrders', 'vaultAddress')
|
1588
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1585
1589
|
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress)
|
1586
1590
|
request['action'] = cancelAction
|
1587
1591
|
request['signature'] = signature
|
@@ -1659,7 +1663,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1659
1663
|
cancelReq.append(cancelObj)
|
1660
1664
|
cancelAction['type'] = 'cancelByCloid' if cancelByCloid else 'cancel'
|
1661
1665
|
cancelAction['cancels'] = cancelReq
|
1662
|
-
vaultAddress =
|
1666
|
+
vaultAddress = None
|
1667
|
+
vaultAddress, params = self.handle_option_and_params(params, 'cancelOrdersForSymbols', 'vaultAddress')
|
1668
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1663
1669
|
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress)
|
1664
1670
|
request['action'] = cancelAction
|
1665
1671
|
request['signature'] = signature
|
@@ -1702,7 +1708,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1702
1708
|
'type': 'scheduleCancel',
|
1703
1709
|
'time': nonce + timeout,
|
1704
1710
|
}
|
1705
|
-
vaultAddress =
|
1711
|
+
vaultAddress = None
|
1712
|
+
vaultAddress, params = self.handle_option_and_params(params, 'cancelAllOrdersAfter', 'vaultAddress')
|
1713
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1706
1714
|
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress)
|
1707
1715
|
request['action'] = cancelAction
|
1708
1716
|
request['signature'] = signature
|
@@ -1811,7 +1819,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1811
1819
|
'type': 'batchModify',
|
1812
1820
|
'modifies': modifies,
|
1813
1821
|
}
|
1814
|
-
vaultAddress =
|
1822
|
+
vaultAddress = None
|
1823
|
+
vaultAddress, params = self.handle_option_and_params(params, 'editOrder', 'vaultAddress')
|
1824
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1815
1825
|
signature = self.sign_l1_action(modifyAction, nonce, vaultAddress)
|
1816
1826
|
request: dict = {
|
1817
1827
|
'action': modifyAction,
|
@@ -1820,7 +1830,6 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1820
1830
|
# 'vaultAddress': vaultAddress,
|
1821
1831
|
}
|
1822
1832
|
if vaultAddress is not None:
|
1823
|
-
params = self.omit(params, 'vaultAddress')
|
1824
1833
|
request['vaultAddress'] = vaultAddress
|
1825
1834
|
return request
|
1826
1835
|
|
@@ -2638,9 +2647,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2638
2647
|
'isCross': isCross,
|
2639
2648
|
'leverage': leverage,
|
2640
2649
|
}
|
2641
|
-
vaultAddress =
|
2650
|
+
vaultAddress = None
|
2651
|
+
vaultAddress, params = self.handle_option_and_params(params, 'setMarginMode', 'vaultAddress')
|
2642
2652
|
if vaultAddress is not None:
|
2643
|
-
params = self.omit(params, 'vaultAddress')
|
2644
2653
|
if vaultAddress.startswith('0x'):
|
2645
2654
|
vaultAddress = vaultAddress.replace('0x', '')
|
2646
2655
|
signature = self.sign_l1_action(updateAction, nonce, vaultAddress)
|
@@ -2687,7 +2696,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2687
2696
|
'isCross': isCross,
|
2688
2697
|
'leverage': leverage,
|
2689
2698
|
}
|
2690
|
-
vaultAddress =
|
2699
|
+
vaultAddress = None
|
2700
|
+
vaultAddress, params = self.handle_option_and_params(params, 'setLeverage', 'vaultAddress')
|
2701
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2691
2702
|
signature = self.sign_l1_action(updateAction, nonce, vaultAddress)
|
2692
2703
|
request: dict = {
|
2693
2704
|
'action': updateAction,
|
@@ -2749,7 +2760,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2749
2760
|
'isBuy': True,
|
2750
2761
|
'ntli': sz,
|
2751
2762
|
}
|
2752
|
-
vaultAddress =
|
2763
|
+
vaultAddress = None
|
2764
|
+
vaultAddress, params = self.handle_option_and_params(params, 'modifyMargin', 'vaultAddress')
|
2765
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2753
2766
|
signature = self.sign_l1_action(updateAction, nonce, vaultAddress)
|
2754
2767
|
request: dict = {
|
2755
2768
|
'action': updateAction,
|
@@ -2758,7 +2771,6 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2758
2771
|
# 'vaultAddress': vaultAddress,
|
2759
2772
|
}
|
2760
2773
|
if vaultAddress is not None:
|
2761
|
-
params = self.omit(params, 'vaultAddress')
|
2762
2774
|
request['vaultAddress'] = vaultAddress
|
2763
2775
|
response = self.privatePostExchange(request)
|
2764
2776
|
#
|
@@ -2815,8 +2827,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2815
2827
|
if not self.in_array(toAccount, ['spot', 'swap', 'perp']):
|
2816
2828
|
raise NotSupported(self.id + ' transfer() only support spot <> swap transfer')
|
2817
2829
|
strAmount = self.number_to_string(amount)
|
2818
|
-
vaultAddress =
|
2819
|
-
params = self.
|
2830
|
+
vaultAddress = None
|
2831
|
+
vaultAddress, params = self.handle_option_and_params(params, 'transfer', 'vaultAddress')
|
2832
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2820
2833
|
if vaultAddress is not None:
|
2821
2834
|
strAmount = strAmount + ' subaccount:' + vaultAddress
|
2822
2835
|
toPerp = (toAccount == 'perp') or (toAccount == 'swap')
|
@@ -2912,7 +2925,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2912
2925
|
code = code.upper()
|
2913
2926
|
if code != 'USDC':
|
2914
2927
|
raise NotSupported(self.id + ' withdraw() only support USDC')
|
2915
|
-
vaultAddress =
|
2928
|
+
vaultAddress = None
|
2929
|
+
vaultAddress, params = self.handle_option_and_params(params, 'withdraw', 'vaultAddress')
|
2930
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2916
2931
|
params = self.omit(params, 'vaultAddress')
|
2917
2932
|
nonce = self.milliseconds()
|
2918
2933
|
action: dict = {}
|
@@ -3494,8 +3509,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
3494
3509
|
|
3495
3510
|
def parse_create_edit_order_args(self, id: Str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
3496
3511
|
market = self.market(symbol)
|
3497
|
-
vaultAddress =
|
3498
|
-
params = self.
|
3512
|
+
vaultAddress = None
|
3513
|
+
vaultAddress, params = self.handle_option_and_params(params, 'createOrder', 'vaultAddress')
|
3514
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
3499
3515
|
symbol = market['symbol']
|
3500
3516
|
order = {
|
3501
3517
|
'symbol': symbol,
|
ccxt/kraken.py
CHANGED
@@ -861,24 +861,21 @@ class kraken(Exchange, ImplicitAPI):
|
|
861
861
|
self.commonCurrencies[id] = code
|
862
862
|
else:
|
863
863
|
code = self.safe_currency_code(id)
|
864
|
-
precision = self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals')))
|
865
|
-
# assumes all currencies are active except those listed above
|
866
|
-
active = self.safe_string(currency, 'status') == 'enabled'
|
867
864
|
isFiat = code.find('.HOLD') >= 0
|
868
|
-
result[code] = {
|
865
|
+
result[code] = self.safe_currency_structure({
|
869
866
|
'id': id,
|
870
867
|
'code': code,
|
871
868
|
'info': currency,
|
872
869
|
'name': self.safe_string(currency, 'altname'),
|
873
|
-
'active':
|
870
|
+
'active': self.safe_string(currency, 'status') == 'enabled',
|
874
871
|
'type': 'fiat' if isFiat else 'crypto',
|
875
872
|
'deposit': None,
|
876
873
|
'withdraw': None,
|
877
874
|
'fee': None,
|
878
|
-
'precision':
|
875
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(currency, 'decimals'))),
|
879
876
|
'limits': {
|
880
877
|
'amount': {
|
881
|
-
'min':
|
878
|
+
'min': None,
|
882
879
|
'max': None,
|
883
880
|
},
|
884
881
|
'withdraw': {
|
@@ -887,7 +884,7 @@ class kraken(Exchange, ImplicitAPI):
|
|
887
884
|
},
|
888
885
|
},
|
889
886
|
'networks': {},
|
890
|
-
}
|
887
|
+
})
|
891
888
|
return result
|
892
889
|
|
893
890
|
def safe_currency_code(self, currencyId: Str, currency: Currency = None) -> Str:
|