Spaces:
Sleeping
Sleeping
Update trade_analysis/agent.py
Browse files- trade_analysis/agent.py +3 -3
trade_analysis/agent.py
CHANGED
|
@@ -93,11 +93,11 @@ class TradingAgent:
|
|
| 93 |
await self.learn_from_trades()
|
| 94 |
|
| 95 |
# Rate limit friendly
|
| 96 |
-
await asyncio.sleep(
|
| 97 |
|
| 98 |
except Exception as e:
|
| 99 |
print(f"Agent error: {e}")
|
| 100 |
-
await asyncio.sleep(
|
| 101 |
|
| 102 |
async def scan_with_api(self):
|
| 103 |
"""Call your enhanced API for signals"""
|
|
@@ -343,7 +343,7 @@ async def run_agent_with_api():
|
|
| 343 |
|
| 344 |
# Print stats periodically
|
| 345 |
while True:
|
| 346 |
-
await asyncio.sleep(
|
| 347 |
stats = agent.get_stats()
|
| 348 |
print(f"\n📊 Agent Stats: {json.dumps(stats, indent=2)}\n")
|
| 349 |
|
|
|
|
| 93 |
await self.learn_from_trades()
|
| 94 |
|
| 95 |
# Rate limit friendly
|
| 96 |
+
await asyncio.sleep(900) # Check every minute
|
| 97 |
|
| 98 |
except Exception as e:
|
| 99 |
print(f"Agent error: {e}")
|
| 100 |
+
await asyncio.sleep(900)
|
| 101 |
|
| 102 |
async def scan_with_api(self):
|
| 103 |
"""Call your enhanced API for signals"""
|
|
|
|
| 343 |
|
| 344 |
# Print stats periodically
|
| 345 |
while True:
|
| 346 |
+
await asyncio.sleep(900) # Every 5 minutes
|
| 347 |
stats = agent.get_stats()
|
| 348 |
print(f"\n📊 Agent Stats: {json.dumps(stats, indent=2)}\n")
|
| 349 |
|