API Reference
Programmatic access to ChainWard. All endpoints require authentication.
Authentication
Base URL: https://api.chainward.ai
All API endpoints accept two authentication methods:
API Key (recommended)
Generate an API key in Settings. Keys use the ag_ prefix and are shown only once at creation.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/agents
Session Cookie
When signed in via the dashboard, a chainward-session JWT cookie is set automatically. Browser requests include this cookie by default.
TypeScript SDK
Install the SDK for typed access to all endpoints:
npm install @chainward/sdk
import { ChainWard } from '@chainward/sdk';
const cw = new ChainWard({ apiKey: 'ag_YOUR_KEY' });
// Register an agent
await cw.agents.register({ chain: 'base', wallet: '0x...' });
// List transactions
const txs = await cw.transactions.list({ limit: 50 });
// Create an alert
await cw.alerts.create({
wallet: '0x...',
type: 'large_transfer',
threshold: 1000,
channels: ['discord'],
discordWebhook: 'https://discord.com/api/webhooks/...',
});Endpoints
Agents
/api/agentsList all your monitored agents.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/agents
{
"success": true,
"data": [
{
"id": 1,
"walletAddress": "0x3cAc...",
"chain": "base",
"agentName": "My Trading Bot",
"agentFramework": "agentkit",
"createdAt": "2026-03-01T00:00:00Z"
}
]
}/api/agents/:idGet details for a specific agent.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/agents/1
/api/agentsRegister a new wallet address to monitor.
curl -X POST \
-H "Authorization: Bearer ag_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"walletAddress":"0x...","chain":"base","agentName":"My Bot"}' \
https://api.chainward.ai/api/agents{
"success": true,
"data": {
"id": 1,
"walletAddress": "0x...",
"chain": "base",
"agentName": "My Bot"
}
}/api/agents/:idUpdate agent name, framework, or tags.
curl -X PATCH \
-H "Authorization: Bearer ag_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"agentName":"Renamed Bot","tags":["production"]}' \
https://api.chainward.ai/api/agents/1/api/agents/:idRemove an agent and stop monitoring its wallet.
curl -X DELETE \ -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/agents/1
Transactions
/api/transactionsList transactions across your agents. Supports filtering and pagination.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ "https://api.chainward.ai/api/transactions?wallet=0x...&limit=50&offset=0"
{
"success": true,
"data": [...],
"pagination": { "total": 142, "limit": 50, "offset": 0, "hasMore": true }
}/api/transactions/statsTransaction volume over time, bucketed by interval.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ "https://api.chainward.ai/api/transactions/stats?wallet=0x...&bucket=1h"
Alerts
/api/alertsList all alert configurations.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/alerts
{
"success": true,
"data": [
{
"id": 1,
"walletAddress": "0x...",
"chain": "base",
"alertType": "large_transfer",
"thresholdValue": "1000",
"thresholdUnit": "usd",
"channels": ["discord"],
"enabled": true
}
]
}/api/alertsCreate a new alert. Types: large_transfer, balance_drop, gas_spike, failed_tx, inactivity, new_contract.
curl -X POST \
-H "Authorization: Bearer ag_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"walletAddress":"0x...","chain":"base","alertType":"large_transfer","thresholdValue":"1000","thresholdUnit":"usd","channels":["discord"],"discordWebhook":"https://discord.com/api/webhooks/..."}' \
https://api.chainward.ai/api/alerts/api/alerts/:idUpdate an alert configuration (threshold, channels, enabled state).
curl -X PATCH \
-H "Authorization: Bearer ag_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"thresholdValue":"500","enabled":false}' \
https://api.chainward.ai/api/alerts/1/api/alerts/:idDelete an alert configuration.
curl -X DELETE \ -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/alerts/1
/api/alerts/:id/testSend a test alert to verify your delivery channels. Rate limited to 5/min.
curl -X POST \ -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/alerts/1/test
/api/alerts/eventsList alert event history with delivery status.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ "https://api.chainward.ai/api/alerts/events?limit=20&offset=0"
Data
/api/stats/overviewFleet-wide stats: total agents, transactions, gas spend, balance.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/stats/overview
/api/stats/agents/:idPer-agent stats: transaction count, gas, balance, last activity.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/stats/agents/1
/api/balances/latestLatest balance snapshot for each agent.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/balances/latest
/api/balances/historyHistorical balance data for charting. Params: wallet, from, to, bucket (1h or 1d).
curl -H "Authorization: Bearer ag_YOUR_KEY" \ "https://api.chainward.ai/api/balances/history?wallet=0x...&bucket=1h"
/api/gas/analyticsGas spend analytics over time. Params: wallet, from, to, bucket.
curl -H "Authorization: Bearer ag_YOUR_KEY" \ https://api.chainward.ai/api/gas/analytics
Rate limits
API requests are rate-limited to 100 requests per minute per session. Rate limit headers are included in all responses.