API reference
Base URL: https://api.allswap.io. Direct API access is currently for approved partner integrations; the consumer web app uses the same quote/order flow through Allswap's same-origin backend. All amounts are strings in smallest units, and timestamps are ISO 8601 UTC.
See Authentication for key handling and Errors for retry behavior.
GET /v1/assets
List routable assets across supported chains. Use the returned CAIP-19 asset id as originAsset and destinationAsset.
Query parameters
| Field | Type | Description |
|---|---|---|
chainoptional | string | Optional short chain key filter, such as eth, tron, sol, or near. |
searchoptional | string | Optional free-text match against symbol or name. |
curl https://api.allswap.io/v1/assets \
-H "X-Key-Id: ak_live_yourapp" \
-H "Authorization: Bearer sk_live_..."POST /v1/quote
Get a non-binding route preview. Use dry: true when you only want pricing; it returns provider candidates plus best and does not create an order.
Body
| Field | Type | Description |
|---|---|---|
originAssetrequired | string (CAIP-19) | Source asset id returned by /v1/assets. |
destinationAssetrequired | string (CAIP-19) | Destination asset id returned by /v1/assets. |
amountrequired | string (integer) | Input amount in the source asset's smallest unit. |
swapTypeoptional | EXACT_INPUT | EXACT_OUTPUT | Defaults to EXACT_INPUT. |
slippageToleranceBpsoptional | integer | Maximum slippage in basis points. Omit to use provider defaults. |
senderoptional | string | Source-chain payment address. Required for a real order; dry quotes can use a placeholder. |
recipientoptional | string | Destination-chain receive address. Required for a real order; dry quotes can use a placeholder. |
dryoptional | boolean | true returns a preview only; false combines quote and order creation. |
curl -X POST https://api.allswap.io/v1/quote \
-H "X-Key-Id: ak_live_yourapp" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"originAsset": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"destinationAsset": "tron:mainnet/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amount": "1000000000",
"swapType": "EXACT_INPUT",
"slippageToleranceBps": 80,
"sender": "0xYourSourceAddress",
"recipient": "TYourDestinationAddress",
"dry": true
}'POST /v1/order
Create a deposit-address order after the user accepts the preview. The user sends funds to depositAddress; Allswap routes and settles after the deposit is detected.
Body
| Field | Type | Description |
|---|---|---|
originAssetrequired | string (CAIP-19) | Same source asset used in the accepted quote. |
destinationAssetrequired | string (CAIP-19) | Same destination asset used in the accepted quote. |
amountrequired | string (integer) | Exact input amount in smallest units. |
senderrequired | string | Source-chain address that will send the deposit. |
recipientrequired | string | Destination-chain address that receives settlement. |
refundTooptional | string | Source-chain refund address. If omitted, the sender may be used by the provider. |
providerIdrequired | route_A | route_B | Use the provider chosen from the dry quote response; route-comparison integrations normally submit the selected provider. |
curl -X POST https://api.allswap.io/v1/order \
-H "X-Key-Id: ak_live_yourapp" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"originAsset": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"destinationAsset": "tron:mainnet/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t",
"amount": "1000000000",
"swapType": "EXACT_INPUT",
"slippageToleranceBps": 80,
"sender": "0xYourSourceAddress",
"recipient": "TYourDestinationAddress",
"refundTo": "0xYourRefundAddress",
"providerId": "route_A"
}'GET /v1/order/{id}
Look up the current order state. Poll every 10-15 seconds until a terminal state, or consume status webhooks when enabled for your partner account.
curl https://api.allswap.io/v1/order/ord_01HW9... \
-H "X-Key-Id: ak_live_yourapp" \
-H "Authorization: Bearer sk_live_..."Status values: PENDING, PROCESSING, SUCCESS, REFUNDED, FAILED, and UNKNOWN. See Concepts → Orders.
POST /v1/order/{id}/deposit
Optionally submit the user's deposit transaction hash to speed up provider-side status tracking. This is useful after the user broadcasts the payment from your UI.
Body
| Field | Type | Description |
|---|---|---|
txHashrequired | string | Source-chain deposit transaction hash. |
nearSenderAccountoptional | string | Required only for selected NEAR-source deposits. |
curl -X POST https://api.allswap.io/v1/order/ord_01HW9.../deposit \
-H "X-Key-Id: ak_live_yourapp" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"txHash": "0xabc..."
}'POST /v1/rates
Preview one source asset against up to 50 target assets without user addresses. This endpoint is designed for landing pages, token pickers, and server-rendered rate previews.
Body
| Field | Type | Description |
|---|---|---|
fromrequired | string (CAIP-19) | Source asset id. |
amountrequired | string (integer) | Input amount in smallest units. |
targetsrequired | string[] (CAIP-19) | One to 50 destination asset ids. |
swapTypeoptional | EXACT_INPUT | EXACT_OUTPUT | Defaults to EXACT_INPUT. |
curl -X POST https://api.allswap.io/v1/rates \
-H "X-Key-Id: ak_live_yourapp" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"from": "eip155:1/erc20:0xdac17f958d2ee523a2206206994597c13d831ec7",
"amount": "1000000000",
"targets": [
"tron:mainnet/trc20:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"
]
}'Webhooks
Partner webhook delivery uses order.status_changed events. Treat delivery as at-least-once and update your records by orderId.
{
"version": "1",
"id": "evt_01HW9...",
"type": "order.status_changed",
"orderId": "ord_01HW9...",
"providerId": "route_A",
"status": "SUCCESS",
"previousStatus": "PROCESSING",
"inTxHashes": ["0xabc..."],
"outTxHashes": ["TXYZ..."],
"occurredAt": "2026-07-27T10:03:58Z"
}Verify the signature before trusting the payload. Store the raw event for support, but drive user-facing state from the normalized order status.

