TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #401 · 15 дек.

Функция asyncio.wait() это еще один способ вызвать множество асинхронных задач. Она работает в нескольких режимах. 1. Самый простой - ждем завершения всех задач async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(10)] done, pending = await asyncio.wait( tasks, return_when=asyncio.ALL_COMPLETED ) for task in done: try: print(task.result()) except Exception as e: print(e) Очень похоже на gather, но работает не так. ▫️возвращает не результаты, а два сета с объектами Task у которых можно забрать результат через task.result() если они в списке done ▫️не гарантирует порядок результатов так как оба объекта это set ▫️не выбрасывает исключение когда оно появляется, а сохраняет его в Task. Исключение появится когда попробуете забрать резултьтат. 2. Ждем завершения первой задачи, даже если там ошибка. async def main(): tasks = [asyncio.create_task(do_it(i)) for i in range(3)] done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_COMPLETED ) # в done может быть несколько задач! for task in done: try: print(task.result()) except Exception as e: print(f"Fail: {e}") # Оставшиеся задачи в pending, как правило, нужно отменить, иначе они будут продолжать работать for task in pending: task.cancel() В сете done будут таски которые успели завершится, причем как успешно так и нет. 3. До первой ошибки. Тоже самое, но с аргументом FIRST_EXCEPTION done, pending = await asyncio.wait( tasks, return_when=asyncio.FIRST_EXCEPTION ) Функция завершается как только первая задача упадет с ошибкой. Учтите, что в любом случае done вы можете обранужить несколько задач, как с ошибками так и успешные. ↗️ Полный листинг примеров здесь #async

Hashtags

Резултати

Пронајдени 4 слични објави

Пребарај: #openinterest

当前筛选 #openinterest清除筛选
Crypto M - Crypto News

@CryptoM · Post #64765 · 09.04.2026 г., 20:19

🚀 Bitcoin and Ethereum Futures Open Interest Surge Amid Improved Macro Sentiment Bitcoin and Ethereum perpetual futures have seen a significant increase in open interest, rising by $2.1 billion and $2.2 billion respectively over the past 24 hours. According to NS3.AI, CoinGlass data indicates that Bitcoin's open interest has reached its highest level in over two months, while Ethereum's open interest is at its peak for approximately three weeks. CryptoQuant attributes this positioning build to an improved macroeconomic sentiment following a conditional ceasefire agreement between the U.S. and Iran. #Bitcoin#Ethereum#Futures#OpenInterest#Crypto#MacroSentiment#USIran#CryptoTrading#BTC#ETH

Venture Village Wall 🦄

@venturevillagewall · Post #4316 · 05.03.2025 г., 22:00

U.S. Releases Seized Crypto Mining Machines U.S. authorities begin releasing seized Chinese-made cryptocurrency mining machines, totaling up to 10,000 units at various ports. Synteq Digital's CEO notes resistance from some CBP officials towards Bitcoin mining, hindering the industry's growth. 🔗Read more In related news, BioNexus Gene Lab approves Ethereum as its treasury asset; Bitcoin open interest reaches lowest since August; and Bitwise files for Aptos ETF. 🔗BioNexus News 🔗Bitcoin Open Interest 🔗Bitwise Filing #Crypto#Bitcoin#Ethereum#Mining#BioNexus#Aptos#ETF#VC#Blockchain#Finance#Investment#DeFi#Securities#Regulation#Innovation#MarketTrends#OpenInterest#USeconomy

Crypto M - Crypto News

@CryptoM · Post #64702 · 09.04.2026 г., 15:05

🚀 Bitcoin Call Options Surge with $80,000 Strike Price Bitcoin call options with an $80,000 exercise price for the end-of-June expiry have reached over $1.6 billion in notional open interest, marking the largest concentration among strike prices. According to NS3.AI, this development reflects traders' anticipation of significant price movements, as evidenced by the rise in implied volatility. #Bitcoin#CallOptions#StrikePrice#OpenInterest#Volatility#Cryptocurrency#Trading#BitcoinOptions#BTC

Crypto M - Crypto News

@CryptoM · Post #65139 · 11.04.2026 г., 11:24

🚀 Bitcoin Futures Open Interest Hits 14-Month Low Amid Institutional Strategy Shift On April 11, the open interest in Chicago Mercantile Exchange (CME) Bitcoin futures fell to $8.41 billion, marking its lowest level in 14 months. According to BlockBeats, Glassnode analysts attribute this decline primarily to the unwinding of basis trades. Previously, this strategy involved establishing long positions through spot ETFs and hedging with short futures to earn the spread. However, the annualized returns have recently dropped from 15%-20% to around 5%, prompting institutions to take profits. Additionally, the daily trading volume of CME Bitcoin futures has decreased to below $3 billion. Analysts suggest that as institutional demand shifts towards directly holding spot assets, the leverage in the futures market is significantly decreasing. #BitcoinFutures#OpenInterest#CME#BasisTrades#InstitutionalStrategy#SpotETFs#FuturesMarket#Leverage#TradingVolume#BlockBeats#Glassnode#CryptoMarket#BTC