feat: add catlog command, agent flag reorder, and TUI polish
- Add `coinhunter catlog` with limit/offset pagination for audit logs - Optimize audit log reading with deque to avoid loading all history - Allow `-a/--agent` flag after subcommands - Fix upgrade spinner artifact and empty line issues - Render audit log TUI as timeline with low-saturation event colors - Convert audit timestamps to local timezone in TUI - Remove futures-related capabilities - Add conda environment.yml for development - Bump version to 2.0.9 and update README Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -28,9 +28,30 @@ class FakeSpotClient:
|
||||
|
||||
def ticker_24h(self, symbols=None):
|
||||
rows = [
|
||||
{"symbol": "BTCUSDT", "lastPrice": "60000", "priceChangePercent": "4.5", "quoteVolume": "10000000", "highPrice": "61000", "lowPrice": "58000"},
|
||||
{"symbol": "ETHUSDT", "lastPrice": "3000", "priceChangePercent": "3.0", "quoteVolume": "8000000", "highPrice": "3050", "lowPrice": "2900"},
|
||||
{"symbol": "DOGEUSDT", "lastPrice": "0.1", "priceChangePercent": "1.0", "quoteVolume": "200", "highPrice": "0.11", "lowPrice": "0.09"},
|
||||
{
|
||||
"symbol": "BTCUSDT",
|
||||
"lastPrice": "60000",
|
||||
"priceChangePercent": "4.5",
|
||||
"quoteVolume": "10000000",
|
||||
"highPrice": "61000",
|
||||
"lowPrice": "58000",
|
||||
},
|
||||
{
|
||||
"symbol": "ETHUSDT",
|
||||
"lastPrice": "3000",
|
||||
"priceChangePercent": "3.0",
|
||||
"quoteVolume": "8000000",
|
||||
"highPrice": "3050",
|
||||
"lowPrice": "2900",
|
||||
},
|
||||
{
|
||||
"symbol": "DOGEUSDT",
|
||||
"lastPrice": "0.1",
|
||||
"priceChangePercent": "1.0",
|
||||
"quoteVolume": "200",
|
||||
"highPrice": "0.11",
|
||||
"lowPrice": "0.09",
|
||||
},
|
||||
]
|
||||
if not symbols:
|
||||
return rows
|
||||
@@ -38,7 +59,13 @@ class FakeSpotClient:
|
||||
return [row for row in rows if row["symbol"] in wanted]
|
||||
|
||||
def exchange_info(self):
|
||||
return {"symbols": [{"symbol": "BTCUSDT", "status": "TRADING"}, {"symbol": "ETHUSDT", "status": "TRADING"}, {"symbol": "DOGEUSDT", "status": "BREAK"}]}
|
||||
return {
|
||||
"symbols": [
|
||||
{"symbol": "BTCUSDT", "status": "TRADING"},
|
||||
{"symbol": "ETHUSDT", "status": "TRADING"},
|
||||
{"symbol": "DOGEUSDT", "status": "BREAK"},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
class AccountMarketServicesTestCase(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user