A plugin for Eliza that enables fetching wallet portfolio and position data using the Zerion API.
- Real-time wallet portfolio data
- Detailed token positions and balances
- Chain distribution analysis
- Portfolio value changes tracking
- Support for all EVM-compatible chains
- Natural language processing for wallet queries
npm install @elizaos/plugin-zerion
-
Get your API key from Zerion
-
Set up your environment variables:
ZERION_API_KEY=your_api_key
- Register the plugin in your Eliza configuration:
import { zerionPlugin } from "@elizaos/plugin-zerion";
// In your Eliza configuration
plugins: [
zerionPlugin,
// ... other plugins
];
The plugin responds to natural language queries about wallet data. Here are some examples:
"Show me the portfolio for 0x123...abc"
"What are the token positions in 0x456...def?"
"Get wallet holdings for 0x789...ghi"
Fetches comprehensive portfolio data for a wallet address, including:
- Total portfolio value
- Chain distribution
- Position type distribution
- 24h value changes
// Example response format
{
totalValue: number;
chainDistribution: Record<string, number>;
positionTypes: Record<string, number>;
changes: {
absolute_1d: number;
percent_1d: number;
};
}
Fetches detailed information about all token positions in a wallet:
- Token name and symbol
- Quantity and current value
- Price and 24h change
- Chain information
- Verification status
// Example response format
{
positions: Array<{
name: string;
symbol: string;
quantity: number;
value: number;
price: number;
chain: string;
change24h: number | null;
verified: boolean;
}>;
totalValue: number;
}
Variable | Description | Required |
---|---|---|
ZERION_API_KEY | Your Zerion API key | Yes |
For support, please open an issue in the repository or reach out to the maintainers. telegram: @singhal_pranav