Compare commits
1 Commits
feature/is
...
feature/is
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db0d966a6a |
@@ -76,10 +76,6 @@ class MarketScanner:
|
||||
if market.is_domestic:
|
||||
orderbook = await self.broker.get_orderbook(stock_code)
|
||||
else:
|
||||
# Rate limiting: Add 200ms delay for overseas API calls
|
||||
# to prevent hitting KIS API rate limit (EGW00201)
|
||||
await asyncio.sleep(0.2)
|
||||
|
||||
# For overseas, we need to adapt the price data structure
|
||||
price_data = await self.overseas_broker.get_overseas_price(
|
||||
market.exchange_code, stock_code
|
||||
|
||||
@@ -549,7 +549,9 @@ async def run(settings: Settings) -> None:
|
||||
except TimeoutError:
|
||||
pass # Normal — timeout means it's time for next cycle
|
||||
finally:
|
||||
# Clean up resources
|
||||
await broker.close()
|
||||
await telegram.close()
|
||||
db_conn.close()
|
||||
logger.info("The Ouroboros rests.")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user