> ## Documentation Index
> Fetch the complete documentation index at: https://developers.paxoslabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Calldata Integration

> Use REST endpoints to get ready-to-sign transaction calldata for deposits, withdrawals, and cancellations

The API Calldata path lets you prepare Amplify transactions with plain HTTP requests. The server handles ABI encoding, address resolution, and contract selection — you get back a transaction object ready to sign and broadcast from any language or platform.

<Info>
  This path is ideal when you want server-side calldata generation without
  managing ABIs or contract addresses locally. For a TypeScript SDK with
  built-in wallet integrations, see the [SDK
  path](/v1.0.0/intro/products/earn/developers/guides/index). For full control
  over contract calls, see [Direct Contract
  Integration](/v1.0.0/intro/products/earn/developers/guides/direct-contract/index).
</Info>

<Info>
  **Using an AI coding assistant?** Paste the [Calldata AI
  Reference](/v1.0.0/intro/products/earn/developers/api-calldata-ai-reference)
  into Cursor, Copilot, or Claude for a condensed single-page reference.
  Skill-aware tools (Claude Code, Cursor, Windsurf) auto-discover the
  `amplify-earn-api-calldata` Agent Skill at
  [`/.well-known/agent-skills/index.json`](https://docs.paxoslabs.com/.well-known/agent-skills/index.json).
</Info>

## When to Use This Path

* **Server-side transaction builders** — construct deposit/withdraw transactions from a backend in any language
* **Custodial wallets and multisig services** — fetch calldata via API, then route to your signing infrastructure
* **Non-JS stacks** — Python, Go, Rust, or any HTTP client; no npm packages required
* **Prototyping** — test the full deposit/withdraw flow with `curl` before writing application code

## Prerequisites

* A Paxos Labs API key (format: `pxl_<public_id>_<secret>`)
* An EVM wallet or signer capable of submitting raw transactions
* An HTTP client (`curl`, `fetch`, `requests`, etc.)

## Endpoints at a Glance

### Transaction Preparation

| Endpoint                          | Description                                                        |
| --------------------------------- | ------------------------------------------------------------------ |
| `GET /v2/core/authorization`      | Detect authorization method (permit / approval / already approved) |
| `GET /v2/amplify/deposit`         | Prepare deposit calldata                                           |
| `GET /v2/amplify/withdraw`        | Prepare withdrawal order calldata                                  |
| `GET /v2/amplify/withdraw/cancel` | Prepare cancel-withdrawal calldata                                 |

### Discovery

| Endpoint                 | Description                                                                                                                            |
| ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| `GET /v2/amplify/vaults` | Accounts grouped by name with per-chain deployments, contract addresses, per-asset deposit/withdraw flags, fees, SLAs, and supply caps |

### Display Helpers

| Endpoint                                 | Description                                                                             |
| ---------------------------------------- | --------------------------------------------------------------------------------------- |
| `GET /v2/amplify/calculateWithdrawalFee` | Withdrawal fee preview                                                                  |
| `GET /v2/amplify/supplyCaps`             | Supply cap utilization (`totalSupplyInBase`, `supplyCap`, `percentageFilled`) per chain |
| `GET /v2/amplify/userPositions`          | User share balance and position value in the vault base asset per chain                 |

## Getting Started

<CardGroup cols={2}>
  <Card title="Authentication & Response Formats" icon="key" href="/v1.0.0/intro/products/earn/developers/guides/api-calldata/authentication">
    API key usage, base URL, response format options, and error handling.
  </Card>

  <Card title="Account Discovery" icon="magnifying-glass" href="/v1.0.0/intro/products/earn/developers/guides/api-calldata/discovery">
    Find available accounts and their contract addresses, fees, and supported
    assets.
  </Card>

  <Card title="Deposits" icon="arrow-down-to-line" href="/v1.0.0/intro/products/earn/developers/guides/api-calldata/deposits">
    End-to-end deposit flow: authorize, prepare calldata, sign and submit.
  </Card>

  <Card title="Withdrawals" icon="arrow-up-from-line" href="/v1.0.0/intro/products/earn/developers/guides/api-calldata/withdrawals">
    Prepare and submit withdrawal orders via API.
  </Card>

  <Card title="Cancellations" icon="xmark" href="/v1.0.0/intro/products/earn/developers/guides/api-calldata/cancellations">
    Cancel pending withdrawal orders.
  </Card>

  <Card title="Display Helpers" icon="chart-line" href="/v1.0.0/intro/products/earn/developers/guides/api-calldata/display-helpers/index">
    Read deposit caps, supply, fees, and share values via API.
  </Card>
</CardGroup>

## Learning Path

1. **[Authentication](/v1.0.0/intro/products/earn/developers/guides/api-calldata/authentication)** — Set up your API key and understand response formats
2. **[Discovery](/v1.0.0/intro/products/earn/developers/guides/api-calldata/discovery)** — Find the right account and its contract addresses
3. **[Deposits](/v1.0.0/intro/products/earn/developers/guides/api-calldata/deposits)** — Execute your first deposit
4. **[Withdrawals](/v1.0.0/intro/products/earn/developers/guides/api-calldata/withdrawals)** — Submit withdrawal orders
5. **[Cancellations](/v1.0.0/intro/products/earn/developers/guides/api-calldata/cancellations)** — Cancel pending withdrawals
6. **[Display Helpers](/v1.0.0/intro/products/earn/developers/guides/api-calldata/display-helpers/index)** — Read account state for your UI
