This page is a condensed, single-file reference for the REST calldata API.
For full documentation with per-language tabs and step-by-step walkthroughs,
see the API Calldata Integration
guide.
Using a skill-aware tool? The same content is exposed as the
amplify-earn-api-calldata Agent Skill and is auto-discovered at
/.well-known/agent-skills/index.json.
Prefer the skill in agents that support them — it loads progressively. Use
this page when you need to paste a single reference into a general-purpose
AI chat.When to Use
- Backend transaction builders in any language (Python, Go, Rust, Java, Node)
- Custodial wallets, HSMs, multisig services — fetch calldata, sign elsewhere
- Non-JS stacks that can’t consume
@paxoslabs/amplify-sdk - Prototyping with
curlbefore application code
Base URL & Authentication
- Obtain a key at https://app.paxoslabs.com.
- Send the key as a header — never as a query param (it ends up in access logs).
OpenAPI Spec
Endpoint Map
Transaction preparation
Discovery
Order status
Analytics
Display helpers
On-
/v2/amplify/vaults (no dedicated endpoint needed): depositSupplyCap, minimumWithdrawalOrderSize, assets[].depositFees, assets[].withdrawFees, assets[].withdrawalSLAs.
Response Format (calldata endpoints only)
/v2/amplify/deposit, /v2/amplify/withdraw, and /v2/amplify/withdraw/cancel accept a responseFormat query parameter:
Filter Syntax (filter query parameter)
- URL-encode once:
%3D==,%20= space. - Separate query params (
chainId=1&inDeprecation=false) are ignored.
Discovery — GET /v2/amplify/vaults
Single aggregated endpoint. Params (all optional): filter (flags: name, chainId, inDeprecation, requiresKyt), pageSize (1–100, default 25), pageToken.
Field → Transaction Parameter Mapping
Deposit Flow
Three authorization branches handled by one API:Step 1 — Detect authorization
GET /v2/core/authorization
Response variants:
Step 2 — Satisfy authorization
Step 3 — Prepare deposit calldata
GET /v2/amplify/deposit
Response (encoded):
Step 4 — Sign & broadcast
Send{ to, data, value }. value is always "0" for ERC-20 deposits.
Reference implementation (Node / viem)
Withdrawal Flow
Queued withdrawals are asynchronous: submitting an order locks shares in theWithdrawQueue; the protocol processes the queue off-cycle and transfers the asset on completion. Callers eligible for an atomic withdrawal (see Step 2) settle synchronously — the withdrawal completes when the prepared transaction confirms, so the approval and polling steps below do not apply to them.
Branch on the prepared transaction’s function: call Step 2 with responseFormat=full and read transaction.functionName. bulkWithdraw (atomic withdrawal) → skip Step 1 and Step 4; submitOrder / submitOrderAndProcessAll (queued order) → follow all steps.
Step 1 — Approve share spending (queued withdrawals only)
Skip whenfunctionName is bulkWithdraw — atomic withdrawals involve no share allowance. Otherwise, standard ERC-20 approve(spender, amount):
- Token contract (
to):boringVaultAddress spender:withdrawQueueAddressamount: share amount to redeem (always 18 decimals)
Step 2 — Prepare withdrawal calldata
GET /v2/amplify/withdraw
The server selects the withdrawal mode automatically for each caller and account — there is no client-side
atomic or bulk flag. Atomic withdrawals return functionName: 'bulkWithdraw' (instant settlement, no queue order, no share approval, server-computed minimum-output floor at the current rate); all other callers receive a queued order — submitOrderAndProcessAll when the account settles orders in the same transaction, otherwise submitOrder.
Response:
Step 3 — Sign & submit
Broadcast. For queued orders (submitOrder / submitOrderAndProcessAll), confirmation locks shares under a new orderIndex. For atomic withdrawals (bulkWithdraw), confirmation is settlement — the wantAsset is paid out in this transaction and no orderIndex exists.
Step 4 — Poll order status (queued withdrawals only)
An atomic withdrawal never creates an order, so nothing will appear here — treat transaction confirmation as completion.
Do not filter on
status=PENDING while polling — orders disappear the moment they reach a terminal state and you lose visibility into the outcome. Filter on userAddress + vaultAddress (and optionally chainId).
Reference implementation (Node / viem)
Cancellation Flow
OnlyPENDING orders are cancellable. The wallet submitting the cancel tx must be the same address that submitted the original order (msg.sender enforced on-chain).
Step 1 — Find orderIndex
orderIndex is a decimal string — pass it verbatim; never coerce to a JS number.
Step 2 — Prepare cancel calldata
GET /v2/amplify/withdraw/cancel
Response:
Step 3 — Sign & broadcast
Send from the same wallet that submitted the order. On confirmation, locked shares return to that wallet.Display Helpers (read-only)
Most display data is returned inline on/v2/amplify/vaults (see Discovery above). Three dedicated helpers cover what isn’t on the discovery response: fee preview for a specific redemption, up-to-the-block supply-cap utilization, and a user’s current position.
Fields already on
/v2/amplify/vaults (no dedicated endpoint):
Client caching of 10–30s is safe; invalidate after any of the caller’s own deposits, withdrawals, or cancellations.
Error Envelope
Retries:
429 and 503 are safe. 400, 401, 403, 404 are deterministic — do not retry without changing inputs.
Common Gotchas
Supported Chains
Canonical Docs
- Overview: https://docs.paxoslabs.com/v1.0.0/intro/products/earn/developers/guides/api-calldata/index
- Authentication: https://docs.paxoslabs.com/v1.0.0/intro/products/earn/developers/guides/api-calldata/authentication
- Discovery: https://docs.paxoslabs.com/v1.0.0/intro/products/earn/developers/guides/api-calldata/discovery
- Deposits: https://docs.paxoslabs.com/v1.0.0/intro/products/earn/developers/guides/api-calldata/deposits
- Withdrawals: https://docs.paxoslabs.com/v1.0.0/intro/products/earn/developers/guides/api-calldata/withdrawals
- Cancellations: https://docs.paxoslabs.com/v1.0.0/intro/products/earn/developers/guides/api-calldata/cancellations
- Display helpers: https://docs.paxoslabs.com/v1.0.0/intro/products/earn/developers/guides/api-calldata/display-helpers/index
- OpenAPI spec: https://docs.paxoslabs.com/v1.0.0/api-reference/openapi.yml
- Agent Skill: https://docs.paxoslabs.com/.well-known/agent-skills/index.json