-
-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the DeFi Agents API documentation wiki. This comprehensive resource provides guides, tutorials, and examples for integrating 57 production-ready AI agents into your Web3, DeFi, and crypto applications.
A RESTful JSON API providing AI agent definitions for:
- Portfolio management and tracking
- Automated trading strategies
- DeFi yield optimization
- Smart contract security
- Risk assessment
- And more...
curl https://sperax.click/index.json
✅ 57 Specialized Agents - DeFi, portfolio, trading, Web3, education
✅ 18 Languages - Full internationalization support
✅ RESTful JSON API - Easy integration for any platform
✅ Machine-Readable - Structured data for AI systems
✅ Open Source - MIT licensed, fully transparent
✅ CDN Hosted - Fast global access via GitHub Pages
Portfolio management, trading bots, analytics, DeFi protocols, and governance tools.
Yield farming, risk assessment, security auditing, tokenomics, and education.
- Building crypto trading bots
- Creating DeFi dashboards
- Portfolio management apps
- Educational platforms
- Risk analysis tools
- Smart contract auditing assistants
New to DeFi Agents API? Start here:
- Getting Started Guide - Your first integration
- Agent Catalog - Browse all available agents
- Integration Examples - Copy-paste code samples
- GitHub Issues: Report bugs or request features
- Discussions: Join the community
- Contributing: Contribution guidelines
Built with ❤️ for the Web3 community
Learn how to integrate DeFi Agents into your application in under 5 minutes.
- Basic knowledge of REST APIs
- Familiarity with JSON
- Your preferred programming language (Python, JavaScript, etc.)
The DeFi Agents API provides agent definitions at:
https://sperax.click/index.jsonEach agent includes:
- Metadata: Name, description, category, tags
- Configuration: System prompts, opening messages
- Examples: Sample interactions
- Localization: Available in 18 languages
curl https://sperax.click/index.jsonimport requests
response = requests.get('https://sperax.click/index.json')
agents = response.json()
print(f"Found {len(agents)} agents")
for agent in agents[:3]:
print(f"- {agent['meta']['title']}: {agent['meta']['description']}")const response = await fetch('https://sperax.click/index.json');
const agents = await response.json();
console.log(`Found ${agents.length} agents`);
agents.slice(0, 3).forEach(agent => {
console.log(`- ${agent.meta.title}: ${agent.meta.description}`);
});# Python example
trading_agents = [a for a in agents if a['meta']['category'] == 'trading']
print(f"Found {len(trading_agents)} trading agents")// JavaScript example
const tradingAgents = agents.filter(a => a.meta.category === 'trading');
console.log(`Found ${tradingAgents.length} trading agents`);Fetch individual agents by ID:
curl https://sperax.click/sperax-dashboard.jsonagent = requests.get('https://sperax.click/sperax-dashboard.json').json()
print(agent['config']['systemRole'])Get agents in any supported language:
# Chinese
curl https://sperax.click/index.zh-CN.json
# Spanish
curl https://sperax.click/index.es-ES.json
# French
curl https://sperax.click/index.fr-FR.jsonSupported Languages: en-US, ar, bg-BG, zh-CN, zh-TW, de-DE, es-ES, fa-IR, fr-FR, it-IT, ja-JP, ko-KR, nl-NL, pl-PL, pt-BR, ru-RU, tr-TR, vi-VN
import requests
def get_agent_response(agent_id, user_message):
# Fetch agent definition
agent = requests.get(f'https://sperax.click/{agent_id}.json').json()
# Use the system role as context
system_role = agent['config']['systemRole']
# Send to your LLM (OpenAI, Claude, etc.)
# ... your LLM integration here ...
return response
# Example usage
response = get_agent_response('sperax-dashboard', 'Show my portfolio')
print(response)// Fetch and display agents
async function loadAgents() {
const agents = await fetch('https://sperax.click/index.json').then(r => r.json());
const container = document.getElementById('agents');
agents.forEach(agent => {
const card = `
<div class="agent-card">
<h3>${agent.meta.avatar} ${agent.meta.title}</h3>
<p>${agent.meta.description}</p>
<span class="category">${agent.meta.category}</span>
</div>
`;
container.innerHTML += card;
});
}
loadAgents();- Browse All Agents: Agent Catalog
- See More Examples: Integration Examples
- API Reference: Full API Documentation
- Get Help: FAQ
Let users choose which agent to interact with based on their needs.
Combine multiple agents for complex workflows (e.g., yield finder + risk assessor).
Show relevant agents based on user context (trading page → trading agents).
Need help? Open an issue on GitHub
Complete listing of all 57 DeFi Agents available via the API.
-
Sperax Portfolio Dashboard (
sperax-dashboard)- Portfolio overview with total value, allocation, and performance metrics
- Category:
portfolio - View JSON
-
Sperax Assets Tracker (
sperax-assets-tracker)- Asset tracking and analytics for portfolio positions
- Category:
portfolio - View JSON
-
Sperax Analytics Expert (
sperax-analytics-expert)- Performance analytics and insights for portfolio optimization
- Category:
portfolio - View JSON
-
Sperax Portfolio Tracker (
sperax-portfolio-tracker)- Advanced portfolio tracking and management
- Category:
portfolio - View JSON
-
Sperax Wallet Manager (
sperax-wallet-manager)- Wallet management and configuration assistance
- Category:
portfolio - View JSON
-
Sperax Trading Assistant (
sperax-trading-assistant)- Trade execution helper with market analysis
- Category:
trading - View JSON
-
Sperax AI Trading Bot (
sperax-ai-trading-bot)- AI-powered trading strategies and automation
- Category:
trading - View JSON
-
Sperax Signal Bot (
sperax-signal-bot)- Trading signals and market alerts
- Category:
trading - View JSON
-
Sperax DCA Bot (
sperax-dca-bot)- Dollar-cost averaging automation
- Category:
trading - View JSON
-
Sperax Arbitrage Bot (
sperax-arbitrage-bot)- Arbitrage opportunity detection and execution
- Category:
trading - View JSON
-
Sperax Pump Screener (
sperax-pump-screener)- Momentum screening and trend analysis
- Category:
trading - View JSON
-
Sperax DeFi Center (
sperax-defi-center)- DeFi protocol aggregator and explorer
- Category:
defi - View JSON
-
Sperax DeFi Protocols (
sperax-defi-protocols)- DeFi protocol information and comparison
- Category:
defi - View JSON
-
Sperax Yield Aggregator (
sperax-yield-aggregator)- Yield farming opportunities and strategies
- Category:
defi - View JSON
-
Sperax Liquidity Strategist (
sperax-liquidity-strategist)- Liquidity provision and optimization
- Category:
defi - View JSON
-
Sperax Bridge Assistant (
sperax-bridge-assistant)- Cross-chain bridge assistance and guidance
- Category:
defi - View JSON
-
Sperax Strategies Marketplace (
sperax-strategies-marketplace)- Trading strategy discovery and management
- Category:
trading - View JSON
-
Sperax Bot Templates (
sperax-bot-templates)- Bot template library and customization
- Category:
trading - View JSON
-
Sperax Settings Manager (
sperax-settings-manager)- Settings and configuration management
- Category:
portfolio - View JSON
-
Sperax Risk Monitor (
sperax-risk-monitor)- Risk monitoring and alerts for portfolios
- Category:
security - View JSON
-
Sperax Help Center (
sperax-help-center)- Help and documentation for Sperax ecosystem
- Category:
education - View JSON
-
Sperax Governance Guide (
sperax-governance-guide)- Governance participation and voting guidance
- Category:
education - View JSON
-
Sperax Onboarding Guide (
sperax-onboarding-guide)- Getting started guide for new users
- Category:
education - View JSON
-
USDs Stablecoin Expert (
usds-stablecoin-expert)- Sperax USDs stablecoin specialist
- Category:
defi - View JSON
-
SPA Tokenomics Analyst (
spa-tokenomics-analyst)- SPA token analysis and insights
- Category:
defi - View JSON
-
veSPA Optimizer (
vespa-optimizer)- veSPA lock optimization strategies
- Category:
defi - View JSON
-
DeFi Yield Farmer (
defi-yield-farmer) - Yield farming optimization -
Staking Rewards Calculator (
staking-rewards-calculator) - Staking ROI calculations -
Yield Sustainability Analyst (
yield-sustainability-analyst) - Yield risk assessment -
Yield Dashboard Builder (
yield-dashboard-builder) - Custom yield dashboards
-
Liquidation Risk Manager (
liquidation-risk-manager) - Liquidation monitoring -
DeFi Risk Scoring Engine (
defi-risk-scoring-engine) - Protocol risk scores -
DeFi Insurance Advisor (
defi-insurance-advisor) - Insurance recommendations -
Impermanent Loss Calculator (
impermanent-loss-calculator) - LP loss calculations
-
DEX Aggregator Optimizer (
dex-aggregator-optimizer) - Best DEX routing -
Gas Optimization Expert (
gas-optimization-expert) - Gas saving strategies -
MEV Protection Advisor (
mev-protection-advisor) - MEV protection guidance -
Airdrop Hunter (
airdrop-hunter) - Airdrop opportunities
-
Smart Contract Auditor (
smart-contract-auditor) - Contract security analysis -
Bridge Security Analyst (
bridge-security-analyst) - Bridge risk assessment -
Wallet Security Advisor (
wallet-security-advisor) - Wallet security best practices
-
Protocol Revenue Analyst (
protocol-revenue-analyst) - Protocol revenue analysis -
Protocol Treasury Analyst (
protocol-treasury-analyst) - Treasury management -
Governance Proposal Analyst (
governance-proposal-analyst) - DAO proposal analysis -
Narrative Trend Analyst (
narrative-trend-analyst) - Market narrative tracking -
Alpha Leak Detector (
alpha-leak-detector) - Early opportunity detection -
Whale Watcher (
whale-watcher) - Large holder tracking -
Token Unlock Tracker (
token-unlock-tracker) - Token vesting schedules
-
DeFi Onboarding Mentor (
defi-onboarding-mentor) - DeFi basics -
APY vs APR Educator (
apy-vs-apr-educator) - Yield concept explanation -
DeFi Protocol Comparator (
defi-protocol-comparator) - Protocol comparison -
Stablecoin Comparator (
stablecoin-comparator) - Stablecoin analysis -
Layer 2 Comparison Guide (
layer2-comparison-guide) - L2 solution guide
-
Portfolio Rebalancing Advisor (
portfolio-rebalancing-advisor) - Portfolio optimization -
Liquidity Pool Analyzer (
liquidity-pool-analyzer) - LP position analysis -
NFT Liquidity Advisor (
nft-liquidity-advisor) - NFT market liquidity -
Crypto Tax Strategist (
crypto-tax-strategist) - Tax optimization
Fetch any agent by ID:
curl https://sperax.click/{agent-id}.jsonOr get all agents at once:
curl https://sperax.click/index.jsonFilter by category in your code:
agents = requests.get('https://sperax.click/index.json').json()
trading_agents = [a for a in agents if a['meta']['category'] == 'trading']Categories: trading, portfolio, defi, security, education
Total: 57 agents | Languages: 18 | API Version: 1.0.0
## **Integration-Examples** (New Page)
# Integration Examples
Real-world code examples for integrating DeFi Agents API into your applications.
## Python Examples
### Example 1: Fetch and Display All Agents
```python
import requests
import json
def fetch_all_agents():
"""Fetch all agents from the API"""
response = requests.get('https://sperax.click/index.json')
agents = response.json()
print(f"Total agents: {len(agents)}\n")
for agent in agents:
print(f"🤖 {agent['meta']['title']}")
print(f" Description: {agent['meta']['description']}")
print(f" Category: {agent['meta']['category']}")
print(f" Tags: {', '.join(agent['meta']['tags'])}")
print()
if __name__ == '__main__':
fetch_all_agents()
import requests
def get_agents_by_category(category):
"""Get all agents in a specific category"""
agents = requests.get('https://sperax.click/index.json').json()
filtered = [a for a in agents if a['meta']['category'] == category]
print(f"Found {len(filtered)} {category} agents:\n")
for agent in filtered:
print(f"- {agent['meta']['title']}: {agent['identifier']}")
return filtered
# Usage
trading_agents = get_agents_by_category('trading')
portfolio_agents = get_agents_by_category('portfolio')
defi_agents = get_agents_by_category('defi')import requests
def search_agents_by_tag(tag):
"""Search agents that match a specific tag"""
agents = requests.get('https://sperax.click/index.json').json()
matches = [a for a in agents if tag.lower() in [t.lower() for t in a['meta']['tags']]]
print(f"Agents with tag '{tag}': {len(matches)}\n")
for agent in matches:
print(f"- {agent['meta']['title']}")
print(f" Tags: {', '.join(agent['meta']['tags'])}\n")
return matches
# Usage
yield_agents = search_agents_by_tag('yield')
security_agents = search_agents_by_tag('security')import requests
def get_agents_in_language(locale='en-US'):
"""Fetch agents in a specific language"""
if locale == 'en-US':
url = 'https://sperax.click/index.json'
else:
url = f'https://sperax.click/index.{locale}.json'
agents = requests.get(url).json()
print(f"Loaded {len(agents)} agents in {locale}\n")
# Show first agent as example
agent = agents[0]
print(f"Sample agent:")
print(f"Title: {agent['meta']['title']}")
print(f"Description: {agent['meta']['description']}")
return agents
# Usage
spanish_agents = get_agents_in_language('es-ES')
chinese_agents = get_agents_in_language('zh-CN')
french_agents = get_agents_in_language('fr-FR')import requests
import openai # or anthropic for Claude
def create_agent_chatbot(agent_id):
"""Create a chatbot using an agent's system role"""
# Fetch agent definition
agent = requests.get(f'https://sperax.click/{agent_id}.json').json()
system_role = agent['config']['systemRole']
opening_message = agent['config']['openingMessage']
# Initialize OpenAI client
client = openai.OpenAI()
def chat(user_message):
response = client.chat.completions.create(
model="gpt-4",
messages=[
{"role": "system", "content": system_role},
{"role": "user", "content": user_message}
]
)
return response.choices[0].message.content
# Start conversation
print(f"Agent: {opening_message}")
while True:
user_input = input("You: ")
if user_input.lower() in ['exit', 'quit']:
break
response = chat(user_input)
print(f"Agent: {response}\n")
# Usage
create_agent_chatbot('sperax-dashboard')const fetch = require('node-fetch');
async function fetchAllAgents() {
const response = await fetch('https://sperax.click/index.json');
const agents = await response.json();
console.log(`Total agents: ${agents.length}\n`);
agents.forEach(agent => {
console.log(`🤖 ${agent.meta.title}`);
console.log(` Description: ${agent.meta.description}`);
console.log(` Category: ${agent.meta.category}`);
console.log(` Tags: ${agent.meta.tags.join(', ')}\n`);
});
}
fetchAllAgents();import React, { useState, useEffect } from 'react';
function AgentCatalog() {
const [agents, setAgents] = useState([]);
const [filter, setFilter] = useState('all');
useEffect(() => {
fetch('https://sperax.click/index.json')
.then(res => res.json())
.then(data => setAgents(data));
}, []);
const filteredAgents = filter === 'all'
? agents
: agents.filter(a => a.meta.category === filter);
return (
<div>
<h1>DeFi Agents</h1>
<select onChange={e => setFilter(e.target.value)}>
<option value="all">All Categories</option>
<option value="trading">Trading</option>
<option value="portfolio">Portfolio</option>
<option value="defi">DeFi</option>
<option value="security">Security</option>
<option value="education">Education</option>
</select>
<div className="agent-grid">
{filteredAgents.map(agent => (
<div key={agent.identifier} className="agent-card">
<h3>{agent.meta.avatar} {agent.meta.title}</h3>
<p>{agent.meta.description}</p>
<span className="category">{agent.meta.category}</span>
<div className="tags">
{agent.meta.tags.map(tag => (
<span key={tag} className="tag">{tag}</span>
))}
</div>
</div>
))}
</div>
</div>
);
}
export default AgentCatalog;async function searchAgents(query) {
const agents = await fetch('https://sperax.click/index.json').then(r => r.json());
const results = agents.filter(agent => {
const searchableText = `
${agent.meta.title}
${agent.meta.description}
${agent.meta.tags.join(' ')}
`.toLowerCase();
return searchableText.includes(query.toLowerCase());
});
console.log(`Found ${results.length} agents matching "${query}"`);
return results;
}
// Usage
searchAgents('trading').then(results => console.log(results));
searchAgents('portfolio').then(results => console.log(results));const { Client, GatewayIntentBits } = require('discord.js');
const fetch = require('node-fetch');
const client = new Client({
intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages]
});
let agents = [];
// Load agents on startup
client.once('ready', async () => {
console.log('Bot is ready!');
agents = await fetch('https://sperax.click/index.json').then(r => r.json());
console.log(`Loaded ${agents.length} agents`);
});
client.on('messageCreate', async message => {
if (message.content === '!agents') {
const agentList = agents.map(a => `- ${a.meta.title}`).join('\n');
message.reply(`**Available Agents:**\n${agentList}`);
}
if (message.content.startsWith('!agent ')) {
const agentId = message.content.split(' ')[1];
const agent = agents.find(a => a.identifier === agentId);
if (agent) {
message.reply({
embeds: [{
title: `${agent.meta.avatar} ${agent.meta.title}`,
description: agent.meta.description,
fields: [
{ name: 'Category', value: agent.meta.category },
{ name: 'Tags', value: agent.meta.tags.join(', ') }
]
}]
});
} else {
message.reply('Agent not found!');
}
}
});
client.login('YOUR_BOT_TOKEN');interface AgentMeta {
title: string;
description: string;
avatar: string;
tags: string[];
category: 'trading' | 'portfolio' | 'defi' | 'security' | 'education';
}
interface AgentConfig {
systemRole: string;
openingMessage: string;
openingQuestions: string[];
}
interface Agent {
identifier: string;
author: string;
createdAt: string;
schemaVersion: number;
meta: AgentMeta;
config: AgentConfig;
summary: string;
homepage: string;
examples: Array<{ role: string; content: string }>;
}
async function fetchAgents(): Promise<Agent[]> {
const response = await fetch('https://sperax.click/index.json');
return response.json();
}
async function getAgentsByCategory(category: AgentMeta['category']): Promise<Agent[]> {
const agents = await fetchAgents();
return agents.filter(agent => agent.meta.category === category);
}
// Usage with type safety
const tradingAgents: Agent[] = await getAgentsByCategory('trading');#!/bin/bash
# Fetch all agents
echo "Fetching all agents..."
curl -s https://sperax.click/index.json | jq '.[] | "\(.meta.title) - \(.meta.description)"'
# Get specific agent
echo -e "\nFetching sperax-dashboard agent..."
curl -s https://sperax.click/sperax-dashboard.json | jq '.meta'
# Filter by category
echo -e "\nTrading agents:"
curl -s https://sperax.click/index.json | jq '.[] | select(.meta.category == "trading") | .meta.title'
# Count agents by category
echo -e "\nAgents by category:"
curl -s https://sperax.click/index.json | jq 'group_by(.meta.category) | map({category: .[0].meta.category, count: length})'- Browse the Agent Catalog for all available agents
- Check the API Documentation for full API reference
- Read the FAQ for common questions
Need help? Open an issue on GitHub
## **FAQ** (New Page)
# Frequently Asked Questions (FAQ)
Common questions about the DeFi Agents API.
## General Questions
### What is DeFi Agents API?
DeFi Agents API is a RESTful JSON API providing 57 production-ready AI agent definitions for DeFi, Web3, and cryptocurrency applications. Each agent includes system prompts, example interactions, and metadata optimized for integration with LLMs like ChatGPT, Claude, and Grok.
### Is it free to use?
Yes! DeFi Agents API is completely free and open source under the MIT license. There are no rate limits, API keys, or usage restrictions.
### What languages are supported?
All 57 agents are available in 18 languages:
- English (en-US)
- Arabic (ar)
- Bulgarian (bg-BG)
- Chinese Simplified (zh-CN)
- Chinese Traditional (zh-TW)
- German (de-DE)
- Spanish (es-ES)
- Persian (fa-IR)
- French (fr-FR)
- Italian (it-IT)
- Japanese (ja-JP)
- Korean (ko-KR)
- Dutch (nl-NL)
- Polish (pl-PL)
- Portuguese Brazilian (pt-BR)
- Russian (ru-RU)
- Turkish (tr-TR)
- Vietnamese (vi-VN)
### Do I need an API key?
No! All endpoints are publicly accessible without authentication.
## Technical Questions
### What's the base URL?
### How do I get all agents?
```bash
curl https://sperax.click/index.json
curl https://sperax.click/{agent-id}.jsonExample:
curl https://sperax.click/sperax-dashboard.jsoncurl https://sperax.click/index.{locale}.jsonExample for Chinese:
curl https://sperax.click/index.zh-CN.jsonAll endpoints return JSON. The main index returns an array of agent objects, while individual agent endpoints return a single agent object.
No rate limiting. The API is served via GitHub Pages CDN with unlimited bandwidth.
The API is updated whenever new agents are added or existing agents are modified. Check the CHANGELOG for version history.
Yes! We recommend caching responses for at least 1 hour to reduce redundant requests.
DeFi Agents work with any LLM that accepts system prompts, including:
- OpenAI (ChatGPT, GPT-4)
- Anthropic (Claude)
- Google (Gemini)
- xAI (Grok)
- Open source models (Llama, Mistral, etc.)
Yes! The agents are open source. You can:
- Fork the repository
- Modify agent definitions
- Build your own distribution
- Host on your own domain
See our Contributing Guide for instructions on submitting new agents.
Yes! The MIT license allows commercial use. No attribution required (but appreciated).
- Trading: Automated trading, signals, strategies
- Portfolio: Asset tracking, management, analytics
- DeFi: Protocols, yield farming, liquidity
- Security: Auditing, risk assessment, wallet security
- Education: Learning, onboarding, comparisons
- Sperax agents (23): Specialized for the Sperax ecosystem, including USDs stablecoin, SPA token, and SperaxOS platform
- General DeFi agents (34): Universal agents for any DeFi protocol or blockchain
No. Agents are definition files only—they provide system prompts and context for LLMs. Actual smart contract interaction depends on your implementation.
Agents contain static information from their creation date. For real-time data, integrate with blockchain APIs, price feeds, or other data sources.
- Full index: ~500 KB (all 57 agents)
- Localized index: ~500 KB
- Single agent: ~2-5 KB
No server-side filtering. Download the full index and filter client-side by category, tags, or any other criteria.
No! Pure JSON over HTTP. Use any HTTP client in any programming language.
Yes! Download the index once and cache it locally. All agent definitions are self-contained.
Open an issue on GitHub with:
- Description of the bug
- Steps to reproduce
- Expected vs actual behavior
Open a feature request on GitHub Issues or start a Discussion.
Served via GitHub Pages CDN with global edge locations. Typical response times:
- North America: 50-100ms
- Europe: 100-150ms
- Asia: 150-200ms
Yes! CORS is enabled for all origins. You can call the API from browser JavaScript.
Yes. GitHub Pages automatically serves gzip-compressed responses.
The API relies on GitHub Pages, which has 99.9%+ uptime SLA.
Schema version 1.0 (see schemaVersion field in each agent).
Minor additions may be made in backwards-compatible ways. Breaking changes will bump the major version and be announced in the CHANGELOG.
Full schema: speraxAgentSchema_v1.json
Core required fields:
-
identifier- Unique agent ID -
author- Creator name -
meta.title- Display name -
meta.description- Short description -
config.systemRole- System prompt
- Check this FAQ
- Browse the Getting Started Guide
- Read the API Documentation
- Open a GitHub Issue
- Start a Discussion
Yes! Contributions are welcome. See CONTRIBUTING.md.
Join the GitHub Discussions to connect with other users and developers.
Sponsorships are appreciated! See the Funding page.
Still have questions? Open an issue on GitHub