# Onchain Analyst Agent with LLM API and Stablecoin Billing

> Markdown mirror of https://router.one/use-cases/onchain-analyst-agent for AI assistants and crawlers. Router One is an OpenAI-compatible LLM API gateway.
> Last updated: 2026-08-24

An onchain analyst agent turns raw wallet, protocol, and governance data into readable summaries. Router One is the LLM inference layer behind that agent: one OpenAI-compatible endpoint, smart routing, per-key budget caps, and request traces — with USDT/USDC top-ups for teams that fund AI usage from a stablecoin treasury. Your data provider supplies the chain data; Router One reasons over it.

## How an onchain analyst agent fits together

Router One does not fetch chain data. Pair it with a blockchain data provider — Moralis, The Graph, Dune, Alchemy, QuickNode, Etherscan, or your own indexer — and Router One handles the model call over the normalized data.

### Data layer

Your indexer or data API returns normalized wallet activity, token flows, and protocol metrics.

### Agent layer

Your service or framework decides what to fetch and when to call a model.

### LLM layer

Router One routes the prompt to a suitable model, applies budget caps, and records a per-request trace.

### Delivery layer

Summaries reach a dashboard, report, Telegram channel, or internal tool.

## What an onchain analyst agent can summarize

### Wallet activity

Explain transfers, swaps, approvals, and balance changes for a watched address in plain language.

### Protocol metrics

Turn TVL, volume, fee, and emission data into a short read for contributors or investors.

### Governance events

Summarize new proposals, voting outcomes, and treasury movements from your indexed data.

### Risk signals

Describe unusual flows, large unlocks, or concentration changes as research notes — not trading calls.

## Cost control and boundaries

### Agent-specific key with maxSpend

Give the analyst workload its own API key and set maxSpend on that key before it runs on a schedule.

### Request-level traces

Every model call records model, tokens, latency, status, and cost so agent spend stays visible.

### No chain data or execution

Router One does not index chains, hold keys, or send transactions. It returns model output only.

### Research, not advice

Frame outputs as research summaries. Your product owns disclaimers and any regulated workflow.

## Analyst agent call pattern

Fetch chain context from your data provider, then send the normalized context through Router One for analysis.

`onchain-analyst.ts`

```ts
// 1. Pull onchain data from your provider
const activity = await getWalletActivity(address);

// 2. Summarize it through Router One
const report = await client.chat.completions.create({
  model: "auto",
  messages: [{ role: "user", content: summarize(activity) }],
});

// 3. Deliver to a dashboard, report, or channel
```

## FAQ

### Does Router One fetch onchain data?

No. Router One is the LLM gateway. A blockchain data provider or your own indexer supplies the data; Router One reasons over it.

### Can I pay for the analyst agent with stablecoins?

Yes. Top up with USDT or USDC on supported networks; the value credits a USD wallet balance that the agent spends per token.

### Can the agent have its own budget?

Yes. Issue a separate API key per agent with a hard budget cap so a scheduled run cannot overspend.

### Does Router One store the prompts the agent sends?

No. Router One does not retain request or response bodies. It logs metadata for billing, routing, and observability.

### Can an onchain analyst agent give trading advice?

Router One is infrastructure and does not generate advice. Build the agent for research summaries and keep user-facing disclaimers in your product.

### Which models can the agent use?

Call GPT, Claude, Gemini, Grok, DeepSeek, GLM, and MiniMax through one OpenAI-compatible endpoint, or let smart routing pick.

## See also

- LLM API for Web3 AI agents: https://router.one/web3-ai-agents
- Stablecoin LLM billing: https://router.one/crypto-llm-api
- LLM API for DAO bots: https://router.one/use-cases/dao-community-bot
- Solidity with Claude Code: https://router.one/use-cases/solidity-claude-code
- Fund from a stablecoin treasury: https://router.one/pay-ai-api-with-crypto
- Canonical page: https://router.one/use-cases/onchain-analyst-agent
- Models and per-model token rates: https://router.one/models (markdown: https://router.one/models.md)
- Pricing: https://router.one/pricing
- API docs (markdown): https://router.one/docs.md
- Company facts: https://router.one/facts/company.md
