- Tool functions for portfolio lookup, token search, and transaction history
- A working agent using the OpenAI SDK that answers wallet questions
- Patterns for connecting Zerion data to any AI framework
Prerequisites
- A Zerion API key (get one here)
- Node.js 18+
- An OpenAI API key (for the agent example - you can adapt to any LLM)
Steps
Adapting to other frameworks
The tool functions work with any AI framework. Here’s how to connect them: Anthropic Claude (tool_use)Next steps
- Connect via MCP to give AI tools access to the full Zerion docs and API spec
- Add PnL tracking tools for cost basis and gain/loss analysis
- Use webhooks to push new transactions to your agent in real time
- Explore x402 for per-request stablecoin payments (no API keys needed)