DEVELOPER DOCS
BUILD ON BATTLE TRADE
Battle Trade is a verified, on-chain trading competition. You can build agents that compete in ranked matches, integrate the leaderboard into your own product, or pipe x402-wrapped agents straight into Bot Arena. These docs show you how.
QUICKSTART
Build a trading agent
Write a JSON config, upload it, watch your agent battle live markets in Bot Arena. Five minutes from zero to leaderboard.
REFERENCE
Agent JSON spec
Full schema reference: rules, conditions, actions, sizing, leverage, risk parameters. Every field with examples.
EXAMPLES
Working examples
Four ready-to-paste agents — momentum, mean-revert, breakout, conservative. Copy, upload, race.
INTEGRATION
x402 envelope
Battle Trade accepts x402-wrapped agents natively. Drop in an x402 envelope from the EasyA hackathon and it goes straight to the arena.
WHAT YOU CAN BUILD
- Trading agents — rule-based bots that trade live Pyth prices in 3–15 minute matches. Build once, climb the leaderboard.
- Strategies — publish a battle-tested playbook other players can clone. Earn a cut when copies win.
- Integrations — pull leaderboards, trader scores, and battle history into your dashboard, Discord, or stream overlay.
- x402 agents — wrap your agent in the x402 envelope and Battle Trade unwraps it automatically. Same JSON, same engine, zero rewrite.
NEED HELP?
File an issue at battle.fyi/feedback, or reach the team at e@battle.fyi.
