Intents
An intent represents a user's request to perform a swap and can only be created based on a quote, to which it is attached. It defines what the user wants to do, while the protocol handles how it gets executed.
Intents are chain-agnostic and support multiple blockchains and approval mechanisms.
Intent lifecycle
A typical intent goes through the following steps:
- Creation - An intent is created via the API with swap parameters such as source chain, destination chain, tokens, and amounts.
- Approval - The user authorizes fund usage using a chain-specific approval mechanism (for example, Permit2 on EVM, PSBT on Bitcoin, Cosigned transaction on Solana).
- Execution - Once approved, the resolver processes the intent and executes the swap.
- Status tracking - The intent status can be queried at any time to track progress or final outcome.
Create an intent
Create a new swap intent that describes what the user wants to swap. An intent is created off-chain and later executed on-chain by a resolver.
HTTP request
POST /v1/intents
Request
Header parameters
Requires authentification.
Body parameters
| Name | Type | Required | Description |
|---|---|---|---|
quote_id | String | Optional | For some providers this field is mandatory. |
from | Object | Required | Base token information for intent creation. |
address | String | Required | Part of from object. Sender address. |
network_id | Number | Conditional required | Part of from object. Required only if token_id is not provided. For receiveing network_id use the GET /v1/networks endpoint. |
token | String | Conditional required | Part of from object. Required only if token_id is not provided. |
token_id | Number | Conditional required | Part of from object. Required only if network_id and token are not provided. |
public_key | String | Optional | Part of from object. Field required only if source chain is Bitcoin or Solana. |
to | Object | Required | Quote token information for intent creation. |
address | String | Required | Part of to object. Receiver address. |
token_id | Number | Conditional required | Part of to object. Required only if network_id and token are not provided. For receiveing token_id use the GET /v1/tokens endpoint. |
network_id | Number | Conditional required | Part of to object. Required only if token_id is not provided. For receiveing network_id use the GET /v1/networks endpoint. |
token | String | Conditional required | Part of to object. Required only if token_id is not provided. |
refund_address | String | Required | Address for potential refund. |
amount | Number | Required | Amount to swap, must be specified in decimal-adjusted format. |
slippage_bps | String | Required | Slippage expressed in basis points. |
Sample request
application/json
{
"quote_id": "bea66e69-64c3-4b88-96ac-29f1ce7d454d",
"from": {
"from_network_id": 1,
"from_token": "0xc02aaa3********9083c756cc2",
"from_address": "0x000000000000000000000000000000000000000"
},
"to": {
"to_network_id": 4,
"to_token": "So11111111111111111111111111111111111111112",
"to_address": "0x000000000000000000000000000000000000000"
},
"refund_address": "0x000000000000000000000000000000000000000",
"amount": 100,
"slippage_bps": "50"
}
Response
Sample response (EVM and Tron)
application/json
{
"id": "8a2d3f92-2a2b-4e4c-9d8a-3c9f92e4a111",
"deadline_at": 1761545456,
"approval_type": "permit2",
"params_to_sign": {
"escrow_contract_address": "0x000000000000000000000000000000000000000",
"permit2_contract_address": "0x000000000000000000000000000000000000000",
"resolver_deposit_address": "0x000000000000000000000000000000000000000",
"nonce": 10000,
"additional_data": {
"domain": { /* EIP-712 domain data */ },
"types": { /* EIP-712 types */ },
"witness": { /* witness data */ },
"witness_type_string": "ExampleTrade witness)ExampleTrade(address exampleTokenAddress,uint256 exampleMinimumAmountOut)",
"witness_hash": "0x000000000000000000000000000000000000000000000000000000000000000"
}
}
}
Error response
Check the error response schema.