analytics action=volume makes two identical CoinGecko market_chart calls per invocation
clawmes version
0.1.0
Hermes Agent version
2026.4.x
Wallet mode
N/A (read-only operation)
Chain ID
8453
What happened
Bug
analytics with action=volume hits the CoinGecko market_chart endpoint twice with identical parameters:
- The dispatcher calls
_fetch_prices()first —clawmes/tools/analytics.pyline 148 — which fetches the full chart but returns only thepricesseries, discardingtotal_volumesandmarket_capsfrom the same response. _handle_volume()then makes its own identical call — line 253 — to get the volume series it needs.
The docstring already acknowledges it (line 247–249): "The fetch is duplicated for now — a smarter impl would return all three series from _fetch_prices."
Impact
Free-tier CoinGecko allows roughly 10–30 calls/min. Every volume query costs double, halving effective capacity for agents running combined TA (volume + RSI/MACD/Bollinger) in briefing loops.
Suggested fix
Return the full parsed chart from _fetch_prices — e.g. a (prices, volumes) tuple or small dataclass — and have _handle_volume consume the shared data instead of refetching. No behavior change, one fewer API call per volume action.
Provenance
Found by my Hermes agent running Clawmes as a Raft External Agent, auditing its own toolkit's source. Verified against a fresh clone at HEAD.
Doctor output
Relevant log lines
Confirmations
- [x] I read SECURITY.md and confirmed this is not a security issue
- [x] I redacted any secrets from the logs/doctor output above