aftermath-perpetuals
SKILL.md
Aftermath Perpetuals Skill
Verified against OpenAPI: https://aftermath.finance/api/openapi/spec.json
Last validated: 2026-02-25
Canonical docs UI: https://aftermath.finance/docs
Fast Routing
Choose one file first; do not load everything by default.
Default preference: start with native perpetuals endpoints (/api/perpetuals/*) because they expose the full Aftermath feature set. Use CCXT endpoints when you specifically need exchange-style compatibility.
- CCXT endpoint work ->
ccxt.md - Native perpetuals endpoint work ->
native.md - SDK method usage ->
sdk-reference.md - API failures/retries ->
error-handling.md - Trading safeguards ->
safety-and-risk.md - Builder codes/referrals/rewards/coins utility routes ->
auxiliary-endpoints.md - Edge-case pitfalls ->
gotchas.md
Integration Modes
Preferred by default: Native perpetuals (/api/perpetuals/*) for complete API coverage.
| Mode | Best for | Primary file |
|---|---|---|
CCXT compatibility (/api/ccxt/*) |
Exchange-style payloads and build-sign-submit bots | ccxt.md |
Native perpetuals (/api/perpetuals/*) |
Full account/vault previews + tx builders | native.md |
TypeScript SDK (@aftermath-finance/sdk) |
Typed app integrations | sdk-reference.md |
High-Risk Guardrails
- Sign
signingDigest, nottransactionBytes. - Keep ID types strict: CCXT write
accountId(object ID) vs nativeaccountId(numeric). - Treat preview responses as success/error unions.
- Re-sync snapshots after stream reconnect before applying deltas.
- Serialize coin/gas-object-sensitive operations to avoid version conflicts.
Recent API Updates
- Native account/vault routes include
place-scale-orderandcancel-and-place-orderstransaction support. - Account history payloads use
orders(order history) andcollateralChanges(collateral history). - Margin history requests use
timeframe(1D | 1W | 1M | ALL) withaccountId. - Stop-order data requests support optional
marketIdsfiltering. - CCXT submit supports one-or-more
signatureswhen sender and gas owner differ.
Progressive Disclosure
| File | Read when |
|---|---|
ccxt.md |
You need /api/ccxt/* endpoints or stream setup |
native.md |
You need /api/perpetuals/* account/market/vault APIs |
auxiliary-endpoints.md |
You need builder-codes, referrals, rewards, coins, utility txs |
sdk-reference.md |
You are coding with SDK classes and methods |
error-handling.md |
You are implementing retry, backoff, and failure parsing |
safety-and-risk.md |
You are shipping a bot or live strategy safeguards |
gotchas.md |
You need a pre-launch pitfalls checklist |
24h Change Check
Use the local helper script to check for OpenAPI changes after the 24h window.
- Script:
skills/api/scripts/check_api_changes.py - Behavior: if less than 24h since
Last validated, it exits without querying. - If 24h+ elapsed, it prompts before querying:
Query ... for API changes now? [y/N]. - It never auto-updates skill markdown files; it only records spec hash state in
skills/api/.api-spec-state.json.
Run:
python3 skills/api/scripts/check_api_changes.py
Weekly Installs
4
Repository
aftermathfinance/skillsGitHub Stars
4
First Seen
13 days ago
Security Audits
Installed on
opencode4
github-copilot4
codex4
amp4
cline4
kimi-cli4