A skill that lets LLM agents trade on Aftermath V2 perpetuals through the native API. Install it into Claude Code, Cursor, Codex, or any agent that supports skills, then interact in natural language.
"What's the funding rate on BTC right now?"
"Place a limit buy for 0.01 BTC at $50 under the current mid."
"Show me all open positions and their PnL."
git clone https://github.com/clawd-aftermath/api-llm-trader.git
cd api-llm-trader
pip install -r requirements.txtThen copy/symlink to your agent's skill directory:
ln -s "$(pwd)" ~/.claude/skills/api-llm-trader./aftermath-configOr set environment variables:
export AFTERMATH_PRIVATE_KEY=suiprivkey1...
export AFTERMATH_WALLET_ADDRESS=0x...
export AFTERMATH_ACCOUNT_ID=123| Script | Role |
|---|---|
scripts/query.py |
Market data, account reads |
scripts/trade.py |
Signed writes (orders, leverage, deposits) |
scripts/paper.py |
Local paper trading simulation |
All emit JSON. Errors are {"error": "..."}.
- Orderbooks, candles, funding rates, market metadata
- Paper trading against live orderbooks
- Account positions, open orders, order history
- Limit/market orders, cancel, cancel-and-place (atomic)
- Leverage, deposit/withdraw USDC collateral
See SKILL.md for the full command reference.
- Reads: Native Aftermath API (
/api/perpetuals/*), with no CCXT dependency for core market/account reads - Writes: Native transaction builders → Sui Ed25519 signing → Sui JSON-RPC submission
- No SDK vendoring: Pure HTTP via
requests+PyNaClfor signing
- Site: https://v2-preview.aftermath.finance
- Swagger: https://v2-preview.aftermath.finance/docs
- OpenAPI: https://v2-preview.aftermath.finance/api/openapi/spec.json
- Canonical skills: https://github.com/AftermathFinance/skills
MIT — see LICENSE. Review DISCLAIMER.md before using a funded account.
Forked from elliottech/lighter-agent-kit. See ATTRIBUTION.md.