Skip to main content

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:

  1. Creation - An intent is created via the API with swap parameters such as source chain, destination chain, tokens, and amounts.
  2. Approval - The user authorizes fund usage using a chain-specific approval mechanism (for example, Permit2 on EVM, PSBT on Bitcoin, Cosigned transaction on Solana).
  3. Execution - Once approved, the resolver processes the intent and executes the swap.
  4. 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

NameTypeRequiredDescription
quote_idStringOptionalFor some providers this field is mandatory.
fromObjectRequiredBase token information for intent creation.
addressStringRequiredPart of from object. Sender address.
network_idNumberConditional requiredPart of from object. Required only if token_id is not provided. For receiveing network_id use the GET /v1/networks endpoint.
tokenStringConditional requiredPart of from object. Required only if token_id is not provided.
token_idNumberConditional requiredPart of from object. Required only if network_id and token are not provided.
public_keyStringOptionalPart of from object. Field required only if source chain is Bitcoin or Solana.
toObjectRequiredQuote token information for intent creation.
addressStringRequiredPart of to object. Receiver address.
token_idNumberConditional requiredPart of to object. Required only if network_id and token are not provided. For receiveing token_id use the GET /v1/tokens endpoint.
network_idNumberConditional requiredPart of to object. Required only if token_id is not provided. For receiveing network_id use the GET /v1/networks endpoint.
tokenStringConditional requiredPart of to object. Required only if token_id is not provided.
refund_addressStringRequiredAddress for potential refund.
amountNumberRequiredAmount to swap, must be specified in decimal-adjusted format.
slippage_bpsStringRequiredSlippage 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.