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:
  1. Accepting swap parameters - Source token, destination token, and chains
  2. Leveraging aggregators - Uses bridge aggregators and router providers (GlueX, LiFi, Across, etc.) in the background
  3. Automatic routing - Finds the optimal path for cross-chain swaps

Request Structure

POST /v1/instructions/intent-simple

Request Body

ParameterTypeDescription
srcTokenstringSource token address
dstTokenstringDestination token address
srcChainIdnumberSource chain ID
dstChainIdnumberDestination chain ID
fromAddressstringUser wallet address
amountstringAmount to swap
modestringExecution mode: smart-account, eoa, or eoa-7702
slippagenumberSlippage tolerance (0-1, default 0.01)
allowSwapProvidersstringOptional: Comma-separated allowed providers
denySwapProvidersstringOptional: Comma-separated denied providers
allowBridgeProvidersstringOptional: Comma-separated allowed bridges
denyBridgeProvidersstringOptional: Comma-separated denied bridges

Example Request

curl -X POST https://api.biconomy.io/v1/instructions/intent-simple \
  -H "Content-Type: application/json" \
  -d '{
    "srcToken": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
    "dstToken": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",
    "srcChainId": 8453,
    "dstChainId": 10,
    "fromAddress": "0x742d35cc6639cb8d4b5d1c5d7b8b5e2e7c0c7a8a",
    "amount": "1000000",
    "mode": "smart-account",
    "slippage": 0.01,
    "allowSwapProviders": "lifi,gluex",
    "allowBridgeProviders": "across"
  }'

Response

Returns MEE instructions with detailed route information:
{
  "instructions": [...],
  "outputAmount": "999960",
  "minOutputAmount": "989960",
  "trigger": {
    "tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "chainId": 1,
    "amount": "1000000000"
  },
  "withdrawInstruction": [...],
  "route": {
    "summary": "lifi[sushiswap] => across[SpokePoolV3]",
    "steps": [...],
    "totalGasFeesUsd": 0,
    "totalBridgeFeesUsd": 0,
    "estimatedTime": 0,
    "outputAmount": "999960",
    "minOutputAmount": "989960",
    "type": "PIVOT_USDT"
  }
}

Supported Providers

The system automatically selects from available bridge aggregators and swap providers including:
  • Swap Providers: LiFi, GlueX, and others
  • Bridge Providers: Across, and others
Use allowSwapProviders/denySwapProviders and allowBridgeProviders/denyBridgeProviders to control provider selection.