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

Резултати

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

Пребарај: #profittaking

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

@CryptoM · Post #65211 · 12.04.2026 г., 02:14

🚀 Crypto Whale Adjusts Stop-Loss to Secure Profits On April 12, a prominent crypto trader known as 'Set 10 Big Goals' (@Jason60704294) announced adjustments to their stop-loss positions to prevent targeted liquidation. According to BlockBeats, the trader has already secured profits from their current short positions. Previously, it was reported that the trader held a short position of 2,567.49 BTC with an entry price of $71,554.61, and a short position of 38,465.22 ETH with an entry price of $2,248.74. #Crypto#Bitcoin#Ethereum#Trading#StopLoss#ProfitTaking#CryptoWhale#BTC#ETH

Venture Village Wall 🦄

@venturevillagewall · Post #3996 · 27.01.2025 г., 07:00

Bitcoin Dips Below $100,000 🚨 55,375 #ETH ($171.7M) transferred between unknown wallets, per Whale Alert. Bitcoin's price drops under $100K, causing a market decline over 5% and liquidations reaching $610M. Analysts note profit-taking following regulatory developments regarding Donald Trump. More details: News. #ETH#Bitcoin#Crypto#Market#Whales#Regulation#ProfitTaking#Liquidations#BearMarket#Analysis#News#Blockchain#Finance#Investing#Trading#Tech#Investors#Volatility#Trends#VC

Crypto M - Crypto News

@CryptoM · Post #64554 · 09.04.2026 г., 07:45

🚀 Abraxas Capital's Oil Short Positions Recover Following Ceasefire Announcement On April 9, Hyperinsight reported significant financial recovery for Abraxas Capital, a major oil short institution on the Hyperliquid platform. According to BlockBeats, the recovery occurred within a week following the announcement of a ceasefire, with funds rebounding by over $12 million. The combination of oil shorts and crypto longs, which previously faced a floating loss of $9.7 million, has now turned profitable. As of the latest update, the two addresses continue to synchronize profit-taking and position reduction, maintaining a floating profit of $8.7 million. Following the recent reduction in positions, the total holding size remains at $152 million. This includes approximately $126 million in short positions on U.S. and Brent crude oil, and $26.1 million in long positions in the crypto market. Details of the oil short positions are as follows: Brent Oil shorts (5x leverage) have decreased from $92 million to $78 million, with an average price of around $96. WTI Crude shorts (5x leverage) have reduced from $51 million to $48.5 million, with an average price of approximately $95. Addresses involved are 0x5b5d51203a0f9079f8aeb098a6523a13F298C060 and 0xb83de012dba672c76a7dbbbf3e459cb59d7d6e36. #AbraxasCapital#OilShortPositions#CeasefireAnnouncement#FinancialRecovery#Hyperinsight#BlockBeats#CryptoLongs#ProfitTaking#WTICrude#BrentOil#OilMarket#LeverageTrading#PositionReduction#FloatingProfit#CryptoMarket#U.S.Crude