ccxt 4.4.82__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 -9
- ccxt/abstract/blofin.py +8 -0
- ccxt/abstract/btcbox.py +1 -0
- ccxt/abstract/myokx.py +2 -0
- ccxt/abstract/okx.py +2 -0
- ccxt/apex.py +2 -1
- ccxt/ascendex.py +187 -151
- ccxt/async_support/__init__.py +3 -9
- ccxt/async_support/apex.py +2 -1
- ccxt/async_support/ascendex.py +187 -151
- ccxt/async_support/base/exchange.py +51 -24
- ccxt/async_support/base/ws/cache.py +6 -1
- ccxt/async_support/bequant.py +1 -1
- ccxt/async_support/bitget.py +5 -6
- ccxt/async_support/bitmart.py +1 -1
- ccxt/async_support/bitrue.py +14 -32
- ccxt/async_support/bitso.py +33 -0
- ccxt/async_support/bitstamp.py +33 -0
- ccxt/async_support/{huobijp.py → bittrade.py} +11 -11
- ccxt/async_support/blofin.py +145 -14
- ccxt/async_support/btcbox.py +25 -5
- ccxt/async_support/bybit.py +16 -37
- ccxt/async_support/cex.py +2 -4
- ccxt/async_support/coinbase.py +58 -47
- ccxt/async_support/coinbaseexchange.py +141 -32
- ccxt/async_support/coincatch.py +14 -67
- ccxt/async_support/coinex.py +28 -29
- ccxt/async_support/coinlist.py +17 -16
- ccxt/async_support/coinmetro.py +20 -11
- ccxt/async_support/coinone.py +8 -10
- ccxt/async_support/coinsph.py +124 -2
- ccxt/async_support/cryptocom.py +109 -2
- ccxt/async_support/cryptomus.py +42 -80
- ccxt/async_support/delta.py +75 -36
- ccxt/async_support/deribit.py +4 -5
- ccxt/async_support/derive.py +46 -10
- ccxt/async_support/ellipx.py +175 -77
- ccxt/async_support/gate.py +1 -1
- ccxt/async_support/gemini.py +3 -4
- ccxt/async_support/hitbtc.py +56 -65
- ccxt/async_support/hollaex.py +106 -49
- ccxt/async_support/htx.py +20 -43
- ccxt/async_support/hyperliquid.py +6 -6
- ccxt/async_support/kraken.py +27 -23
- ccxt/async_support/kucoinfutures.py +5 -0
- ccxt/async_support/lbank.py +1 -1
- 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 +123 -4
- ccxt/base/exchange.py +21 -2
- ccxt/base/types.py +3 -0
- ccxt/bequant.py +1 -1
- ccxt/bitget.py +5 -6
- ccxt/bitmart.py +1 -1
- ccxt/bitrue.py +14 -32
- ccxt/bitso.py +33 -0
- ccxt/bitstamp.py +33 -0
- ccxt/{huobijp.py → bittrade.py} +11 -11
- ccxt/blofin.py +145 -14
- ccxt/btcbox.py +24 -5
- ccxt/bybit.py +16 -37
- ccxt/cex.py +2 -4
- ccxt/coinbase.py +58 -47
- ccxt/coinbaseexchange.py +141 -32
- ccxt/coincatch.py +14 -67
- ccxt/coinex.py +28 -29
- ccxt/coinlist.py +17 -16
- ccxt/coinmetro.py +20 -11
- ccxt/coinone.py +8 -10
- ccxt/coinsph.py +124 -2
- ccxt/cryptocom.py +109 -2
- ccxt/cryptomus.py +42 -80
- ccxt/delta.py +75 -36
- ccxt/deribit.py +4 -5
- ccxt/derive.py +46 -10
- ccxt/ellipx.py +175 -77
- ccxt/gate.py +1 -1
- ccxt/gemini.py +3 -4
- ccxt/hitbtc.py +56 -65
- ccxt/hollaex.py +106 -49
- ccxt/htx.py +20 -43
- ccxt/hyperliquid.py +6 -6
- ccxt/kraken.py +27 -23
- ccxt/kucoinfutures.py +5 -0
- ccxt/lbank.py +1 -1
- 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 +123 -4
- ccxt/pro/__init__.py +109 -5
- ccxt/pro/binance.py +32 -33
- ccxt/pro/bithumb.py +5 -3
- ccxt/pro/{huobijp.py → bittrade.py} +3 -3
- ccxt/pro/kraken.py +249 -79
- ccxt/pro/luno.py +6 -5
- ccxt/pro/mexc.py +254 -7
- ccxt/pro/poloniex.py +6 -2
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/METADATA +8 -11
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/RECORD +110 -121
- ccxt/abstract/bl3p.py +0 -19
- ccxt/abstract/idex.py +0 -26
- ccxt/abstract/kuna.py +0 -182
- ccxt/async_support/base/ws/fast_client.py +0 -97
- ccxt/async_support/bl3p.py +0 -543
- ccxt/async_support/idex.py +0 -1889
- ccxt/async_support/kuna.py +0 -1935
- ccxt/bl3p.py +0 -543
- ccxt/idex.py +0 -1889
- ccxt/kuna.py +0 -1935
- ccxt/pro/idex.py +0 -687
- /ccxt/abstract/{huobijp.py → bittrade.py} +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/WHEEL +0 -0
- {ccxt-4.4.82.dist-info → ccxt-4.4.86.dist-info}/top_level.txt +0 -0
ccxt/cryptomus.py
CHANGED
@@ -369,41 +369,9 @@ class cryptomus(Exchange, ImplicitAPI):
|
|
369
369
|
coins = self.safe_list(response, 'result')
|
370
370
|
result: dict = {}
|
371
371
|
for i in range(0, len(coins)):
|
372
|
-
|
373
|
-
currencyId = self.safe_string(
|
372
|
+
networkEntry = coins[i]
|
373
|
+
currencyId = self.safe_string(networkEntry, 'currency_code')
|
374
374
|
code = self.safe_currency_code(currencyId)
|
375
|
-
allowWithdraw = self.safe_bool(currency, 'can_withdraw')
|
376
|
-
allowDeposit = self.safe_bool(currency, 'can_deposit')
|
377
|
-
isActive = allowWithdraw and allowDeposit
|
378
|
-
networkId = self.safe_string(currency, 'network_code')
|
379
|
-
networksById = self.safe_dict(self.options, 'networksById')
|
380
|
-
networkName = self.safe_string(networksById, networkId, networkId)
|
381
|
-
minWithdraw = self.safe_number(currency, 'min_withdraw')
|
382
|
-
maxWithdraw = self.safe_number(currency, 'max_withdraw')
|
383
|
-
minDeposit = self.safe_number(currency, 'min_deposit')
|
384
|
-
maxDeposit = self.safe_number(currency, 'max_deposit')
|
385
|
-
network = {
|
386
|
-
'id': networkId,
|
387
|
-
'network': networkName,
|
388
|
-
'limits': {
|
389
|
-
'withdraw': {
|
390
|
-
'min': minWithdraw,
|
391
|
-
'max': maxWithdraw,
|
392
|
-
},
|
393
|
-
'deposit': {
|
394
|
-
'min': minDeposit,
|
395
|
-
'max': maxDeposit,
|
396
|
-
},
|
397
|
-
},
|
398
|
-
'active': isActive,
|
399
|
-
'deposit': allowDeposit,
|
400
|
-
'withdraw': allowWithdraw,
|
401
|
-
'fee': None,
|
402
|
-
'precision': None,
|
403
|
-
'info': currency,
|
404
|
-
}
|
405
|
-
networks = {}
|
406
|
-
networks[networkName] = network
|
407
375
|
if not (code in result):
|
408
376
|
result[code] = {
|
409
377
|
'id': currencyId,
|
@@ -411,60 +379,54 @@ class cryptomus(Exchange, ImplicitAPI):
|
|
411
379
|
'precision': None,
|
412
380
|
'type': None,
|
413
381
|
'name': None,
|
414
|
-
'active':
|
415
|
-
'deposit':
|
416
|
-
'withdraw':
|
382
|
+
'active': None,
|
383
|
+
'deposit': None,
|
384
|
+
'withdraw': None,
|
417
385
|
'fee': None,
|
418
386
|
'limits': {
|
419
387
|
'withdraw': {
|
420
|
-
'min':
|
421
|
-
'max':
|
388
|
+
'min': None,
|
389
|
+
'max': None,
|
422
390
|
},
|
423
391
|
'deposit': {
|
424
|
-
'min':
|
425
|
-
'max':
|
392
|
+
'min': None,
|
393
|
+
'max': None,
|
426
394
|
},
|
427
395
|
},
|
428
|
-
'networks':
|
429
|
-
'info':
|
430
|
-
}
|
431
|
-
else:
|
432
|
-
parsed = result[code]
|
433
|
-
parsedNetworks = self.safe_dict(parsed, 'networks')
|
434
|
-
parsed['networks'] = self.extend(parsedNetworks, networks)
|
435
|
-
if isActive:
|
436
|
-
parsed['active'] = True
|
437
|
-
parsed['deposit'] = True
|
438
|
-
parsed['withdraw'] = True
|
439
|
-
else:
|
440
|
-
if allowWithdraw:
|
441
|
-
parsed['withdraw'] = True
|
442
|
-
if allowDeposit:
|
443
|
-
parsed['deposit'] = True
|
444
|
-
parsedLimits = self.safe_dict(parsed, 'limits')
|
445
|
-
withdrawLimits = {
|
446
|
-
'min': None,
|
447
|
-
'max': None,
|
396
|
+
'networks': {},
|
397
|
+
'info': {},
|
448
398
|
}
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
399
|
+
networkId = self.safe_string(networkEntry, 'network_code')
|
400
|
+
networkCode = self.network_id_to_code(networkId)
|
401
|
+
result[code]['networks'][networkCode] = {
|
402
|
+
'id': networkId,
|
403
|
+
'network': networkCode,
|
404
|
+
'limits': {
|
405
|
+
'withdraw': {
|
406
|
+
'min': self.safe_number(networkEntry, 'min_withdraw'),
|
407
|
+
'max': self.safe_number(networkEntry, 'max_withdraw'),
|
408
|
+
},
|
409
|
+
'deposit': {
|
410
|
+
'min': self.safe_number(networkEntry, 'min_deposit'),
|
411
|
+
'max': self.safe_number(networkEntry, 'max_deposit'),
|
412
|
+
},
|
413
|
+
},
|
414
|
+
'active': None,
|
415
|
+
'deposit': self.safe_bool(networkEntry, 'can_withdraw'),
|
416
|
+
'withdraw': self.safe_bool(networkEntry, 'can_deposit'),
|
417
|
+
'fee': None,
|
418
|
+
'precision': None,
|
419
|
+
'info': networkEntry,
|
420
|
+
}
|
421
|
+
# add entry in info
|
422
|
+
info = self.safe_list(result[code], 'info', [])
|
423
|
+
info.append(networkEntry)
|
424
|
+
result[code]['info'] = info
|
425
|
+
# only after all entries are formed in currencies, restructure each entry
|
426
|
+
allKeys = list(result.keys())
|
427
|
+
for i in range(0, len(allKeys)):
|
428
|
+
code = allKeys[i]
|
429
|
+
result[code] = self.safe_currency_structure(result[code]) # self is needed after adding network entry
|
468
430
|
return result
|
469
431
|
|
470
432
|
def fetch_tickers(self, symbols: Strings = None, params={}) -> Tickers:
|
ccxt/delta.py
CHANGED
@@ -509,31 +509,49 @@ class delta(Exchange, ImplicitAPI):
|
|
509
509
|
"""
|
510
510
|
response = self.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,41 @@ class delta(Exchange, ImplicitAPI):
|
|
545
563
|
id = self.safe_string(currency, 'symbol')
|
546
564
|
numericId = self.safe_integer(currency, 'id')
|
547
565
|
code = self.safe_currency_code(id)
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
566
|
+
chains = self.safe_list(currency, 'networks', [])
|
567
|
+
networks = {}
|
568
|
+
for j in range(0, len(chains)):
|
569
|
+
chain = chains[j]
|
570
|
+
networkId = self.safe_string(chain, 'network')
|
571
|
+
networkCode = self.network_id_to_code(networkId)
|
572
|
+
networks[networkCode] = {
|
573
|
+
'id': networkId,
|
574
|
+
'network': networkCode,
|
575
|
+
'name': self.safe_string(chain, 'name'),
|
576
|
+
'info': chain,
|
577
|
+
'active': self.safe_string(chain, 'status') == 'enabled',
|
578
|
+
'deposit': self.safe_string(chain, 'deposit_status') == 'enabled',
|
579
|
+
'withdraw': self.safe_string(chain, 'withdrawal_status') == 'enabled',
|
580
|
+
'fee': self.safe_number(chain, 'base_withdrawal_fee'),
|
581
|
+
'limits': {
|
582
|
+
'deposit': {
|
583
|
+
'min': self.safe_number(chain, 'min_deposit_amount'),
|
584
|
+
'max': None,
|
585
|
+
},
|
586
|
+
'withdraw': {
|
587
|
+
'min': self.safe_number(chain, 'min_withdrawal_amount'),
|
588
|
+
'max': None,
|
589
|
+
},
|
590
|
+
},
|
591
|
+
}
|
592
|
+
result[code] = self.safe_currency_structure({
|
554
593
|
'id': id,
|
555
594
|
'numericId': numericId,
|
556
595
|
'code': code,
|
557
596
|
'name': self.safe_string(currency, 'name'),
|
558
597
|
'info': currency, # the original payload
|
559
|
-
'active':
|
560
|
-
'deposit':
|
561
|
-
'withdraw':
|
598
|
+
'active': None,
|
599
|
+
'deposit': self.safe_string(currency, 'deposit_status') == 'enabled',
|
600
|
+
'withdraw': self.safe_string(currency, 'withdrawal_status') == 'enabled',
|
562
601
|
'fee': self.safe_number(currency, 'base_withdrawal_fee'),
|
563
602
|
'precision': self.parse_number(self.parse_precision(self.safe_string(currency, 'precision'))),
|
564
603
|
'limits': {
|
@@ -568,9 +607,9 @@ class delta(Exchange, ImplicitAPI):
|
|
568
607
|
'max': None,
|
569
608
|
},
|
570
609
|
},
|
571
|
-
'networks':
|
610
|
+
'networks': networks,
|
572
611
|
'type': 'crypto',
|
573
|
-
}
|
612
|
+
})
|
574
613
|
return result
|
575
614
|
|
576
615
|
def load_markets(self, reload=False, params={}):
|
ccxt/deribit.py
CHANGED
@@ -640,18 +640,17 @@ class deribit(Exchange, ImplicitAPI):
|
|
640
640
|
# "testnet": True
|
641
641
|
# }
|
642
642
|
#
|
643
|
-
data = self.
|
643
|
+
data = self.safe_list(response, 'result', [])
|
644
644
|
result: dict = {}
|
645
645
|
for i in range(0, len(data)):
|
646
646
|
currency = data[i]
|
647
647
|
currencyId = self.safe_string(currency, 'currency')
|
648
648
|
code = self.safe_currency_code(currencyId)
|
649
|
-
|
650
|
-
result[code] = {
|
649
|
+
result[code] = self.safe_currency_structure({
|
651
650
|
'info': currency,
|
652
651
|
'code': code,
|
653
652
|
'id': currencyId,
|
654
|
-
'name':
|
653
|
+
'name': self.safe_string(currency, 'currency_long'),
|
655
654
|
'active': None,
|
656
655
|
'deposit': None,
|
657
656
|
'withdraw': None,
|
@@ -673,7 +672,7 @@ class deribit(Exchange, ImplicitAPI):
|
|
673
672
|
},
|
674
673
|
},
|
675
674
|
'networks': None,
|
676
|
-
}
|
675
|
+
})
|
677
676
|
return result
|
678
677
|
|
679
678
|
def code_from_options(self, methodName, params={}):
|
ccxt/derive.py
CHANGED
@@ -460,14 +460,50 @@ class derive(Exchange, ImplicitAPI):
|
|
460
460
|
result: dict = {}
|
461
461
|
tokenResponse = self.publicGetGetAllCurrencies(params)
|
462
462
|
#
|
463
|
-
#
|
464
|
-
#
|
465
|
-
#
|
466
|
-
#
|
467
|
-
#
|
468
|
-
#
|
469
|
-
#
|
470
|
-
#
|
463
|
+
# {
|
464
|
+
# "result": [
|
465
|
+
# {
|
466
|
+
# "currency": "SEI",
|
467
|
+
# "instrument_types": [
|
468
|
+
# "perp"
|
469
|
+
# ],
|
470
|
+
# "protocol_asset_addresses": {
|
471
|
+
# "perp": "0x7225889B75fd34C68eA3098dAE04D50553C09840",
|
472
|
+
# "option": null,
|
473
|
+
# "spot": null,
|
474
|
+
# "underlying_erc20": null
|
475
|
+
# },
|
476
|
+
# "managers": [
|
477
|
+
# {
|
478
|
+
# "address": "0x28c9ddF9A3B29c2E6a561c1BC520954e5A33de5D",
|
479
|
+
# "margin_type": "SM",
|
480
|
+
# "currency": null
|
481
|
+
# }
|
482
|
+
# ],
|
483
|
+
# "srm_im_discount": "0",
|
484
|
+
# "srm_mm_discount": "0",
|
485
|
+
# "pm2_collateral_discounts": [],
|
486
|
+
# "borrow_apy": "0",
|
487
|
+
# "supply_apy": "0",
|
488
|
+
# "total_borrow": "0",
|
489
|
+
# "total_supply": "0",
|
490
|
+
# "asset_cap_and_supply_per_manager": {
|
491
|
+
# "perp": {
|
492
|
+
# "SM": [
|
493
|
+
# {
|
494
|
+
# "current_open_interest": "0",
|
495
|
+
# "interest_cap": "2000000",
|
496
|
+
# "manager_currency": null
|
497
|
+
# }
|
498
|
+
# ]
|
499
|
+
# },
|
500
|
+
# "option": {},
|
501
|
+
# "erc20": {}
|
502
|
+
# },
|
503
|
+
# "market_type": "SRM_PERP_ONLY",
|
504
|
+
# "spot_price": "0.2193542905042081",
|
505
|
+
# "spot_price_24h": "0.238381655533635830"
|
506
|
+
# },
|
471
507
|
# "id": "7e07fe1d-0ab4-4d2b-9e22-b65ce9e232dc"
|
472
508
|
# }
|
473
509
|
#
|
@@ -476,7 +512,7 @@ class derive(Exchange, ImplicitAPI):
|
|
476
512
|
currency = currencies[i]
|
477
513
|
currencyId = self.safe_string(currency, 'currency')
|
478
514
|
code = self.safe_currency_code(currencyId)
|
479
|
-
result[code] = {
|
515
|
+
result[code] = self.safe_currency_structure({
|
480
516
|
'id': currencyId,
|
481
517
|
'name': None,
|
482
518
|
'code': code,
|
@@ -497,7 +533,7 @@ class derive(Exchange, ImplicitAPI):
|
|
497
533
|
},
|
498
534
|
},
|
499
535
|
'info': currency,
|
500
|
-
}
|
536
|
+
})
|
501
537
|
return result
|
502
538
|
|
503
539
|
def fetch_markets(self, params={}) -> List[Market]:
|