Practical skill for integrating Aftermath Perpetuals with native endpoints as the default (full feature set), plus CCXT-compatible endpoints and the TypeScript SDK.
Production OpenAPI: https://aftermath.finance/api/openapi/spec.json
Last validated: 2026-07-28
Production spec last hashed by the local change checker: 2026-07-28
Canonical docs UI: https://aftermath.finance/docs
Surface documented here:
aftermath-ts-sdk v3.1.0.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. For a route not listed in a focused file, check endpoint-inventory.md before guessing a path.
ccxt.mdnative.md../aftermath-ts-sdk/SKILL.md../aftermath-ts-sdk/references/backend-alignment.mdauthentication.mdgeneral-endpoints.mdendpoint-inventory.mderror-handling.mdsafety-and-risk.mddca-and-limit-orders.mdstaking.mdpools.mdprices.mdauxiliary-endpoints.mdmonitoring-patterns.mdgotchas.mdPreferred 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-ts-sdk) | Typed app integrations, transaction builders, and gRPC-backed protocol access | ../aftermath-ts-sdk/SKILL.md |
signingDigest, not transactionBytes.accountId (object ID) vs native accountId (numeric)."...n" wire format where required.gasBudget as MIST and distinguish service auth signatures from CCXT
transaction-digest signatures.Breaking (v3.0.0):
integratorAddress (address string) is replaced by integratorId (u32) everywhere, order-level builderCode.takerFee is now builderCode.integratorFee, config maxTakerFee is now maxIntegratorFee, and the integrator-vault fetch/create/claim routes are removed./api/perpetuals/ws/updates) via a marketCandles subscription; the dedicated /api/perpetuals/ws/market-candles/{market_id}/{interval_ms} route is removed.candle-history uses resolution (was intervalMs) and CCXT OHLCV uses timeframe. See native.md for the full enum.stopLossPrice and takeProfitPrice. Transaction inputs add optional triggerPriceType (0 index, 1 book mid, 2 mark) and per-SL/TP/stop-order builderCode; basic history responses contain only the prices.points response is { totalPoints } (float, was { points } integer) and /api/rewards/history now requires signed auth (bytes + signature); history entries carry eventType.makerFee/takerFee; vault totalCollateral/totalCollateralUsd; market params gasPriceTwapPeriodMs, forceCancelFee, gasPriceTakerFee, zScoreThreshold (replaced by priorityTakerFee); liquidation forceCancelFeesUsd. Price-feed IDs are numeric (u32) instead of address strings.Additive (v3.0.0):
/api/perpetuals/account/twap-order-datas plus create-twap-orders / edit-twap-orders / cancel-twap-orders transaction routes.clientOrderId(s) on limit/scale/cancel-and-place order placement, plus client-ID cancellation on supported transaction routes./api/perpetuals/vault/twap-order-datas plus create-twap-orders / edit-twap-orders / cancel-twap-orders vault transaction routes (mirrors the account TWAP surface).POST /api/rewards/expected-rewards returns forward-looking per-domain expected rewards for an epoch. The TypeScript SDK fixed this path in v2.2.1.POST /api/perpetuals/markets entries carry nullable static display metadata; displayName is omitted when unavailable.twapOrders alongside stop orders.Post-v3 service updates:
Aftermath Terms and Conditions; DCA/limit cancellation IDs are plain
orderObjectIds and gas sponsorship accepts optional gasBudget.POST /api/perpetuals/vaults/config returns the dynamic vault protocol
limits; send an empty JSON object {}. Do not hardcode lock, deposit, market,
or pending-order limits; see native.md and the SDK's getVaultsConfig()./api/perpetuals/vault/transactions/owner/grant-agent-wallet and
/api/perpetuals/vault/transactions/owner/revoke-agent-wallet.GET /api/perpetuals/config serves network-specific AFLP/official-vault and
default-collateral configuration.POST /api/pools/summary and POST /api/farms/summary batch and cache the
object/stat data used by the frontend.gasFromAddressBalance; deposit and withdraw support
fromAddressBalance and toAddressBalance respectively./api/rewards/expected-rewards; do not resurrect camelCase variants.2030–2033 (with 2018 as the
shared-service fallback); reusable-signature failures are 2034.sponsor.walletAddress, scheduled
execution gas is withdrawn from that gas pool and returned order gas is
deposited back into it. With no named sponsor, returned gas goes to the
account or vault owner.| File | Read when |
|---|---|
| ccxt.md | You need /api/ccxt/* endpoints or stream setup |
| native.md | You need /api/perpetuals/* account/market/vault APIs |
| authentication.md | You need reusable terms signatures, auth boundaries, or signed WebSocket subscriptions |
| general-endpoints.md | You need wallet, auth, Sui, user-data, stable-kitchen, DEX Screener, Binance, or config routes |
| endpoint-inventory.md | You need the complete operation/path audit for the current service snapshot |
| dca-and-limit-orders.md | You need DCA or spot limit-order reads and transaction builders |
| staking.md | You need staking metrics, positions, validators, or capabilities |
| pools.md | You need AMM pools, stats, LP ownership, volume, fees, or events |
| prices.md | You need coin, LP, or external-ID prices |
| auxiliary-endpoints.md | You need builder codes, gas pool, referrals, rewards, rebates, router, metastable, Birdeye, dynamic gas, zkLogin, coins, or utility transactions |
| ../aftermath-ts-sdk/SKILL.md | You are coding with aftermath-ts-sdk classes, types, transports, or gRPC |
| error-handling.md | You are implementing retry, backoff, and failure parsing |
| safety-and-risk.md | You are shipping a bot or live strategy safeguards |
| monitoring-patterns.md | You need polling, pagination, WebSocket, or resync examples |
| gotchas.md | You need a pre-launch pitfalls checklist |
Use the local helper script to check the production OpenAPI after the 24h window.
--force to bypass the 24-hour window; use --yes to query without an
interactive prompt in CI or another non-interactive environment. EOF on a
required prompt is an error rather than a successful no-op.skills/api/scripts/check_api_changes.pyLast validated, it exits without querying.Query ... for API changes now? [y/N].skills/api/.api-spec-state.json.Run:
python3 skills/api/scripts/check_api_changes.py
npx skills add AftermathFinance/aftermath-perpetuals下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer