ccxt 4.3.94__py2.py3-none-any.whl → 4.3.96__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 +1 -5
- ccxt/abstract/okx.py +2 -0
- ccxt/ascendex.py +8 -6
- ccxt/async_support/__init__.py +1 -5
- ccxt/async_support/ascendex.py +9 -6
- ccxt/async_support/base/exchange.py +1 -4
- ccxt/async_support/bingx.py +1 -0
- ccxt/async_support/bitfinex.py +4 -2
- ccxt/async_support/bitfinex2.py +7 -5
- ccxt/async_support/blofin.py +0 -1
- ccxt/async_support/btcturk.py +3 -3
- ccxt/async_support/bybit.py +7 -2
- ccxt/async_support/gate.py +3 -2
- ccxt/async_support/gemini.py +3 -2
- ccxt/async_support/hyperliquid.py +311 -40
- ccxt/async_support/independentreserve.py +5 -3
- ccxt/async_support/indodax.py +2 -0
- ccxt/async_support/kucoin.py +12 -12
- ccxt/async_support/mexc.py +78 -154
- ccxt/async_support/okx.py +2 -1
- ccxt/async_support/p2b.py +0 -1
- ccxt/async_support/tradeogre.py +0 -1
- ccxt/base/exchange.py +4 -8
- ccxt/bingx.py +1 -0
- ccxt/bitfinex.py +3 -2
- ccxt/bitfinex2.py +6 -5
- ccxt/blofin.py +0 -1
- ccxt/btcturk.py +3 -3
- ccxt/bybit.py +7 -2
- ccxt/gate.py +3 -2
- ccxt/gemini.py +3 -2
- ccxt/hyperliquid.py +311 -40
- ccxt/independentreserve.py +4 -3
- ccxt/indodax.py +2 -0
- ccxt/kucoin.py +2 -2
- ccxt/mexc.py +78 -154
- ccxt/okx.py +2 -1
- ccxt/p2b.py +0 -1
- ccxt/pro/__init__.py +1 -1
- ccxt/pro/binance.py +90 -2
- ccxt/pro/bybit.py +58 -4
- ccxt/pro/cryptocom.py +195 -0
- ccxt/pro/okx.py +238 -31
- ccxt/test/tests_async.py +3 -0
- ccxt/test/tests_sync.py +3 -0
- ccxt/tradeogre.py +0 -1
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/METADATA +5 -5
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/RECORD +51 -53
- ccxt/abstract/bitbay.py +0 -53
- ccxt/abstract/hitbtc3.py +0 -115
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/LICENSE.txt +0 -0
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/WHEEL +0 -0
- {ccxt-4.3.94.dist-info → ccxt-4.3.96.dist-info}/top_level.txt +0 -0
ccxt/async_support/mexc.py
CHANGED
@@ -462,164 +462,82 @@ class mexc(Exchange, ImplicitAPI):
|
|
462
462
|
'LTC': 'LTC',
|
463
463
|
},
|
464
464
|
'networks': {
|
465
|
-
'
|
465
|
+
'TRC20': 'TRX',
|
466
|
+
'TON': 'TONCOIN',
|
467
|
+
'AVAXC': 'AVAX_CCHAIN',
|
468
|
+
'ERC20': 'ETH',
|
466
469
|
'ACA': 'ACALA',
|
467
|
-
'ADA': 'Cardano(ADA)',
|
468
|
-
'AE': 'AE',
|
469
|
-
'ALGO': 'Algorand(ALGO)',
|
470
|
-
'ALPH': 'Alephium(ALPH)',
|
471
|
-
'
|
472
|
-
'
|
473
|
-
'APT': 'APTOS(APT)',
|
474
|
-
'AR': 'AR',
|
475
|
-
'ARB': 'Arbitrum One(ARB)',
|
476
|
-
'ARBNOVA': 'ARBNOVA',
|
477
|
-
'ARBONE': 'ArbitrumOne(ARB)',
|
478
|
-
'ARK': 'ARK',
|
470
|
+
# 'ADA': 'Cardano(ADA)',
|
471
|
+
# 'AE': 'AE',
|
472
|
+
# 'ALGO': 'Algorand(ALGO)',
|
473
|
+
# 'ALPH': 'Alephium(ALPH)',
|
474
|
+
# 'ARB': 'Arbitrum One(ARB)',
|
475
|
+
# 'ARBONE': 'ArbitrumOne(ARB)',
|
479
476
|
'ASTR': 'ASTAR', # ASTAREVM is different
|
480
|
-
'ATOM': 'Cosmos(ATOM)',
|
481
|
-
'AVAXC': 'Avalanche C Chain(AVAX CCHAIN)',
|
482
|
-
'AVAXX': 'Avalanche X Chain(AVAX XCHAIN)',
|
483
|
-
'AZERO': 'Aleph Zero(AZERO)',
|
484
|
-
'BCH': 'Bitcoin Cash(BCH)',
|
485
|
-
'
|
486
|
-
'
|
487
|
-
'
|
488
|
-
'BEP20': 'BNB Smart Chain(BEP20)',
|
489
|
-
'BITCI': 'BITCI',
|
490
|
-
'BNC': 'BNC',
|
491
|
-
'BNCDOT': 'BNCPOLKA',
|
492
|
-
'BOBA': 'BOBA',
|
493
|
-
'BSC': 'BEP20(BSC)',
|
494
|
-
'BSV': 'Bitcoin SV(BSV)',
|
495
|
-
'BTC': 'Bitcoin(BTC)',
|
477
|
+
# 'ATOM': 'Cosmos(ATOM)',
|
478
|
+
# 'AVAXC': 'Avalanche C Chain(AVAX CCHAIN)',
|
479
|
+
# 'AVAXX': 'Avalanche X Chain(AVAX XCHAIN)',
|
480
|
+
# 'AZERO': 'Aleph Zero(AZERO)',
|
481
|
+
# 'BCH': 'Bitcoin Cash(BCH)',
|
482
|
+
# 'BNCDOT': 'BNCPOLKA',
|
483
|
+
# 'BSV': 'Bitcoin SV(BSV)',
|
484
|
+
# 'BTC': 'Bitcoin(BTC)',
|
496
485
|
'BTM': 'BTM2',
|
497
|
-
'
|
498
|
-
'
|
499
|
-
'
|
500
|
-
'CHZ2': 'Chiliz Chain(CHZ2)',
|
501
|
-
'CKB': 'CKB',
|
502
|
-
'CLORE': 'Clore.ai(CLORE)',
|
486
|
+
# 'CHZ': 'Chiliz Legacy Chain(CHZ)',
|
487
|
+
# 'CHZ2': 'Chiliz Chain(CHZ2)',
|
488
|
+
# 'CLORE': 'Clore.ai(CLORE)',
|
503
489
|
'CRC20': 'CRONOS',
|
504
|
-
'
|
505
|
-
'
|
506
|
-
'
|
507
|
-
'
|
508
|
-
'
|
509
|
-
'DOGE': 'Dogecoin(DOGE)',
|
510
|
-
'DOT': 'Polkadot(DOT)',
|
511
|
-
'DYM': 'Dymension(DYM)',
|
512
|
-
'EDG': 'EDG',
|
513
|
-
'EGLD': 'EGLD',
|
514
|
-
'EOS': 'EOS',
|
515
|
-
'ERC20': 'Ethereum(ERC20)',
|
516
|
-
'ETC': 'Ethereum Classic(ETC)',
|
490
|
+
# 'DC': 'Dogechain(DC)',
|
491
|
+
# 'DNX': 'Dynex(DNX)',
|
492
|
+
# 'DOGE': 'Dogecoin(DOGE)',
|
493
|
+
# 'DOT': 'Polkadot(DOT)',
|
494
|
+
# 'DYM': 'Dymension(DYM)',
|
517
495
|
'ETHF': 'ETF',
|
518
|
-
'ETHW': 'ETHW',
|
519
|
-
'EVER': 'EVER',
|
520
|
-
'FET': 'FET',
|
521
|
-
'FIL': 'FIL',
|
522
|
-
'FIO': 'FIO',
|
523
|
-
'FLOW': 'FLOW',
|
524
|
-
'FSN': 'FSN',
|
525
|
-
'FTM': 'Fantom(FTM)',
|
526
|
-
'FUSE': 'FUSE',
|
527
|
-
'GLMR': 'GLMR',
|
528
|
-
'GRIN': 'GRIN',
|
529
|
-
'HBAR': 'Hedera(HBAR)',
|
530
|
-
'HIVE': 'HIVE',
|
531
496
|
'HRC20': 'HECO',
|
532
|
-
'
|
533
|
-
'ICP': 'Internet Computer(ICP)',
|
534
|
-
'INDEX': 'Index Chain',
|
535
|
-
'IOST': 'IOST',
|
536
|
-
'IOTA': 'IOTA',
|
537
|
-
'IOTX': 'IOTX',
|
538
|
-
'IRIS': 'IRIS',
|
539
|
-
'KAR': 'KAR',
|
540
|
-
'KAS': 'Kaspa(KAS)',
|
541
|
-
'KAVA': 'KAVA',
|
542
|
-
'KDA': 'KDA',
|
543
|
-
'KILT': 'KILT',
|
544
|
-
'KLAY': 'Klaytn(KLAY)',
|
545
|
-
'KMA': 'KMA',
|
546
|
-
'KSM': 'KSM',
|
547
|
-
'LAT': 'LAT',
|
548
|
-
'LAVA': 'Elysium(LAVA)',
|
549
|
-
'LTC': 'Litecoin(LTC)',
|
550
|
-
'LUNA': 'Terra(LUNA)',
|
551
|
-
'MASS': 'MASS',
|
552
|
-
'MATIC': 'Polygon(MATIC)',
|
553
|
-
'MCOIN': 'Mcoin Network',
|
554
|
-
'METIS': 'METIS',
|
555
|
-
'MINA': 'MINA',
|
556
|
-
'MNT': 'Mantle(MNT)',
|
557
|
-
'MOVR': 'MOVR',
|
558
|
-
'MTRG': 'Meter(MTRG)',
|
559
|
-
'NAS': 'NAS',
|
560
|
-
'NEAR': 'NEAR Protocol(NEAR)',
|
561
|
-
'NEBL': 'NEBL',
|
562
|
-
'NEM': 'NEM',
|
563
|
-
'NEO': 'NEO',
|
564
|
-
'NEO3': 'NEO3',
|
565
|
-
'NEOXA': 'Neoxa Network',
|
566
|
-
'NULS': 'NULS',
|
497
|
+
# 'KLAY': 'Klaytn(KLAY)',
|
567
498
|
'OASIS': 'ROSE',
|
568
|
-
'OASYS': 'OASYS',
|
569
499
|
'OKC': 'OKT',
|
570
|
-
'OMN': 'Omega Network(OMN)',
|
571
|
-
'OMNI': 'OMNI',
|
572
|
-
'ONE': 'ONE',
|
573
|
-
'ONT': 'ONT',
|
574
|
-
'OPTIMISM': 'Optimism(OP)',
|
575
|
-
'OSMO': 'OSMO',
|
576
|
-
'PLCU': 'PLCU',
|
577
|
-
'POKT': 'POKT',
|
578
|
-
'QKC': 'QKC',
|
579
|
-
'QTUM': 'QTUM',
|
580
|
-
'RAP20': 'RAP20' + ' ' + '(Rangers Mainnet)',
|
581
|
-
'REI': 'REI',
|
582
500
|
'RSK': 'RBTC',
|
583
|
-
'RVN': 'Ravencoin(RVN)',
|
584
|
-
'SATOX': 'Satoxcoin(SATOX)',
|
585
|
-
'SC': 'SC',
|
586
|
-
'SCRT': 'SCRT',
|
587
|
-
'SDN': 'SDN',
|
588
|
-
'SGB': 'SGB',
|
589
|
-
'SOL': 'Solana(SOL)',
|
590
|
-
'STAR': 'STAR',
|
591
|
-
'STARK': 'Starknet(STARK)',
|
592
|
-
'STEEM': 'STEEM',
|
593
|
-
'SYS': 'SYS',
|
594
|
-
'TAO': 'Bittensor(TAO)',
|
595
|
-
'TIA': 'Celestia(TIA)',
|
596
|
-
'TOMO': 'TOMO',
|
597
|
-
'TON': 'Toncoin(TON)',
|
598
|
-
'TRC10': 'TRC10',
|
599
|
-
'TRC20': 'Tron(TRC20)',
|
600
|
-
'UGAS': 'UGAS(Ultrain)',
|
601
|
-
'VET': 'VeChain(VET)',
|
602
|
-
'VEX': 'Vexanium(VEX)',
|
603
|
-
'VSYS': 'VSYS',
|
604
|
-
'WAVES': 'WAVES',
|
605
|
-
'WAX': 'WAX',
|
606
|
-
'WEMIX': 'WEMIX',
|
607
|
-
'XCH': 'Chia(XCH)',
|
608
|
-
'XDC': 'XDC',
|
609
|
-
'XEC': 'XEC',
|
610
|
-
'XLM': 'Stellar(XLM)',
|
611
|
-
'XMR': 'Monero(XMR)',
|
612
|
-
'XNA': 'Neurai(XNA)',
|
613
|
-
'XPR': 'XPR Network',
|
614
|
-
'XRD': 'XRD',
|
615
|
-
'XRP': 'Ripple(XRP)',
|
616
|
-
'XTZ': 'XTZ',
|
617
|
-
'XVG': 'XVG',
|
618
|
-
'XYM': 'XYM',
|
619
|
-
'ZEC': 'ZEC',
|
620
|
-
'ZEN': 'ZEN',
|
621
|
-
'ZIL': 'Zilliqa(ZIL)',
|
622
|
-
'ZTG': 'ZTG',
|
501
|
+
# 'RVN': 'Ravencoin(RVN)',
|
502
|
+
# 'SATOX': 'Satoxcoin(SATOX)',
|
503
|
+
# 'SC': 'SC',
|
504
|
+
# 'SCRT': 'SCRT',
|
505
|
+
# 'SDN': 'SDN',
|
506
|
+
# 'SGB': 'SGB',
|
507
|
+
# 'SOL': 'Solana(SOL)',
|
508
|
+
# 'STAR': 'STAR',
|
509
|
+
# 'STARK': 'Starknet(STARK)',
|
510
|
+
# 'STEEM': 'STEEM',
|
511
|
+
# 'SYS': 'SYS',
|
512
|
+
# 'TAO': 'Bittensor(TAO)',
|
513
|
+
# 'TIA': 'Celestia(TIA)',
|
514
|
+
# 'TOMO': 'TOMO',
|
515
|
+
# 'TON': 'Toncoin(TON)',
|
516
|
+
# 'TRC10': 'TRC10',
|
517
|
+
# 'TRC20': 'Tron(TRC20)',
|
518
|
+
# 'UGAS': 'UGAS(Ultrain)',
|
519
|
+
# 'VET': 'VeChain(VET)',
|
520
|
+
# 'VEX': 'Vexanium(VEX)',
|
521
|
+
# 'VSYS': 'VSYS',
|
522
|
+
# 'WAVES': 'WAVES',
|
523
|
+
# 'WAX': 'WAX',
|
524
|
+
# 'WEMIX': 'WEMIX',
|
525
|
+
# 'XCH': 'Chia(XCH)',
|
526
|
+
# 'XDC': 'XDC',
|
527
|
+
# 'XEC': 'XEC',
|
528
|
+
# 'XLM': 'Stellar(XLM)',
|
529
|
+
# 'XMR': 'Monero(XMR)',
|
530
|
+
# 'XNA': 'Neurai(XNA)',
|
531
|
+
# 'XPR': 'XPR Network',
|
532
|
+
# 'XRD': 'XRD',
|
533
|
+
# 'XRP': 'Ripple(XRP)',
|
534
|
+
# 'XTZ': 'XTZ',
|
535
|
+
# 'XVG': 'XVG',
|
536
|
+
# 'XYM': 'XYM',
|
537
|
+
# 'ZEC': 'ZEC',
|
538
|
+
# 'ZEN': 'ZEN',
|
539
|
+
# 'ZIL': 'Zilliqa(ZIL)',
|
540
|
+
# 'ZTG': 'ZTG',
|
623
541
|
# todo: uncomment below after concensus
|
624
542
|
# 'ALAYA': 'ATP',
|
625
543
|
# 'ANDUSCHAIN': 'DEB',
|
@@ -891,6 +809,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
891
809
|
async def fetch_status(self, params={}):
|
892
810
|
"""
|
893
811
|
the latest known information on the availability of the exchange API
|
812
|
+
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#test-connectivity
|
813
|
+
:see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-server-time
|
894
814
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
895
815
|
:returns dict: a `status structure <https://docs.ccxt.com/#/?id=exchange-status-structure>`
|
896
816
|
"""
|
@@ -924,6 +844,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
924
844
|
async def fetch_time(self, params={}):
|
925
845
|
"""
|
926
846
|
fetches the current integer timestamp in milliseconds from the exchange server
|
847
|
+
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#check-server-time
|
848
|
+
:see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-server-time
|
927
849
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
928
850
|
:returns int: the current integer timestamp in milliseconds from the exchange server
|
929
851
|
"""
|
@@ -1011,7 +933,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
1011
933
|
chains = self.safe_value(currency, 'networkList', [])
|
1012
934
|
for j in range(0, len(chains)):
|
1013
935
|
chain = chains[j]
|
1014
|
-
networkId = self.safe_string_2(chain, '
|
936
|
+
networkId = self.safe_string_2(chain, 'netWork', 'network')
|
1015
937
|
network = self.network_id_to_code(networkId)
|
1016
938
|
isDepositEnabled = self.safe_bool(chain, 'depositEnable', False)
|
1017
939
|
isWithdrawEnabled = self.safe_bool(chain, 'withdrawEnable', False)
|
@@ -1080,6 +1002,8 @@ class mexc(Exchange, ImplicitAPI):
|
|
1080
1002
|
async def fetch_markets(self, params={}) -> List[Market]:
|
1081
1003
|
"""
|
1082
1004
|
retrieves data on all markets for mexc
|
1005
|
+
:see: https://mexcdevelop.github.io/apidocs/spot_v3_en/#exchange-information
|
1006
|
+
:see: https://mexcdevelop.github.io/apidocs/contract_v1_en/#get-the-contract-information
|
1083
1007
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
1084
1008
|
:returns dict[]: an array of objects representing market data
|
1085
1009
|
"""
|
@@ -4120,7 +4044,7 @@ class mexc(Exchange, ImplicitAPI):
|
|
4120
4044
|
#
|
4121
4045
|
address = self.safe_string(depositAddress, 'address')
|
4122
4046
|
currencyId = self.safe_string(depositAddress, 'coin')
|
4123
|
-
networkId = self.safe_string(depositAddress, '
|
4047
|
+
networkId = self.safe_string(depositAddress, 'netWork')
|
4124
4048
|
self.check_address(address)
|
4125
4049
|
return {
|
4126
4050
|
'currency': self.safe_currency_code(currencyId, currency),
|
@@ -4844,14 +4768,14 @@ class mexc(Exchange, ImplicitAPI):
|
|
4844
4768
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
4845
4769
|
:returns dict: a `transaction structure <https://docs.ccxt.com/#/?id=transaction-structure>`
|
4846
4770
|
"""
|
4771
|
+
await self.load_markets()
|
4772
|
+
currency = self.currency(code)
|
4847
4773
|
tag, params = self.handle_withdraw_tag_and_params(tag, params)
|
4848
4774
|
networks = self.safe_dict(self.options, 'networks', {})
|
4849
4775
|
network = self.safe_string_2(params, 'network', 'netWork') # self line allows the user to specify either ERC20 or ETH
|
4850
4776
|
network = self.safe_string(networks, network, network) # handle ETH > ERC-20 alias
|
4851
|
-
network = self.
|
4777
|
+
network = self.network_code_to_id(network, currency['code'])
|
4852
4778
|
self.check_address(address)
|
4853
|
-
await self.load_markets()
|
4854
|
-
currency = self.currency(code)
|
4855
4779
|
request: dict = {
|
4856
4780
|
'coin': currency['id'],
|
4857
4781
|
'address': address,
|
ccxt/async_support/okx.py
CHANGED
@@ -134,7 +134,6 @@ class okx(Exchange, ImplicitAPI):
|
|
134
134
|
'fetchOrderBooks': False,
|
135
135
|
'fetchOrders': False,
|
136
136
|
'fetchOrderTrades': True,
|
137
|
-
'fetchPermissions': None,
|
138
137
|
'fetchPosition': True,
|
139
138
|
'fetchPositionHistory': 'emulated',
|
140
139
|
'fetchPositions': True,
|
@@ -349,6 +348,7 @@ class okx(Exchange, ImplicitAPI):
|
|
349
348
|
'account/account-position-risk': 2,
|
350
349
|
'account/bills': 5 / 3,
|
351
350
|
'account/bills-archive': 5 / 3,
|
351
|
+
'account/bills-history-archive': 2,
|
352
352
|
'account/config': 4,
|
353
353
|
'account/max-size': 1,
|
354
354
|
'account/max-avail-size': 1,
|
@@ -503,6 +503,7 @@ class okx(Exchange, ImplicitAPI):
|
|
503
503
|
'account/fixed-loan/amend-borrowing-order': 5,
|
504
504
|
'account/fixed-loan/manual-reborrow': 5,
|
505
505
|
'account/fixed-loan/repay-borrowing-order': 5,
|
506
|
+
'account/bills-history-archive': 72000, # 12 req/day
|
506
507
|
# subaccount
|
507
508
|
'users/subaccount/modify-apikey': 10,
|
508
509
|
'asset/subaccount/transfer': 10,
|
ccxt/async_support/p2b.py
CHANGED
ccxt/async_support/tradeogre.py
CHANGED
ccxt/base/exchange.py
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
# -----------------------------------------------------------------------------
|
6
6
|
|
7
|
-
__version__ = '4.3.
|
7
|
+
__version__ = '4.3.96'
|
8
8
|
|
9
9
|
# -----------------------------------------------------------------------------
|
10
10
|
|
@@ -1930,7 +1930,6 @@ class Exchange(object):
|
|
1930
1930
|
'fetchOrdersWs': None,
|
1931
1931
|
'fetchOrderTrades': None,
|
1932
1932
|
'fetchOrderWs': None,
|
1933
|
-
'fetchPermissions': None,
|
1934
1933
|
'fetchPosition': None,
|
1935
1934
|
'fetchPositionHistory': None,
|
1936
1935
|
'fetchPositionsHistory': None,
|
@@ -3691,7 +3690,7 @@ class Exchange(object):
|
|
3691
3690
|
if currencyCode is None:
|
3692
3691
|
currencies = list(self.currencies.values())
|
3693
3692
|
for i in range(0, len(currencies)):
|
3694
|
-
currency = [i]
|
3693
|
+
currency = currencies[i]
|
3695
3694
|
networks = self.safe_dict(currency, 'networks')
|
3696
3695
|
network = self.safe_dict(networks, networkCode)
|
3697
3696
|
networkId = self.safe_string(network, 'id')
|
@@ -3809,12 +3808,12 @@ class Exchange(object):
|
|
3809
3808
|
'nonce': None,
|
3810
3809
|
}
|
3811
3810
|
|
3812
|
-
def parse_ohlcvs(self, ohlcvs: List[object], market: Any = None, timeframe: str = '1m', since: Int = None, limit: Int = None):
|
3811
|
+
def parse_ohlcvs(self, ohlcvs: List[object], market: Any = None, timeframe: str = '1m', since: Int = None, limit: Int = None, tail: Bool = False):
|
3813
3812
|
results = []
|
3814
3813
|
for i in range(0, len(ohlcvs)):
|
3815
3814
|
results.append(self.parse_ohlcv(ohlcvs[i], market))
|
3816
3815
|
sorted = self.sort_by(results, 0)
|
3817
|
-
return self.filter_by_since_limit(sorted, since, limit, 0)
|
3816
|
+
return self.filter_by_since_limit(sorted, since, limit, 0, tail)
|
3818
3817
|
|
3819
3818
|
def parse_leverage_tiers(self, response: Any, symbols: List[str] = None, marketIdKey=None):
|
3820
3819
|
# marketIdKey should only be None when response is a dictionary
|
@@ -4138,9 +4137,6 @@ class Exchange(object):
|
|
4138
4137
|
self.cancel_order_ws(id, symbol)
|
4139
4138
|
return self.create_order_ws(symbol, type, side, amount, price, params)
|
4140
4139
|
|
4141
|
-
def fetch_permissions(self, params={}):
|
4142
|
-
raise NotSupported(self.id + ' fetchPermissions() is not supported yet')
|
4143
|
-
|
4144
4140
|
def fetch_position(self, symbol: str, params={}):
|
4145
4141
|
raise NotSupported(self.id + ' fetchPosition() is not supported yet')
|
4146
4142
|
|
ccxt/bingx.py
CHANGED
ccxt/bitfinex.py
CHANGED
@@ -565,11 +565,11 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
565
565
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
566
566
|
:returns dict[]: an array of objects representing market data
|
567
567
|
"""
|
568
|
-
|
568
|
+
idsPromise = self.publicGetSymbols()
|
569
569
|
#
|
570
570
|
# ["btcusd", "ltcusd", "ltcbtc"]
|
571
571
|
#
|
572
|
-
|
572
|
+
detailsPromise = self.publicGetSymbolsDetails()
|
573
573
|
#
|
574
574
|
# [
|
575
575
|
# {
|
@@ -584,6 +584,7 @@ class bitfinex(Exchange, ImplicitAPI):
|
|
584
584
|
# },
|
585
585
|
# ]
|
586
586
|
#
|
587
|
+
ids, details = [idsPromise, detailsPromise]
|
587
588
|
result = []
|
588
589
|
for i in range(0, len(details)):
|
589
590
|
market = details[i]
|
ccxt/bitfinex2.py
CHANGED
@@ -534,12 +534,13 @@ class bitfinex2(Exchange, ImplicitAPI):
|
|
534
534
|
:param dict [params]: extra parameters specific to the exchange API endpoint
|
535
535
|
:returns dict[]: an array of objects representing market data
|
536
536
|
"""
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
futuresMarketsInfo =
|
537
|
+
spotMarketsInfoPromise = self.publicGetConfPubInfoPair(params)
|
538
|
+
futuresMarketsInfoPromise = self.publicGetConfPubInfoPairFutures(params)
|
539
|
+
marginIdsPromise = self.publicGetConfPubListPairMargin(params)
|
540
|
+
spotMarketsInfo, futuresMarketsInfo, marginIds = [spotMarketsInfoPromise, futuresMarketsInfoPromise, marginIdsPromise]
|
541
|
+
spotMarketsInfo = self.safe_list(spotMarketsInfo, 0, [])
|
542
|
+
futuresMarketsInfo = self.safe_list(futuresMarketsInfo, 0, [])
|
541
543
|
markets = self.array_concat(spotMarketsInfo, futuresMarketsInfo)
|
542
|
-
marginIds = self.publicGetConfPubListPairMargin(params)
|
543
544
|
marginIds = self.safe_value(marginIds, 0, [])
|
544
545
|
#
|
545
546
|
# [
|
ccxt/blofin.py
CHANGED
ccxt/btcturk.py
CHANGED
@@ -7,7 +7,7 @@ from ccxt.base.exchange import Exchange
|
|
7
7
|
from ccxt.abstract.btcturk import ImplicitAPI
|
8
8
|
import hashlib
|
9
9
|
import math
|
10
|
-
from ccxt.base.types import Balances, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
10
|
+
from ccxt.base.types import Balances, Bool, Int, Market, Num, Order, OrderBook, OrderSide, OrderType, Str, Strings, Ticker, Tickers, Trade
|
11
11
|
from typing import List
|
12
12
|
from ccxt.base.errors import ExchangeError
|
13
13
|
from ccxt.base.errors import BadRequest
|
@@ -621,7 +621,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
621
621
|
#
|
622
622
|
return self.parse_ohlcvs(response, market, timeframe, since, limit)
|
623
623
|
|
624
|
-
def parse_ohlcvs(self, ohlcvs, market=None, timeframe='1m', since: Int = None, limit: Int = None):
|
624
|
+
def parse_ohlcvs(self, ohlcvs, market=None, timeframe='1m', since: Int = None, limit: Int = None, tail: Bool = False):
|
625
625
|
results = []
|
626
626
|
timestamp = self.safe_value(ohlcvs, 't')
|
627
627
|
high = self.safe_value(ohlcvs, 'h')
|
@@ -640,7 +640,7 @@ class btcturk(Exchange, ImplicitAPI):
|
|
640
640
|
}
|
641
641
|
results.append(self.parse_ohlcv(ohlcv, market))
|
642
642
|
sorted = self.sort_by(results, 0)
|
643
|
-
return self.filter_by_since_limit(sorted, since, limit, 0)
|
643
|
+
return self.filter_by_since_limit(sorted, since, limit, 0, tail)
|
644
644
|
|
645
645
|
def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}):
|
646
646
|
"""
|
ccxt/bybit.py
CHANGED
@@ -5502,11 +5502,16 @@ class bybit(Exchange, ImplicitAPI):
|
|
5502
5502
|
:param str code: unified currency code, default is None
|
5503
5503
|
:param int [since]: timestamp in ms of the earliest ledger entry, default is None
|
5504
5504
|
:param int [limit]: max number of ledger entrys to return, default is None
|
5505
|
-
:param
|
5505
|
+
:param boolean [params.paginate]: default False, when True will automatically paginate by calling self endpoint multiple times. See in the docs all the [availble parameters](https://github.com/ccxt/ccxt/wiki/Manual#pagination-params)
|
5506
5506
|
:param str [params.subType]: if inverse will use v5/account/contract-transaction-log
|
5507
|
+
:param dict [params]: extra parameters specific to the exchange API endpoint
|
5507
5508
|
:returns dict: a `ledger structure <https://docs.ccxt.com/#/?id=ledger-structure>`
|
5508
5509
|
"""
|
5509
5510
|
self.load_markets()
|
5511
|
+
paginate = False
|
5512
|
+
paginate, params = self.handle_option_and_params(params, 'fetchLedger', 'paginate')
|
5513
|
+
if paginate:
|
5514
|
+
return self.fetch_paginated_call_cursor('fetchLedger', code, since, limit, params, 'nextPageCursor', 'cursor', None, 50)
|
5510
5515
|
request: dict = {
|
5511
5516
|
# 'coin': currency['id'],
|
5512
5517
|
# 'currency': currency['id'], # alias
|
@@ -5550,7 +5555,7 @@ class bybit(Exchange, ImplicitAPI):
|
|
5550
5555
|
else:
|
5551
5556
|
response = self.privateGetV5AccountTransactionLog(self.extend(request, params))
|
5552
5557
|
else:
|
5553
|
-
response = self.
|
5558
|
+
response = self.privateGetV5AccountContractTransactionLog(self.extend(request, params))
|
5554
5559
|
#
|
5555
5560
|
# {
|
5556
5561
|
# "ret_code": 0,
|
ccxt/gate.py
CHANGED
@@ -993,8 +993,9 @@ class gate(Exchange, ImplicitAPI):
|
|
993
993
|
return self.array_concat(markets, optionMarkets)
|
994
994
|
|
995
995
|
def fetch_spot_markets(self, params={}):
|
996
|
-
|
997
|
-
|
996
|
+
marginPromise = self.publicMarginGetCurrencyPairs(params)
|
997
|
+
spotMarketsPromise = self.publicSpotGetCurrencyPairs(params)
|
998
|
+
marginResponse, spotMarketsResponse = [marginPromise, spotMarketsPromise]
|
998
999
|
marginMarkets = self.index_by(marginResponse, 'id')
|
999
1000
|
#
|
1000
1001
|
# Spot
|
ccxt/gemini.py
CHANGED
@@ -813,8 +813,9 @@ class gemini(Exchange, ImplicitAPI):
|
|
813
813
|
return self.parse_ticker(response, market)
|
814
814
|
|
815
815
|
def fetch_ticker_v1_and_v2(self, symbol: str, params={}):
|
816
|
-
|
817
|
-
|
816
|
+
tickerPromiseA = self.fetch_ticker_v1(symbol, params)
|
817
|
+
tickerPromiseB = self.fetch_ticker_v2(symbol, params)
|
818
|
+
tickerA, tickerB = [tickerPromiseA, tickerPromiseB]
|
818
819
|
return self.deep_extend(tickerA, {
|
819
820
|
'open': tickerB['open'],
|
820
821
|
'high': tickerB['high'],
|