Build simple cross-chain swap intents for your supertransaction
Overview
The/v1/instructions/intent-simple
endpoint enables straightforward cross-chain token swaps. Users specify source and destination tokens across different chains, and the system handles routing through bridge aggregators and swap providers.
How It Works
The intent-simple endpoint manages cross-chain swaps by:- Accepting swap parameters - Source token, destination token, and chains
- Leveraging aggregators - Uses bridge aggregators and router providers (LiFi, GlueX, Across, etc.) in the background
- Automatic routing - Finds the optimal path for cross-chain swaps
Request Structure
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
srcToken | string | Yes | Source token EVM address (checksummed) |
dstToken | string | Yes | Destination token EVM address (checksummed) |
srcChainId | number | Yes | Source chain ID |
dstChainId | number | Yes | Destination chain ID |
ownerAddress | string | Yes | EOA wallet address (owner of orchestrator account) |
amount | string | Yes | Amount to swap (in wei/smallest unit) |
mode | string | Yes | Execution mode: smart-account , eoa , or eoa-7702 |
slippage | number | Yes | Slippage tolerance (0-1, default 0.01 = 1%) |
allowSwapProviders | string | No | Comma-separated allowed swap providers |
denySwapProviders | string | No | Comma-separated denied swap providers |
allowBridgeProviders | string | No | Comma-separated allowed bridge providers |
denyBridgeProviders | string | No | Comma-separated denied bridge providers |
Example Request
Response
Returns MEE instructions with detailed route information:Response Fields
Field | Type | Description |
---|---|---|
instructions | array | Array of MEE instruction objects for execution |
outputAmount | string | Expected output token amount (in wei) |
minOutputAmount | string | Minimum guaranteed output amount after slippage (in wei) |
route | object | Detailed routing information |
route.summary | string | Human-readable route summary |
route.steps | array | Detailed steps in the route |
route.totalGasFeesUsd | number | Estimated total gas fees in USD |
route.totalBridgeFeesUsd | number | Estimated total bridge fees in USD |
route.estimatedTime | number | Estimated execution time in seconds |
route.type | string | Route type (e.g., “PIVOT_USDT”) |
Route Step Structure
Each step in the route contains:Field | Type | Description |
---|---|---|
type | string | Step type: “swap” or “bridge” |
protocol | string | Protocol used (e.g., “lifi”) |
sources | array | DEXes or sources used |
srcToken | string | Source token address |
dstToken | string | Destination token address |
srcChainId | number | Source chain ID |
dstChainId | number | Destination chain ID |
inputAmount | string | Input amount for this step |
outputAmount | string | Output amount from this step |
minOutputAmount | string | Minimum output after slippage |
toContract | string | Target contract for this step |
callData | string | Encoded call data |
isFirstStep | boolean | Whether this is the first step |
pivotBalance | string | Optional pivot balance for route |
Supported Providers
The system automatically selects from available bridge aggregators and swap providers. You can control provider selection using the allow/deny parameters:- Swap Providers: LiFi, GlueX, and others
- Bridge Providers: Across, and others
allowSwapProviders
/denySwapProviders
and allowBridgeProviders
/denyBridgeProviders
to control provider selection.
Authentication
All requests require an API key to be passed in the header:Error Responses
400 Bad Request
Returned when the request is malformed or contains invalid parameters:500 Internal Server Error
Returned when the server encounters an unexpected error:Mode Options
Themode
parameter determines how the transaction will be executed:
smart-account
: Execute through a smart account walleteoa
: Execute through an Externally Owned Accounteoa-7702
: Execute through an EOA with EIP-7702 delegation
Slippage Configuration
Theslippage
parameter accepts values between 0 and 1:
0.01
= 1% slippage0.05
= 5% slippage1
= 100% slippage (not recommended)
0.01
(1%) if not specified.