Build complex multi-chain intents for your supertransaction
Overview
The/v1/instructions/intent
endpoint enables users to express their desired outcome without specifying implementation details. Users define input tokens and target output tokens with weights, and the system automatically determines the optimal execution path.
How It Works
The intent endpoint abstracts away complexity by:- Accepting input positions - Specify source tokens with amounts (e.g., USDC on Base)
- Defining target positions - Specify desired output tokens with weights that must sum to 1
- Automatic routing - The system finds the best path between tokens, handling:
- Withdrawals from source protocols
- Cross-chain bridging
- Swaps and conversions
- Deposits into destination protocols
Request Structure
Request Body
Parameter | Type | Required | Description |
---|---|---|---|
slippage | number | Yes | Slippage tolerance between 0 and 1 (e.g., 0.003 for 0.3%) |
ownerAddress | string | Yes | The EVM address that will receive the output of the intent request |
inputPositions | array | Yes | Array of source tokens with amounts (minimum 1 item) |
targetPositions | array | Yes | Array of target tokens with weights (minimum 1 item, weights must sum to 1) |
Input Position Structure
Target Position Structure
Example Request
Single Asset Swap
Convert USDC on Base to a vault token on Base:Multi-Asset Portfolio Rebalance
Convert multiple input tokens to a diversified portfolio:Response Structure
The endpoint returns MEE instructions that will be executed to fulfill the intent:Response Fields
Field | Type | Description |
---|---|---|
instructions | array | Array of MEE instructions to execute |
instructions[].calls | array | Contract calls within the instruction |
instructions[].chainId | number | Chain ID where instruction executes |
instructions[].isComposable | boolean | Whether instruction can be composed with others |
Error Responses
400 Bad Request
Invalid request parameters:500 Internal Server Error
Server processing error:Key Considerations
Weight Distribution
Target position weights must sum to exactly 1.0. For example:- Single target: weight = 1.0
- Two targets with equal split: weight = 0.5 each
- Three targets: e.g., 0.5, 0.3, 0.2
Slippage Settings
- Minimum: 0 (no slippage tolerance)
- Maximum: 1 (100% slippage)
- Recommended: 0.003 - 0.01 (0.3% - 1%)
- Higher slippage may be needed for:
- Low liquidity tokens
- Large trade sizes
- Cross-chain operations
Cross-Chain Intents
The system automatically handles:- Bridge selection and routing
- Gas optimization across chains
- Atomic execution guarantees
- Failure recovery mechanisms
Intent vs Direct Instructions
The Supertransaction API offers two approaches:Approach | Use Case | Control Level |
---|---|---|
Intent-based (this endpoint) | Express desired outcome, system determines execution | High-level abstraction |
Direct instructions (/v1/instructions/build ) | Explicitly specify each step | Full control over execution |
- Finding optimal routes
- Handling protocol interactions
- Managing cross-chain complexity
- Optimizing for gas efficiency
Security Requirements
All requests must include:- Valid API key in the
X-API-Key
header - Proper content type:
application/json
- Valid EVM addresses (checksummed)
- Supported chain IDs