ccxt 4.4.85__py2.py3-none-any.whl → 4.4.86__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 +3 -5
- ccxt/abstract/myokx.py +2 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/ascendex.py +187 -151
- ccxt/async_support/__init__.py +3 -5
- ccxt/async_support/ascendex.py +187 -151
- ccxt/async_support/base/exchange.py +26 -22
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/bitget.py +4 -4
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
- ccxt/async_support/coinbase.py +2 -5
- ccxt/async_support/deribit.py +4 -5
- ccxt/async_support/hollaex.py +106 -49
- ccxt/async_support/htx.py +20 -43
- ccxt/async_support/hyperliquid.py +4 -4
- ccxt/async_support/mexc.py +2 -2
- ccxt/async_support/ndax.py +25 -24
- ccxt/async_support/okcoin.py +12 -29
- ccxt/async_support/okx.py +9 -0
- ccxt/async_support/onetrading.py +10 -7
- ccxt/async_support/oxfun.py +40 -110
- ccxt/async_support/paradex.py +3 -0
- ccxt/base/exchange.py +1 -1
- ccxt/bequant.py +1 -1
- ccxt/bitget.py +4 -4
- ccxt/bitmart.py +1 -1
- ccxt/{huobijp.py → bittrade.py} +11 -11
- ccxt/coinbase.py +2 -5
- ccxt/deribit.py +4 -5
- ccxt/hollaex.py +106 -49
- ccxt/htx.py +20 -43
- ccxt/hyperliquid.py +4 -4
- ccxt/mexc.py +2 -2
- ccxt/ndax.py +25 -24
- ccxt/okcoin.py +12 -29
- ccxt/okx.py +9 -0
- ccxt/onetrading.py +10 -7
- ccxt/oxfun.py +40 -110
- ccxt/paradex.py +3 -0
- ccxt/pro/__init__.py +41 -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-4.4.85.dist-info → ccxt-4.4.86.dist-info}/METADATA +7 -8
- {ccxt-4.4.85.dist-info → ccxt-4.4.86.dist-info}/RECORD +51 -54
- 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.86.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.86.dist-info}/WHEEL +0 -0
- {ccxt-4.4.85.dist-info → ccxt-4.4.86.dist-info}/top_level.txt +0 -0
ccxt/htx.py
CHANGED
@@ -3280,9 +3280,8 @@ class htx(Exchange, ImplicitAPI):
|
|
3280
3280
|
# }
|
3281
3281
|
# ]
|
3282
3282
|
# }
|
3283
|
-
# }
|
3284
3283
|
#
|
3285
|
-
data = self.
|
3284
|
+
data = self.safe_list(response, 'data', [])
|
3286
3285
|
result: dict = {}
|
3287
3286
|
self.options['networkChainIdsByNames'] = {}
|
3288
3287
|
self.options['networkNamesByChainIds'] = {}
|
@@ -3290,19 +3289,11 @@ class htx(Exchange, ImplicitAPI):
|
|
3290
3289
|
entry = data[i]
|
3291
3290
|
currencyId = self.safe_string(entry, 'currency')
|
3292
3291
|
code = self.safe_currency_code(currencyId)
|
3293
|
-
self.options['networkChainIdsByNames'][code] = {}
|
3294
|
-
chains = self.safe_value(entry, 'chains', [])
|
3295
|
-
networks: dict = {}
|
3296
|
-
instStatus = self.safe_string(entry, 'instStatus')
|
3297
3292
|
assetType = self.safe_string(entry, 'assetType')
|
3298
3293
|
type = assetType == 'crypto' if '1' else 'fiat'
|
3299
|
-
|
3300
|
-
|
3301
|
-
|
3302
|
-
minWithdraw = None
|
3303
|
-
maxWithdraw = None
|
3304
|
-
deposit = False
|
3305
|
-
withdraw = False
|
3294
|
+
self.options['networkChainIdsByNames'][code] = {}
|
3295
|
+
chains = self.safe_list(entry, 'chains', [])
|
3296
|
+
networks: dict = {}
|
3306
3297
|
for j in range(0, len(chains)):
|
3307
3298
|
chainEntry = chains[j]
|
3308
3299
|
uniqueChainId = self.safe_string(chainEntry, 'chain') # i.e. usdterc20, trc20usdt ...
|
@@ -3310,47 +3301,33 @@ class htx(Exchange, ImplicitAPI):
|
|
3310
3301
|
self.options['networkChainIdsByNames'][code][title] = uniqueChainId
|
3311
3302
|
self.options['networkNamesByChainIds'][uniqueChainId] = title
|
3312
3303
|
networkCode = self.network_id_to_code(uniqueChainId)
|
3313
|
-
minDeposit = self.safe_number(chainEntry, 'minDepositAmt')
|
3314
|
-
minWithdraw = self.safe_number(chainEntry, 'minWithdrawAmt')
|
3315
|
-
maxWithdraw = self.safe_number(chainEntry, 'maxWithdrawAmt')
|
3316
|
-
withdrawStatus = self.safe_string(chainEntry, 'withdrawStatus')
|
3317
|
-
depositStatus = self.safe_string(chainEntry, 'depositStatus')
|
3318
|
-
withdrawEnabled = (withdrawStatus == 'allowed')
|
3319
|
-
depositEnabled = (depositStatus == 'allowed')
|
3320
|
-
withdraw = withdrawEnabled if (withdrawEnabled) else withdraw
|
3321
|
-
deposit = depositEnabled if (depositEnabled) else deposit
|
3322
|
-
active = withdrawEnabled and depositEnabled
|
3323
|
-
precision = self.parse_precision(self.safe_string(chainEntry, 'withdrawPrecision'))
|
3324
|
-
if precision is not None:
|
3325
|
-
minPrecision = precision if (minPrecision is None) else Precise.string_min(precision, minPrecision)
|
3326
|
-
fee = self.safe_number(chainEntry, 'transactFeeWithdraw')
|
3327
3304
|
networks[networkCode] = {
|
3328
3305
|
'info': chainEntry,
|
3329
3306
|
'id': uniqueChainId,
|
3330
3307
|
'network': networkCode,
|
3331
3308
|
'limits': {
|
3332
3309
|
'deposit': {
|
3333
|
-
'min':
|
3310
|
+
'min': self.safe_number(chainEntry, 'minDepositAmt'),
|
3334
3311
|
'max': None,
|
3335
3312
|
},
|
3336
3313
|
'withdraw': {
|
3337
|
-
'min':
|
3338
|
-
'max':
|
3314
|
+
'min': self.safe_number(chainEntry, 'minWithdrawAmt'),
|
3315
|
+
'max': self.safe_number(chainEntry, 'maxWithdrawAmt'),
|
3339
3316
|
},
|
3340
3317
|
},
|
3341
|
-
'active':
|
3342
|
-
'deposit':
|
3343
|
-
'withdraw':
|
3344
|
-
'fee':
|
3345
|
-
'precision': self.parse_number(
|
3318
|
+
'active': None,
|
3319
|
+
'deposit': self.safe_string(chainEntry, 'depositStatus') == 'allowed',
|
3320
|
+
'withdraw': self.safe_string(chainEntry, 'withdrawStatus') == 'allowed',
|
3321
|
+
'fee': self.safe_number(chainEntry, 'transactFeeWithdraw'),
|
3322
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(chainEntry, 'withdrawPrecision'))),
|
3346
3323
|
}
|
3347
|
-
result[code] = {
|
3324
|
+
result[code] = self.safe_currency_structure({
|
3348
3325
|
'info': entry,
|
3349
3326
|
'code': code,
|
3350
3327
|
'id': currencyId,
|
3351
|
-
'active':
|
3352
|
-
'deposit':
|
3353
|
-
'withdraw':
|
3328
|
+
'active': self.safe_string(entry, 'instStatus') == 'normal',
|
3329
|
+
'deposit': None,
|
3330
|
+
'withdraw': None,
|
3354
3331
|
'fee': None,
|
3355
3332
|
'name': None,
|
3356
3333
|
'type': type,
|
@@ -3360,17 +3337,17 @@ class htx(Exchange, ImplicitAPI):
|
|
3360
3337
|
'max': None,
|
3361
3338
|
},
|
3362
3339
|
'withdraw': {
|
3363
|
-
'min':
|
3364
|
-
'max':
|
3340
|
+
'min': None,
|
3341
|
+
'max': None,
|
3365
3342
|
},
|
3366
3343
|
'deposit': {
|
3367
3344
|
'min': None,
|
3368
3345
|
'max': None,
|
3369
3346
|
},
|
3370
3347
|
},
|
3371
|
-
'precision':
|
3348
|
+
'precision': None,
|
3372
3349
|
'networks': networks,
|
3373
|
-
}
|
3350
|
+
})
|
3374
3351
|
return result
|
3375
3352
|
|
3376
3353
|
def network_id_to_code(self, networkId: Str = None, currencyCode: Str = None):
|
ccxt/hyperliquid.py
CHANGED
@@ -184,12 +184,12 @@ class hyperliquid(Exchange, ImplicitAPI):
|
|
184
184
|
},
|
185
185
|
'fees': {
|
186
186
|
'swap': {
|
187
|
-
'taker': self.parse_number('0.
|
188
|
-
'maker': self.parse_number('0.
|
187
|
+
'taker': self.parse_number('0.00045'),
|
188
|
+
'maker': self.parse_number('0.00015'),
|
189
189
|
},
|
190
190
|
'spot': {
|
191
|
-
'taker': self.parse_number('0.
|
192
|
-
'maker': self.parse_number('0.
|
191
|
+
'taker': self.parse_number('0.0007'),
|
192
|
+
'maker': self.parse_number('0.0004'),
|
193
193
|
},
|
194
194
|
},
|
195
195
|
'requiredCredentials': {
|
ccxt/mexc.py
CHANGED
@@ -1096,7 +1096,6 @@ class mexc(Exchange, ImplicitAPI):
|
|
1096
1096
|
currency = response[i]
|
1097
1097
|
id = self.safe_string(currency, 'coin')
|
1098
1098
|
code = self.safe_currency_code(id)
|
1099
|
-
name = self.safe_string(currency, 'name')
|
1100
1099
|
networks: dict = {}
|
1101
1100
|
chains = self.safe_value(currency, 'networkList', [])
|
1102
1101
|
for j in range(0, len(chains)):
|
@@ -1118,12 +1117,13 @@ class mexc(Exchange, ImplicitAPI):
|
|
1118
1117
|
'max': self.safe_string(chain, 'withdrawMax'),
|
1119
1118
|
},
|
1120
1119
|
},
|
1120
|
+
'contract': self.safe_string(chain, 'contract'),
|
1121
1121
|
}
|
1122
1122
|
result[code] = self.safe_currency_structure({
|
1123
1123
|
'info': currency,
|
1124
1124
|
'id': id,
|
1125
1125
|
'code': code,
|
1126
|
-
'name': name,
|
1126
|
+
'name': self.safe_string(currency, 'name'),
|
1127
1127
|
'active': None,
|
1128
1128
|
'deposit': None,
|
1129
1129
|
'withdraw': None,
|
ccxt/ndax.py
CHANGED
@@ -454,44 +454,44 @@ class ndax(Exchange, ImplicitAPI):
|
|
454
454
|
}
|
455
455
|
response = self.publicGetGetProducts(self.extend(request, params))
|
456
456
|
#
|
457
|
-
#
|
458
|
-
#
|
459
|
-
#
|
460
|
-
#
|
461
|
-
#
|
462
|
-
#
|
463
|
-
#
|
464
|
-
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
#
|
468
|
-
#
|
469
|
-
#
|
470
|
-
#
|
457
|
+
# [
|
458
|
+
# {
|
459
|
+
# "OMSId": "1",
|
460
|
+
# "ProductId": "1",
|
461
|
+
# "Product": "BTC",
|
462
|
+
# "ProductFullName": "Bitcoin",
|
463
|
+
# "MasterDataUniqueProductSymbol": "",
|
464
|
+
# "ProductType": "CryptoCurrency",
|
465
|
+
# "DecimalPlaces": "8",
|
466
|
+
# "TickSize": "0.0000000100000000000000000000",
|
467
|
+
# "DepositEnabled": True,
|
468
|
+
# "WithdrawEnabled": True,
|
469
|
+
# "NoFees": False,
|
470
|
+
# "IsDisabled": False,
|
471
|
+
# "MarginEnabled": False
|
472
|
+
# },
|
473
|
+
# ...
|
471
474
|
#
|
472
475
|
result: dict = {}
|
473
476
|
for i in range(0, len(response)):
|
474
477
|
currency = response[i]
|
475
478
|
id = self.safe_string(currency, 'ProductId')
|
476
|
-
|
479
|
+
code = self.safe_currency_code(self.safe_string(currency, 'Product'))
|
477
480
|
ProductType = self.safe_string(currency, 'ProductType')
|
478
481
|
type = 'fiat' if (ProductType == 'NationalCurrency') else 'crypto'
|
479
482
|
if ProductType == 'Unknown':
|
480
483
|
# such currency is just a blanket entry
|
481
484
|
type = 'other'
|
482
|
-
code = self.
|
483
|
-
isDisabled = self.safe_value(currency, 'IsDisabled')
|
484
|
-
active = not isDisabled
|
485
|
-
result[code] = {
|
485
|
+
result[code] = self.safe_currency_structure({
|
486
486
|
'id': id,
|
487
|
-
'name':
|
487
|
+
'name': self.safe_string(currency, 'ProductFullName'),
|
488
488
|
'code': code,
|
489
489
|
'type': type,
|
490
490
|
'precision': self.safe_number(currency, 'TickSize'),
|
491
491
|
'info': currency,
|
492
|
-
'active':
|
493
|
-
'deposit':
|
494
|
-
'withdraw':
|
492
|
+
'active': not self.safe_bool(currency, 'IsDisabled'),
|
493
|
+
'deposit': self.safe_bool(currency, 'DepositEnabled'),
|
494
|
+
'withdraw': self.safe_bool(currency, 'WithdrawEnabled'),
|
495
495
|
'fee': None,
|
496
496
|
'limits': {
|
497
497
|
'amount': {
|
@@ -504,7 +504,8 @@ class ndax(Exchange, ImplicitAPI):
|
|
504
504
|
},
|
505
505
|
},
|
506
506
|
'networks': {},
|
507
|
-
|
507
|
+
'margin': self.safe_bool(currency, 'MarginEnabled'),
|
508
|
+
})
|
508
509
|
return result
|
509
510
|
|
510
511
|
def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/okcoin.py
CHANGED
@@ -840,47 +840,30 @@ class okcoin(Exchange, ImplicitAPI):
|
|
840
840
|
return None
|
841
841
|
else:
|
842
842
|
response = self.privateGetAssetCurrencies(params)
|
843
|
-
data = self.
|
843
|
+
data = self.safe_list(response, 'data', [])
|
844
844
|
result: dict = {}
|
845
845
|
dataByCurrencyId = self.group_by(data, 'ccy')
|
846
846
|
currencyIds = list(dataByCurrencyId.keys())
|
847
847
|
for i in range(0, len(currencyIds)):
|
848
848
|
currencyId = currencyIds[i]
|
849
|
-
|
850
|
-
code = currency['code']
|
849
|
+
code = self.safe_currency_code(currencyId)
|
851
850
|
chains = dataByCurrencyId[currencyId]
|
852
851
|
networks: dict = {}
|
853
|
-
currencyActive = False
|
854
|
-
depositEnabled = False
|
855
|
-
withdrawEnabled = False
|
856
|
-
maxPrecision = None
|
857
852
|
for j in range(0, len(chains)):
|
858
853
|
chain = chains[j]
|
859
|
-
canDeposit = self.safe_value(chain, 'canDep')
|
860
|
-
depositEnabled = canDeposit if (canDeposit) else depositEnabled
|
861
|
-
canWithdraw = self.safe_value(chain, 'canWd')
|
862
|
-
withdrawEnabled = canWithdraw if (canWithdraw) else withdrawEnabled
|
863
|
-
canInternal = self.safe_value(chain, 'canInternal')
|
864
|
-
active = True if (canDeposit and canWithdraw and canInternal) else False
|
865
|
-
currencyActive = active if (active) else currencyActive
|
866
854
|
networkId = self.safe_string(chain, 'chain')
|
867
855
|
if (networkId is not None) and (networkId.find('-') >= 0):
|
868
856
|
parts = networkId.split('-')
|
869
857
|
chainPart = self.safe_string(parts, 1, networkId)
|
870
858
|
networkCode = self.network_id_to_code(chainPart)
|
871
|
-
precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
|
872
|
-
if maxPrecision is None:
|
873
|
-
maxPrecision = precision
|
874
|
-
else:
|
875
|
-
maxPrecision = Precise.string_min(maxPrecision, precision)
|
876
859
|
networks[networkCode] = {
|
877
860
|
'id': networkId,
|
878
861
|
'network': networkCode,
|
879
|
-
'active':
|
880
|
-
'deposit':
|
881
|
-
'withdraw':
|
862
|
+
'active': None,
|
863
|
+
'deposit': self.safe_bool(chain, 'canDep'),
|
864
|
+
'withdraw': self.safe_bool(chain, 'canWd'),
|
882
865
|
'fee': self.safe_number(chain, 'minFee'),
|
883
|
-
'precision': self.parse_number(
|
866
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(chain, 'wdTickSz'))),
|
884
867
|
'limits': {
|
885
868
|
'withdraw': {
|
886
869
|
'min': self.safe_number(chain, 'minWd'),
|
@@ -890,16 +873,16 @@ class okcoin(Exchange, ImplicitAPI):
|
|
890
873
|
'info': chain,
|
891
874
|
}
|
892
875
|
firstChain = self.safe_value(chains, 0)
|
893
|
-
result[code] = {
|
876
|
+
result[code] = self.safe_currency_structure({
|
894
877
|
'info': chains,
|
895
878
|
'code': code,
|
896
879
|
'id': currencyId,
|
897
880
|
'name': self.safe_string(firstChain, 'name'),
|
898
|
-
'active':
|
899
|
-
'deposit':
|
900
|
-
'withdraw':
|
881
|
+
'active': None,
|
882
|
+
'deposit': None,
|
883
|
+
'withdraw': None,
|
901
884
|
'fee': None,
|
902
|
-
'precision':
|
885
|
+
'precision': None,
|
903
886
|
'limits': {
|
904
887
|
'amount': {
|
905
888
|
'min': None,
|
@@ -907,7 +890,7 @@ class okcoin(Exchange, ImplicitAPI):
|
|
907
890
|
},
|
908
891
|
},
|
909
892
|
'networks': networks,
|
910
|
-
}
|
893
|
+
})
|
911
894
|
return result
|
912
895
|
|
913
896
|
def fetch_order_book(self, symbol: str, limit: Int = None, params={}) -> OrderBook:
|
ccxt/okx.py
CHANGED
@@ -388,6 +388,7 @@ class okx(Exchange, ImplicitAPI):
|
|
388
388
|
'account/spot-manual-borrow-repay': 10,
|
389
389
|
'account/set-auto-repay': 4,
|
390
390
|
'account/spot-borrow-repay-history': 4,
|
391
|
+
'account/move-positions-history': 10,
|
391
392
|
# subaccount
|
392
393
|
'users/subaccount/list': 10,
|
393
394
|
'account/subaccount/balances': 10 / 3,
|
@@ -525,6 +526,7 @@ class okx(Exchange, ImplicitAPI):
|
|
525
526
|
'account/fixed-loan/manual-reborrow': 5,
|
526
527
|
'account/fixed-loan/repay-borrowing-order': 5,
|
527
528
|
'account/bills-history-archive': 72000, # 12 req/day
|
529
|
+
'account/move-positions': 10,
|
528
530
|
# subaccount
|
529
531
|
'users/subaccount/modify-apikey': 10,
|
530
532
|
'asset/subaccount/transfer': 10,
|
@@ -991,6 +993,13 @@ class okx(Exchange, ImplicitAPI):
|
|
991
993
|
'70010': BadRequest, # Timestamp parameters need to be in Unix timestamp format in milliseconds.
|
992
994
|
'70013': BadRequest, # endTs needs to be bigger than or equal to beginTs.
|
993
995
|
'70016': BadRequest, # Please specify your instrument settings for at least one instType.
|
996
|
+
'70060': BadRequest, # The account doesn’t exist or the position side is incorrect. To and from accounts must be under the same main account.
|
997
|
+
'70061': BadRequest, # To move position, please enter a position that’s opposite to your current side and is smaller than or equal to your current size.
|
998
|
+
'70062': BadRequest, # account has reached the maximum number of position transfers allowed per day.
|
999
|
+
'70064': BadRequest, # Position does not exist.
|
1000
|
+
'70065': BadRequest, # Couldn’t move position. Execution price cannot be determined
|
1001
|
+
'70066': BadRequest, # Moving positions isn't supported in spot mode. Switch to any other account mode and try again.
|
1002
|
+
'70067': BadRequest, # Moving positions isn't supported in margin trading.
|
994
1003
|
'1009': BadRequest, # Request message exceeds the maximum frame length
|
995
1004
|
'4001': AuthenticationError, # Login Failed
|
996
1005
|
'4002': BadRequest, # Invalid Request
|
ccxt/onetrading.py
CHANGED
@@ -405,9 +405,12 @@ class onetrading(Exchange, ImplicitAPI):
|
|
405
405
|
#
|
406
406
|
# [
|
407
407
|
# {
|
408
|
-
# "code":"
|
409
|
-
# "precision":
|
410
|
-
#
|
408
|
+
# "code": "USDT",
|
409
|
+
# "precision": 6,
|
410
|
+
# "unified_cryptoasset_id": 825,
|
411
|
+
# "name": "Tether USDt",
|
412
|
+
# "collateral_percentage": 0
|
413
|
+
# },
|
411
414
|
# ]
|
412
415
|
#
|
413
416
|
result: dict = {}
|
@@ -415,11 +418,11 @@ class onetrading(Exchange, ImplicitAPI):
|
|
415
418
|
currency = response[i]
|
416
419
|
id = self.safe_string(currency, 'code')
|
417
420
|
code = self.safe_currency_code(id)
|
418
|
-
result[code] = {
|
421
|
+
result[code] = self.safe_currency_structure({
|
419
422
|
'id': id,
|
420
423
|
'code': code,
|
421
|
-
'name':
|
422
|
-
'info': currency,
|
424
|
+
'name': self.safe_string(currency, 'name'),
|
425
|
+
'info': currency,
|
423
426
|
'active': None,
|
424
427
|
'fee': None,
|
425
428
|
'precision': self.parse_number(self.parse_precision(self.safe_string(currency, 'precision'))),
|
@@ -430,7 +433,7 @@ class onetrading(Exchange, ImplicitAPI):
|
|
430
433
|
'withdraw': {'min': None, 'max': None},
|
431
434
|
},
|
432
435
|
'networks': {},
|
433
|
-
}
|
436
|
+
})
|
434
437
|
return result
|
435
438
|
|
436
439
|
def fetch_markets(self, params={}) -> List[Market]:
|
ccxt/oxfun.py
CHANGED
@@ -24,7 +24,6 @@ from ccxt.base.errors import NetworkError
|
|
24
24
|
from ccxt.base.errors import RateLimitExceeded
|
25
25
|
from ccxt.base.errors import RequestTimeout
|
26
26
|
from ccxt.base.decimal_to_precision import TICK_SIZE
|
27
|
-
from ccxt.base.precise import Precise
|
28
27
|
|
29
28
|
|
30
29
|
class oxfun(Exchange, ImplicitAPI):
|
@@ -612,66 +611,7 @@ class oxfun(Exchange, ImplicitAPI):
|
|
612
611
|
# "minDeposit": "0.00010",
|
613
612
|
# "minWithdrawal": "0.00010"
|
614
613
|
# },
|
615
|
-
#
|
616
|
-
# "network": "Arbitrum",
|
617
|
-
# "tokenId": "0xba0Dda8762C24dA9487f5FA026a9B64b695A07Ea",
|
618
|
-
# "transactionPrecision": "18",
|
619
|
-
# "isWithdrawalFeeChargedToUser": True,
|
620
|
-
# "canDeposit": True,
|
621
|
-
# "canWithdraw": True,
|
622
|
-
# "minDeposit": "0.00010",
|
623
|
-
# "minWithdrawal": "0.00010"
|
624
|
-
# },
|
625
|
-
# {
|
626
|
-
# "network": "Ethereum",
|
627
|
-
# "tokenId": "0xba0Dda8762C24dA9487f5FA026a9B64b695A07Ea",
|
628
|
-
# "transactionPrecision": "18",
|
629
|
-
# "isWithdrawalFeeChargedToUser": True,
|
630
|
-
# "canDeposit": True,
|
631
|
-
# "canWithdraw": True,
|
632
|
-
# "minDeposit": "0.00010",
|
633
|
-
# "minWithdrawal": "0.00010"
|
634
|
-
# },
|
635
|
-
# {
|
636
|
-
# "network": "Arbitrum",
|
637
|
-
# "tokenId": "0x78a0A62Fba6Fb21A83FE8a3433d44C73a4017A6f",
|
638
|
-
# "transactionPrecision": "18",
|
639
|
-
# "isWithdrawalFeeChargedToUser": True,
|
640
|
-
# "canDeposit": True,
|
641
|
-
# "canWithdraw": False,
|
642
|
-
# "minDeposit": "0.00010",
|
643
|
-
# "minWithdrawal": "0.00010"
|
644
|
-
# },
|
645
|
-
# {
|
646
|
-
# "network": "Avalanche",
|
647
|
-
# "tokenId": "0x78a0A62Fba6Fb21A83FE8a3433d44C73a4017A6f",
|
648
|
-
# "transactionPrecision": "18",
|
649
|
-
# "isWithdrawalFeeChargedToUser": True,
|
650
|
-
# "canDeposit": True,
|
651
|
-
# "canWithdraw": False,
|
652
|
-
# "minDeposit": "0.00010",
|
653
|
-
# "minWithdrawal": "0.00010"
|
654
|
-
# },
|
655
|
-
# {
|
656
|
-
# "network": "Solana",
|
657
|
-
# "tokenId": "DV3845GEAVXfwpyVGGgWbqBVCtzHdCXNCGfcdboSEuZz",
|
658
|
-
# "transactionPrecision": "8",
|
659
|
-
# "isWithdrawalFeeChargedToUser": True,
|
660
|
-
# "canDeposit": True,
|
661
|
-
# "canWithdraw": True,
|
662
|
-
# "minDeposit": "0.00010",
|
663
|
-
# "minWithdrawal": "0.00010"
|
664
|
-
# },
|
665
|
-
# {
|
666
|
-
# "network": "Ethereum",
|
667
|
-
# "tokenId": "0x78a0A62Fba6Fb21A83FE8a3433d44C73a4017A6f",
|
668
|
-
# "transactionPrecision": "18",
|
669
|
-
# "isWithdrawalFeeChargedToUser": True,
|
670
|
-
# "canDeposit": True,
|
671
|
-
# "canWithdraw": False,
|
672
|
-
# "minDeposit": "0.00010",
|
673
|
-
# "minWithdrawal": "0.00010"
|
674
|
-
# }
|
614
|
+
# ...
|
675
615
|
# ]
|
676
616
|
# },
|
677
617
|
# {
|
@@ -721,74 +661,64 @@ class oxfun(Exchange, ImplicitAPI):
|
|
721
661
|
parts = fullId.split('.')
|
722
662
|
id = parts[0]
|
723
663
|
code = self.safe_currency_code(id)
|
724
|
-
|
664
|
+
if not (code in result):
|
665
|
+
result[code] = {
|
666
|
+
'id': id,
|
667
|
+
'code': code,
|
668
|
+
'precision': None,
|
669
|
+
'type': None,
|
670
|
+
'name': None,
|
671
|
+
'active': None,
|
672
|
+
'deposit': None,
|
673
|
+
'withdraw': None,
|
674
|
+
'fee': None,
|
675
|
+
'limits': {
|
676
|
+
'withdraw': {
|
677
|
+
'min': None,
|
678
|
+
'max': None,
|
679
|
+
},
|
680
|
+
'deposit': {
|
681
|
+
'min': None,
|
682
|
+
'max': None,
|
683
|
+
},
|
684
|
+
},
|
685
|
+
'networks': {},
|
686
|
+
'info': [],
|
687
|
+
}
|
725
688
|
chains = self.safe_list(currency, 'networkList', [])
|
726
|
-
currencyMaxPrecision: Str = None
|
727
|
-
currencyDepositEnabled: Bool = None
|
728
|
-
currencyWithdrawEnabled: Bool = None
|
729
689
|
for j in range(0, len(chains)):
|
730
690
|
chain = chains[j]
|
731
691
|
networkId = self.safe_string(chain, 'network')
|
732
692
|
networkCode = self.network_id_to_code(networkId)
|
733
|
-
|
734
|
-
withdraw = self.safe_bool(chain, 'canWithdraw')
|
735
|
-
active = (deposit and withdraw)
|
736
|
-
minDeposit = self.safe_string(chain, 'minDeposit')
|
737
|
-
minWithdrawal = self.safe_string(chain, 'minWithdrawal')
|
738
|
-
precision = self.parse_precision(self.safe_string(chain, 'transactionPrecision'))
|
739
|
-
networks[networkCode] = {
|
693
|
+
result[code]['networks'][networkCode] = {
|
740
694
|
'id': networkId,
|
741
695
|
'network': networkCode,
|
742
696
|
'margin': None,
|
743
|
-
'deposit':
|
744
|
-
'withdraw':
|
745
|
-
'active':
|
697
|
+
'deposit': self.safe_bool(chain, 'canDeposit'),
|
698
|
+
'withdraw': self.safe_bool(chain, 'canWithdraw'),
|
699
|
+
'active': None,
|
746
700
|
'fee': None,
|
747
|
-
'precision': self.parse_number(
|
701
|
+
'precision': self.parse_number(self.parse_precision(self.safe_string(chain, 'transactionPrecision'))),
|
748
702
|
'limits': {
|
749
703
|
'deposit': {
|
750
|
-
'min': minDeposit,
|
704
|
+
'min': self.safe_number(chain, 'minDeposit'),
|
751
705
|
'max': None,
|
752
706
|
},
|
753
707
|
'withdraw': {
|
754
|
-
'min': minWithdrawal,
|
708
|
+
'min': self.safe_number(chain, 'minWithdrawal'),
|
755
709
|
'max': None,
|
756
710
|
},
|
757
711
|
},
|
758
712
|
'info': chain,
|
759
713
|
}
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
networks = self.extend(result[code]['networks'], networks)
|
769
|
-
result[code] = {
|
770
|
-
'id': id,
|
771
|
-
'code': code,
|
772
|
-
'name': None,
|
773
|
-
'type': None,
|
774
|
-
'active': None,
|
775
|
-
'deposit': currencyDepositEnabled,
|
776
|
-
'withdraw': currencyWithdrawEnabled,
|
777
|
-
'fee': None,
|
778
|
-
'precision': self.parse_number(currencyMaxPrecision),
|
779
|
-
'limits': {
|
780
|
-
'amount': {
|
781
|
-
'min': None,
|
782
|
-
'max': None,
|
783
|
-
},
|
784
|
-
'withdraw': {
|
785
|
-
'min': None,
|
786
|
-
'max': None,
|
787
|
-
},
|
788
|
-
},
|
789
|
-
'networks': networks,
|
790
|
-
'info': currency,
|
791
|
-
}
|
714
|
+
infos = self.safe_list(result[code], 'info', [])
|
715
|
+
infos.append(currency)
|
716
|
+
result[code]['info'] = infos
|
717
|
+
# only after all entries are formed in currencies, restructure each entry
|
718
|
+
allKeys = list(result.keys())
|
719
|
+
for i in range(0, len(allKeys)):
|
720
|
+
code = allKeys[i]
|
721
|
+
result[code] = self.safe_currency_structure(result[code]) # self is needed after adding network entry
|
792
722
|
return result
|
793
723
|
|
794
724
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
ccxt/paradex.py
CHANGED
@@ -1245,7 +1245,10 @@ class paradex(Exchange, ImplicitAPI):
|
|
1245
1245
|
price = self.safe_string(order, 'price')
|
1246
1246
|
amount = self.safe_string(order, 'size')
|
1247
1247
|
orderType = self.safe_string(order, 'type')
|
1248
|
+
cancelReason = self.safe_string(order, 'cancel_reason')
|
1248
1249
|
status = self.safe_string(order, 'status')
|
1250
|
+
if cancelReason is not None:
|
1251
|
+
status = 'canceled'
|
1249
1252
|
side = self.safe_string_lower(order, 'side')
|
1250
1253
|
average = self.omit_zero(self.safe_string(order, 'avg_fill_price'))
|
1251
1254
|
remaining = self.omit_zero(self.safe_string(order, 'remaining_size'))
|