POST
/
v1
/
instructions
/
intent
Build complex intents
curl --request POST \
  --url https://api.biconomy.io/v1/instructions/intent \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "slippage": 0.003,
  "user": "0x1234567890123456789012345678901234567890",
  "inputPositions": [
    {
      "chainToken": {
        "chainId": 8453,
        "tokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
      },
      "amount": 100
    }
  ],
  "targetWeights": [
    {
      "chainToken": {
        "chainId": 8453,
        "tokenAddress": "0x4e65fE4DbA92790696d040ac24Aa414708F5c0AB"
      },
      "weight": 1
    }
  ]
}'
{
  "instructions": [
    {
      "calls": [
        {
          "to": "0x1111111254EEB25477B68fb85Ed929f73A960582",
          "value": "0",
          "functionSig": "transfer(address,uint256)",
          "inputParams": [
            {
              "fetcherType": 0,
              "paramData": "0x742d35C9a91B1D5b5D24Dc30e8F0dF8E84b5d1c4",
              "constraints": []
            }
          ],
          "outputParams": [
            {
              "fetcherType": 0,
              "paramData": "0x"
            }
          ]
        }
      ],
      "chainId": 1,
      "isComposable": true
    }
  ]
}

Authorizations

X-API-Key
string
header
required

API Key required to access Supertransaction API. Example: mee_2w3mXCuyt4xVXDRCZ5k5Lhgs

Body

application/json

Body

Intent object containing slippage, the user account address, input positions and target weights

slippage
number
required

Slippage must be a number between 0 and 1 (inclusive)

Required range: 0 <= x <= 1
Example:

0.003

ownerAddress
string
required

The EVM address that will receive the output of the intent request.

Example:

"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

inputPositions
object[]
required
Minimum length: 1
targetPositions
object[]
required

Target positions: target assets with their respective weights. Weights define the distribution of the output assets. Weights for all the entries must sum to 1

Minimum length: 1

Response

Response containing MEE instructions potentially with runtime balance injected

instructions
object[]
required