ccxt 4.4.85__py2.py3-none-any.whl → 4.4.87__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 +7 -5
- ccxt/abstract/modetrade.py +119 -0
- ccxt/abstract/myokx.py +2 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/abstract/okxus.py +349 -0
- ccxt/ascendex.py +187 -151
- ccxt/async_support/__init__.py +7 -5
- ccxt/async_support/ascendex.py +187 -151
- ccxt/async_support/base/exchange.py +30 -26
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/binance.py +1 -1
- ccxt/async_support/bitget.py +4 -4
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitteam.py +31 -0
- ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
- ccxt/async_support/coinbase.py +2 -5
- ccxt/async_support/coinmetro.py +3 -0
- ccxt/async_support/deribit.py +4 -5
- ccxt/async_support/gate.py +91 -73
- ccxt/async_support/hollaex.py +106 -49
- ccxt/async_support/htx.py +30 -51
- ccxt/async_support/hyperliquid.py +36 -20
- ccxt/async_support/kraken.py +5 -8
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/modetrade.py +2727 -0
- ccxt/async_support/ndax.py +25 -24
- ccxt/async_support/okcoin.py +12 -29
- ccxt/async_support/okx.py +99 -3
- ccxt/async_support/okxus.py +54 -0
- ccxt/async_support/onetrading.py +10 -7
- ccxt/async_support/oxfun.py +40 -110
- ccxt/async_support/paradex.py +6 -0
- 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 +12 -9
- ccxt/bequant.py +1 -1
- ccxt/binance.py +1 -1
- ccxt/bitget.py +4 -4
- ccxt/bitmart.py +1 -1
- ccxt/bitteam.py +31 -0
- ccxt/{huobijp.py → bittrade.py} +11 -11
- ccxt/coinbase.py +2 -5
- ccxt/coinmetro.py +3 -0
- ccxt/deribit.py +4 -5
- ccxt/gate.py +91 -73
- ccxt/hollaex.py +106 -49
- ccxt/htx.py +30 -51
- ccxt/hyperliquid.py +36 -20
- ccxt/kraken.py +5 -8
- ccxt/mexc.py +2 -2
- ccxt/modetrade.py +2727 -0
- ccxt/ndax.py +25 -24
- ccxt/okcoin.py +12 -29
- ccxt/okx.py +99 -3
- ccxt/okxus.py +54 -0
- ccxt/onetrading.py +10 -7
- ccxt/oxfun.py +40 -110
- ccxt/paradex.py +6 -0
- ccxt/phemex.py +4 -6
- ccxt/poloniex.py +172 -159
- ccxt/pro/__init__.py +101 -3
- ccxt/pro/binance.py +1 -0
- ccxt/pro/{huobijp.py → bittrade.py} +3 -3
- ccxt/pro/luno.py +6 -5
- ccxt/pro/mexc.py +2 -0
- 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.85.dist-info → ccxt-4.4.87.dist-info}/METADATA +19 -8
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/RECORD +89 -84
- ccxt/abstract/kuna.py +0 -182
- ccxt/async_support/kuna.py +0 -1935
- ccxt/kuna.py +0 -1935
- /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/WHEEL +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.87.dist-info}/top_level.txt +0 -0
ccxt/async_support/htx.py
CHANGED
@@ -3281,9 +3281,8 @@ class htx(Exchange, ImplicitAPI):
|
|
3281
3281
|
# }
|
3282
3282
|
# ]
|
3283
3283
|
# }
|
3284
|
-
# }
|
3285
3284
|
#
|
3286
|
-
data = self.
|
3285
|
+
data = self.safe_list(response, 'data', [])
|
3287
3286
|
result: dict = {}
|
3288
3287
|
self.options['networkChainIdsByNames'] = {}
|
3289
3288
|
self.options['networkNamesByChainIds'] = {}
|
@@ -3291,19 +3290,11 @@ class htx(Exchange, ImplicitAPI):
|
|
3291
3290
|
entry = data[i]
|
3292
3291
|
currencyId = self.safe_string(entry, 'currency')
|
3293
3292
|
code = self.safe_currency_code(currencyId)
|
3294
|
-
self.options['networkChainIdsByNames'][code] = {}
|
3295
|
-
chains = self.safe_value(entry, 'chains', [])
|
3296
|
-
networks: dict = {}
|
3297
|
-
instStatus = self.safe_string(entry, 'instStatus')
|
3298
3293
|
assetType = self.safe_string(entry, 'assetType')
|
3299
3294
|
type = assetType == 'crypto' if '1' else 'fiat'
|
3300
|
-
|
3301
|
-
|
3302
|
-
|
3303
|
-
minWithdraw = None
|
3304
|
-
maxWithdraw = None
|
3305
|
-
deposit = False
|
3306
|
-
withdraw = False
|
3295
|
+
self.options['networkChainIdsByNames'][code] = {}
|
3296
|
+
chains = self.safe_list(entry, 'chains', [])
|
3297
|
+
networks: dict = {}
|
3307
3298
|
for j in range(0, len(chains)):
|
3308
3299
|
chainEntry = chains[j]
|
3309
3300
|
uniqueChainId = self.safe_string(chainEntry, 'chain') # i.e. usdterc20, trc20usdt ...
|
@@ -3311,47 +3302,33 @@ class htx(Exchange, ImplicitAPI):
|
|
3311
3302
|
self.options['networkChainIdsByNames'][code][title] = uniqueChainId
|
3312
3303
|
self.options['networkNamesByChainIds'][uniqueChainId] = title
|
3313
3304
|
networkCode = self.network_id_to_code(uniqueChainId)
|
3314
|
-
minDeposit = self.safe_number(chainEntry, 'minDepositAmt')
|
3315
|
-
minWithdraw = self.safe_number(chainEntry, 'minWithdrawAmt')
|
3316
|
-
maxWithdraw = self.safe_number(chainEntry, 'maxWithdrawAmt')
|
3317
|
-
withdrawStatus = self.safe_string(chainEntry, 'withdrawStatus')
|
3318
|
-
depositStatus = self.safe_string(chainEntry, 'depositStatus')
|
3319
|
-
withdrawEnabled = (withdrawStatus == 'allowed')
|
3320
|
-
depositEnabled = (depositStatus == 'allowed')
|
3321
|
-
withdraw = withdrawEnabled if (withdrawEnabled) else withdraw
|
3322
|
-
deposit = depositEnabled if (depositEnabled) else deposit
|
3323
|
-
active = withdrawEnabled and depositEnabled
|
3324
|
-
precision = self.parse_precision(self.safe_string(chainEntry, 'withdrawPrecision'))
|
3325
|
-
if precision is not None:
|
3326
|
-
minPrecision = precision if (minPrecision is None) else Precise.string_min(precision, minPrecision)
|
3327
|
-
fee = self.safe_number(chainEntry, 'transactFeeWithdraw')
|
3328
3305
|
networks[networkCode] = {
|
3329
3306
|
'info': chainEntry,
|
3330
3307
|
'id': uniqueChainId,
|
3331
3308
|
'network': networkCode,
|
3332
3309
|
'limits': {
|
3333
3310
|
'deposit': {
|
3334
|
-
'min':
|
3311
|
+
'min': self.safe_number(chainEntry, 'minDepositAmt'),
|
3335
3312
|
'max': None,
|
3336
3313
|
},
|
3337
3314
|
'withdraw': {
|
3338
|
-
'min':
|
3339
|
-
'max':
|
3315
|
+
'min': self.safe_number(chainEntry, 'minWithdrawAmt'),
|
3316
|
+
'max': self.safe_number(chainEntry, 'maxWithdrawAmt'),
|
3340
3317
|
},
|
3341
3318
|
},
|
3342
|
-
'active':
|
3343
|
-
'deposit':
|
3344
|
-
'withdraw':
|
3345
|
-
'fee':
|
3346
|
-
'precision': self.parse_number(
|
3319
|
+
'active': None,
|
3320
|
+
'deposit': self.safe_string(chainEntry, 'depositStatus') == 'allowed',
|
3321
|
+
'withdraw': self.safe_string(chainEntry, 'withdrawStatus') == 'allowed',
|
3322
|
+
'fee': self.safe_number(chainEntry, 'transactFeeWithdraw'),
|
3323
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(chainEntry, 'withdrawPrecision'))),
|
3347
3324
|
}
|
3348
|
-
result[code] = {
|
3325
|
+
result[code] = self.safe_currency_structure({
|
3349
3326
|
'info': entry,
|
3350
3327
|
'code': code,
|
3351
3328
|
'id': currencyId,
|
3352
|
-
'active':
|
3353
|
-
'deposit':
|
3354
|
-
'withdraw':
|
3329
|
+
'active': self.safe_string(entry, 'instStatus') == 'normal',
|
3330
|
+
'deposit': None,
|
3331
|
+
'withdraw': None,
|
3355
3332
|
'fee': None,
|
3356
3333
|
'name': None,
|
3357
3334
|
'type': type,
|
@@ -3361,17 +3338,17 @@ class htx(Exchange, ImplicitAPI):
|
|
3361
3338
|
'max': None,
|
3362
3339
|
},
|
3363
3340
|
'withdraw': {
|
3364
|
-
'min':
|
3365
|
-
'max':
|
3341
|
+
'min': None,
|
3342
|
+
'max': None,
|
3366
3343
|
},
|
3367
3344
|
'deposit': {
|
3368
3345
|
'min': None,
|
3369
3346
|
'max': None,
|
3370
3347
|
},
|
3371
3348
|
},
|
3372
|
-
'precision':
|
3349
|
+
'precision': None,
|
3373
3350
|
'networks': networks,
|
3374
|
-
}
|
3351
|
+
})
|
3375
3352
|
return result
|
3376
3353
|
|
3377
3354
|
def network_id_to_code(self, networkId: Str = None, currencyCode: Str = None):
|
@@ -4310,6 +4287,8 @@ class htx(Exchange, ImplicitAPI):
|
|
4310
4287
|
request: dict = {}
|
4311
4288
|
marketType = None
|
4312
4289
|
marketType, params = self.handle_market_type_and_params('fetchOpenOrders', market, params)
|
4290
|
+
subType = None
|
4291
|
+
subType, params = self.handle_sub_type_and_params('fetchOpenOrders', market, params, 'linear')
|
4313
4292
|
response = None
|
4314
4293
|
if marketType == 'spot':
|
4315
4294
|
if symbol is not None:
|
@@ -4331,16 +4310,16 @@ class htx(Exchange, ImplicitAPI):
|
|
4331
4310
|
params = self.omit(params, 'account-id')
|
4332
4311
|
response = await self.spotPrivateGetV1OrderOpenOrders(self.extend(request, params))
|
4333
4312
|
else:
|
4334
|
-
if symbol is None:
|
4335
|
-
raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
|
4313
|
+
if symbol is not None:
|
4314
|
+
# raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
|
4315
|
+
request['contract_code'] = market['id']
|
4336
4316
|
if limit is not None:
|
4337
4317
|
request['page_size'] = limit
|
4338
|
-
request['contract_code'] = market['id']
|
4339
4318
|
trigger = self.safe_bool_2(params, 'stop', 'trigger')
|
4340
4319
|
stopLossTakeProfit = self.safe_value(params, 'stopLossTakeProfit')
|
4341
4320
|
trailing = self.safe_bool(params, 'trailing', False)
|
4342
4321
|
params = self.omit(params, ['stop', 'stopLossTakeProfit', 'trailing', 'trigger'])
|
4343
|
-
if
|
4322
|
+
if subType == 'linear':
|
4344
4323
|
marginMode = None
|
4345
4324
|
marginMode, params = self.handle_margin_mode_and_params('fetchOpenOrders', params)
|
4346
4325
|
marginMode = 'cross' if (marginMode is None) else marginMode
|
@@ -4362,8 +4341,8 @@ class htx(Exchange, ImplicitAPI):
|
|
4362
4341
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossTrackOpenorders(self.extend(request, params))
|
4363
4342
|
else:
|
4364
4343
|
response = await self.contractPrivatePostLinearSwapApiV1SwapCrossOpenorders(self.extend(request, params))
|
4365
|
-
elif
|
4366
|
-
if
|
4344
|
+
elif subType == 'inverse':
|
4345
|
+
if marketType == 'swap':
|
4367
4346
|
if trigger:
|
4368
4347
|
response = await self.contractPrivatePostSwapApiV1SwapTriggerOpenorders(self.extend(request, params))
|
4369
4348
|
elif stopLossTakeProfit:
|
@@ -4372,8 +4351,8 @@ class htx(Exchange, ImplicitAPI):
|
|
4372
4351
|
response = await self.contractPrivatePostSwapApiV1SwapTrackOpenorders(self.extend(request, params))
|
4373
4352
|
else:
|
4374
4353
|
response = await self.contractPrivatePostSwapApiV1SwapOpenorders(self.extend(request, params))
|
4375
|
-
elif
|
4376
|
-
request['symbol'] = market
|
4354
|
+
elif marketType == 'future':
|
4355
|
+
request['symbol'] = self.safe_string(market, 'settleId', 'usdt')
|
4377
4356
|
if trigger:
|
4378
4357
|
response = await self.contractPrivatePostApiV1ContractTriggerOpenorders(self.extend(request, params))
|
4379
4358
|
elif stopLossTakeProfit:
|
@@ -185,12 +185,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
185
185
|
},
|
186
186
|
'fees': {
|
187
187
|
'swap': {
|
188
|
-
'taker': self.parse_number('0.
|
189
|
-
'maker': self.parse_number('0.
|
188
|
+
'taker': self.parse_number('0.00045'),
|
189
|
+
'maker': self.parse_number('0.00015'),
|
190
190
|
},
|
191
191
|
'spot': {
|
192
|
-
'taker': self.parse_number('0.
|
193
|
-
'maker': self.parse_number('0.
|
192
|
+
'taker': self.parse_number('0.0007'),
|
193
|
+
'maker': self.parse_number('0.0004'),
|
194
194
|
},
|
195
195
|
},
|
196
196
|
'requiredCredentials': {
|
@@ -1495,7 +1495,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1495
1495
|
if clientOrderId is not None:
|
1496
1496
|
orderObj['c'] = clientOrderId
|
1497
1497
|
orderReq.append(orderObj)
|
1498
|
-
vaultAddress =
|
1498
|
+
vaultAddress = None
|
1499
|
+
vaultAddress, params = self.handle_option_and_params(params, 'createOrder', 'vaultAddress')
|
1500
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1499
1501
|
orderAction: dict = {
|
1500
1502
|
'type': 'order',
|
1501
1503
|
'orders': orderReq,
|
@@ -1582,7 +1584,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1582
1584
|
'o': self.parse_to_numeric(ids[i]),
|
1583
1585
|
})
|
1584
1586
|
cancelAction['cancels'] = cancelReq
|
1585
|
-
vaultAddress =
|
1587
|
+
vaultAddress = None
|
1588
|
+
vaultAddress, params = self.handle_option_and_params(params, 'cancelOrders', 'vaultAddress')
|
1589
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1586
1590
|
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress)
|
1587
1591
|
request['action'] = cancelAction
|
1588
1592
|
request['signature'] = signature
|
@@ -1660,7 +1664,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1660
1664
|
cancelReq.append(cancelObj)
|
1661
1665
|
cancelAction['type'] = 'cancelByCloid' if cancelByCloid else 'cancel'
|
1662
1666
|
cancelAction['cancels'] = cancelReq
|
1663
|
-
vaultAddress =
|
1667
|
+
vaultAddress = None
|
1668
|
+
vaultAddress, params = self.handle_option_and_params(params, 'cancelOrdersForSymbols', 'vaultAddress')
|
1669
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1664
1670
|
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress)
|
1665
1671
|
request['action'] = cancelAction
|
1666
1672
|
request['signature'] = signature
|
@@ -1703,7 +1709,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1703
1709
|
'type': 'scheduleCancel',
|
1704
1710
|
'time': nonce + timeout,
|
1705
1711
|
}
|
1706
|
-
vaultAddress =
|
1712
|
+
vaultAddress = None
|
1713
|
+
vaultAddress, params = self.handle_option_and_params(params, 'cancelAllOrdersAfter', 'vaultAddress')
|
1714
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1707
1715
|
signature = self.sign_l1_action(cancelAction, nonce, vaultAddress)
|
1708
1716
|
request['action'] = cancelAction
|
1709
1717
|
request['signature'] = signature
|
@@ -1812,7 +1820,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1812
1820
|
'type': 'batchModify',
|
1813
1821
|
'modifies': modifies,
|
1814
1822
|
}
|
1815
|
-
vaultAddress =
|
1823
|
+
vaultAddress = None
|
1824
|
+
vaultAddress, params = self.handle_option_and_params(params, 'editOrder', 'vaultAddress')
|
1825
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
1816
1826
|
signature = self.sign_l1_action(modifyAction, nonce, vaultAddress)
|
1817
1827
|
request: dict = {
|
1818
1828
|
'action': modifyAction,
|
@@ -1821,7 +1831,6 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
1821
1831
|
# 'vaultAddress': vaultAddress,
|
1822
1832
|
}
|
1823
1833
|
if vaultAddress is not None:
|
1824
|
-
params = self.omit(params, 'vaultAddress')
|
1825
1834
|
request['vaultAddress'] = vaultAddress
|
1826
1835
|
return request
|
1827
1836
|
|
@@ -2639,9 +2648,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2639
2648
|
'isCross': isCross,
|
2640
2649
|
'leverage': leverage,
|
2641
2650
|
}
|
2642
|
-
vaultAddress =
|
2651
|
+
vaultAddress = None
|
2652
|
+
vaultAddress, params = self.handle_option_and_params(params, 'setMarginMode', 'vaultAddress')
|
2643
2653
|
if vaultAddress is not None:
|
2644
|
-
params = self.omit(params, 'vaultAddress')
|
2645
2654
|
if vaultAddress.startswith('0x'):
|
2646
2655
|
vaultAddress = vaultAddress.replace('0x', '')
|
2647
2656
|
signature = self.sign_l1_action(updateAction, nonce, vaultAddress)
|
@@ -2688,7 +2697,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2688
2697
|
'isCross': isCross,
|
2689
2698
|
'leverage': leverage,
|
2690
2699
|
}
|
2691
|
-
vaultAddress =
|
2700
|
+
vaultAddress = None
|
2701
|
+
vaultAddress, params = self.handle_option_and_params(params, 'setLeverage', 'vaultAddress')
|
2702
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2692
2703
|
signature = self.sign_l1_action(updateAction, nonce, vaultAddress)
|
2693
2704
|
request: dict = {
|
2694
2705
|
'action': updateAction,
|
@@ -2750,7 +2761,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2750
2761
|
'isBuy': True,
|
2751
2762
|
'ntli': sz,
|
2752
2763
|
}
|
2753
|
-
vaultAddress =
|
2764
|
+
vaultAddress = None
|
2765
|
+
vaultAddress, params = self.handle_option_and_params(params, 'modifyMargin', 'vaultAddress')
|
2766
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2754
2767
|
signature = self.sign_l1_action(updateAction, nonce, vaultAddress)
|
2755
2768
|
request: dict = {
|
2756
2769
|
'action': updateAction,
|
@@ -2759,7 +2772,6 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2759
2772
|
# 'vaultAddress': vaultAddress,
|
2760
2773
|
}
|
2761
2774
|
if vaultAddress is not None:
|
2762
|
-
params = self.omit(params, 'vaultAddress')
|
2763
2775
|
request['vaultAddress'] = vaultAddress
|
2764
2776
|
response = await self.privatePostExchange(request)
|
2765
2777
|
#
|
@@ -2816,8 +2828,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2816
2828
|
if not self.in_array(toAccount, ['spot', 'swap', 'perp']):
|
2817
2829
|
raise NotSupported(self.id + ' transfer() only support spot <> swap transfer')
|
2818
2830
|
strAmount = self.number_to_string(amount)
|
2819
|
-
vaultAddress =
|
2820
|
-
params = self.
|
2831
|
+
vaultAddress = None
|
2832
|
+
vaultAddress, params = self.handle_option_and_params(params, 'transfer', 'vaultAddress')
|
2833
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2821
2834
|
if vaultAddress is not None:
|
2822
2835
|
strAmount = strAmount + ' subaccount:' + vaultAddress
|
2823
2836
|
toPerp = (toAccount == 'perp') or (toAccount == 'swap')
|
@@ -2913,7 +2926,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
2913
2926
|
code = code.upper()
|
2914
2927
|
if code != 'USDC':
|
2915
2928
|
raise NotSupported(self.id + ' withdraw() only support USDC')
|
2916
|
-
vaultAddress =
|
2929
|
+
vaultAddress = None
|
2930
|
+
vaultAddress, params = self.handle_option_and_params(params, 'withdraw', 'vaultAddress')
|
2931
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
2917
2932
|
params = self.omit(params, 'vaultAddress')
|
2918
2933
|
nonce = self.milliseconds()
|
2919
2934
|
action: dict = {}
|
@@ -3495,8 +3510,9 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
3495
3510
|
|
3496
3511
|
def parse_create_edit_order_args(self, id: Str, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
3497
3512
|
market = self.market(symbol)
|
3498
|
-
vaultAddress =
|
3499
|
-
params = self.
|
3513
|
+
vaultAddress = None
|
3514
|
+
vaultAddress, params = self.handle_option_and_params(params, 'createOrder', 'vaultAddress')
|
3515
|
+
vaultAddress = self.format_vault_address(vaultAddress)
|
3500
3516
|
symbol = market['symbol']
|
3501
3517
|
order = {
|
3502
3518
|
'symbol': symbol,
|
ccxt/async_support/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:
|
ccxt/async_support/mexc.py
CHANGED
@@ -1097,7 +1097,6 @@ class mexc(Exchange, ImplicitAPI):
|
|
1097
1097
|
currency = response[i]
|
1098
1098
|
id = self.safe_string(currency, 'coin')
|
1099
1099
|
code = self.safe_currency_code(id)
|
1100
|
-
name = self.safe_string(currency, 'name')
|
1101
1100
|
networks: dict = {}
|
1102
1101
|
chains = self.safe_value(currency, 'networkList', [])
|
1103
1102
|
for j in range(0, len(chains)):
|
@@ -1119,12 +1118,13 @@ class mexc(Exchange, ImplicitAPI):
|
|
1119
1118
|
'max': self.safe_string(chain, 'withdrawMax'),
|
1120
1119
|
},
|
1121
1120
|
},
|
1121
|
+
'contract': self.safe_string(chain, 'contract'),
|
1122
1122
|
}
|
1123
1123
|
result[code] = self.safe_currency_structure({
|
1124
1124
|
'info': currency,
|
1125
1125
|
'id': id,
|
1126
1126
|
'code': code,
|
1127
|
-
'name': name,
|
1127
|
+
'name': self.safe_string(currency, 'name'),
|
1128
1128
|
'active': None,
|
1129
1129
|
'deposit': None,
|
1130
1130
|
'withdraw': None,
|