A Bun/TypeScript CLI for the post-relaunch Aftermath V2 Perpetuals API.
bun install
bun run src/index.ts --helpThe default API host is https://v2-preview.aftermath.finance. Override it
with:
bun run src/index.ts config set base-url https://example.after-math-host- 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
Native /api/perpetuals/* endpoints are preferred for account and advanced
order flows. CCXT endpoints remain in use where their exchange-style
build/sign/submit contract is the intended behavior. CCXT writes return
transactionBytes and signingDigest; sign signingDigest, then submit
transactionBytes with signatures[].
balance --account accepts an account capability/account object ID. Position
and pending-order commands use the numeric account number.