# Swaps

MoonPay Wallets exposes swap-routing and transaction-tracking operations under `/v0/swaps/`. Call these APIs from your backend with your app's secret key, then use the supported wallet signing surface when an operation requires user-authorized onchain execution.

## Make a first request

Fetch the chain catalog:

```bash
curl --fail-with-body https://x-api.moonpay.com/v0/swaps/getChainList \
  -H "X-API-Key: moon_sk_test_your_api_key"
```

The secret key identifies your app; it does not grant control of a user's embedded wallet. Standard signing requires the client SDK, while backend execution requires a separately provisioned [ephemeral signer](/wallets/ephemeral-signers/overview).

## API surfaces

| Operation | Method and path |
| --- | --- |
| Request an action | `GET /v0/swaps/getAction` |
| Read execution status | `GET /v0/swaps/getStatus` |
| Register transaction identifiers | `POST /v0/swaps/registerTxs` |
| Read transaction details | `GET /v0/swaps/getTransactions` |
| Read available paths | `GET /v0/swaps/getPaths` |
| Read the chain catalog | `GET /v0/swaps/getChainList` |

See the [API reference](/api-reference) for the published parameters and response contracts. These operations forward provider-specific requests; there is no generic `params` object to stringify into a query URL. Send the operation's actual query parameters or JSON body.

## Connect routing to execution

1. Select the source and destination network/asset using the operation's supported catalog.
2. Request the action/path through your backend.
3. Validate the returned transactions against the user's intended networks, assets, recipients, and amounts.
4. Submit required approvals and transactions with the selected wallet. Wait for successful execution before dependent steps.
5. Record transaction identifiers and use the relevant status operation to track the route. A source-chain submission is not necessarily destination-chain settlement.
6. Refresh the receiving balance and show the final result only when the required completion conditions are met.

Retain progress so a user can resume interrupted flows. Check an uncertain transaction outcome before submitting a duplicate action.

## How swaps fit with other services

* Use [market data](/data/overview) for discovery and display, not as a replacement for an executable action's contract.
* Use [wallet operations](/wallets/chain-support) for supported signing and transaction execution.
* Confirm receiving network and asset before offering [funding](/wallets/funding/overview) or a protocol-based [yield integration](/recipes/yield/overview).
* Read [credentials and environments](/get-started/environments) before configuring test/live keys and provider networks.
