---
title: "Compose instructions and generate a quote"
method: POST
path: "/v1/quote"
tags: ["root"]
---

# Compose instructions and generate a quote

`POST /v1/quote`

Compose instructions and retrieve a MEE quote in a single request.

## Request body

- object — Combine compose flows with quote configuration to compose instructions and generate a quote in a single call.
  - `mode` 'smart-account' | 'eoa' | 'eoa-7702', required
  - `ownerAddress` string, required — EOA wallet address which is used as owner of the orchestrator account
  - `authorizations` object[]
    - `address` string, required — The EVM address of the delegation contract to which your EOA (Externally Owned Account) is being upgraded. Must be a valid checksummed Ethereum address.
    - `chainId` number, required — The chain ID for which this authorization is valid. Use 0 for multichain or specify a supported chain ID.
    - `nonce` number, required — Signature nonce
    - `r` string, required — The "r" value of the ECDSA signature, as a 32-byte hex string prefixed with 0x.
    - `s` string, required — The "s" value of the ECDSA signature, as a 32-byte hex string prefixed with 0x.
    - `v` string — The "v" value of the ECDSA signature (recovery id), as a string. Optional for EIP-2098 signatures.
    - `yParity` number, required — The y-parity value (EIP-2098) for the signature. Should be 0 or 1.
  - `fundingTokens` object[]
    - `tokenAddress` string, required — Contract address of the token that will be deposited into the Nexus smart account.
    - `chainId` number, required — Chain ID where the funding token resides. Use a supported chain ID.
    - `amount` string, required — Amount of funding token in wei/smallest unit to deposit.
  - `feeToken` object — Optional fee token configuration. If not specified, sponsorship will be used.
    - `address` string, required — Contract address of the token used to pay MEE execution fees
    - `chainId` number, required — Chain ID where the fee token resides. Use a supported chain ID.
    - `gasRefundAddress` string — Custom gas refund address to receive remaining unspent gas. Defaults to owner address. Gas refunds are always in ETH and may be refunded on multiple chains depending on userOps involved.
  - `cleanUps` object[] — Optional cleanup configurations for intermediate tokens
    - `tokenAddress` string, required — Address of the token to cleanup
    - `chainId` number, required — Chain ID where the token cleanup should occur
    - `recipientAddress` string, required — Address to receive the cleanup tokens
    - `amount` string — Amount to cleanup in wei. If not specified, uses runtime balance (entire balance).
    - `gasLimit` string — Custom gas limit for cleanup userOp
  - `gasLimit` string — Optional gas limit override for the gas userop.
  - `lowerBoundTimestamp` number — The lower bound timestamp for the user operation.
  - `upperBoundTimestamp` number — The upper bound timestamp for the user operation.
  - `simulate` boolean
  - `batch` boolean
  - `simulationOverrides` object
    - `tokenOverrides` object[], required
      - `tokenAddress` string, required — Address of the token to override the balance for.
      - `accountAddress` string — Address of the account to override the balance for.
      - `chainId` number, required — Chain ID where the token override should occur
      - `balance` string, required — Balance of the token to override the balance for, in wei/smallest unit.
    - `customOverrides` object[], required
      - `contractAddress` string, required — Address of the contract to override the storage slot for.
      - `storageSlot` string, required — Storage slot to override the value for.
      - `chainId` number, required — Chain ID where the storage slot override should occur
      - `value` string, required — Value to override the storage slot for.
  - `composeFlows` union[], required
    - union — This enable developers to specify a build, intent-simple, intent, or intent-vault operation
      - object
        - `type` '/instructions/build', required — Compose flow for the "build" type to generate composable MEE instructions from a custom specification.
        - `data` object, required — Request to build composable instructions from ABI signature and arguments
          - `to` string, required — Target contract address
          - `chainId` number, required — Chain ID where the transaction will be executed
          - `value` string — Native token value in wei
          - `gasLimit` string — Gas limit for the transaction
          - `functionSignature` string, required — Function signature string (e.g., "function approve(address spender, uint256 amount)")
          - `args` unknown[], required
            - unknown
          - `lowerBoundTimestamp` number — Lower bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
          - `upperBoundTimestamp` number — Upper bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
        - `batch` boolean — Flag to enable or disable instructions batching. By default, batching is enabled
      - object
        - `type` '/instructions/build-raw', required — Compose flow for the "build-raw" type to generate composable MEE instructions from raw calldata.
        - `data` object, required — Request to build composable instructions from raw calldata
          - `to` string, required — Target contract address
          - `chainId` number, required — Chain ID where the transaction will be executed
          - `value` string — Native token value in wei
          - `gasLimit` string — Gas limit for the transaction
          - `data` string, required — Raw calldata as hex string (e.g., "0x1234..." for encoded function call)
          - `lowerBoundTimestamp` number — Lower bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
          - `upperBoundTimestamp` number — Upper bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
        - `batch` boolean — Flag to enable or disable instructions batching. By default, batching is enabled
      - object
        - `type` '/instructions/build-ccip', required — Compose flow for the "build-ccip" type to generate composable MEE instructions for Chainlink CCIP token bridging
        - `data` object, required
          - `srcToken` string, required — Source token EVM address. Must be a valid checksummed Ethereum address.
          - `dstToken` string, required — Destination token EVM address. Must be a valid checksummed Ethereum address.
          - `srcChainId` number, required — The source chain ID for the swap or token bridging. Use a supported chain ID number.
          - `dstChainId` number, required — The destination chain ID for the swap or token bridging. Use a supported chain ID number.
          - `amount` union, required
            - string
            - object — Schema for specifying a runtime ERC20 balance check, including the target address, token address, and optional constraints.
              - …
          - `gasLimit` string — Gas limit for the CCIP token bridging
          - `lowerBoundTimestamp` number — Lower bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
          - `upperBoundTimestamp` number — Upper bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
        - `batch` boolean — Flag to enable or disable instructions batching. By default, batching is enabled
      - object
        - `type` '/instructions/intent-simple', required — Compose flow for the "intent-simple" type for basic cross-chain swaps.
        - `data` object, required
          - `srcToken` string, required — Source token EVM address. Must be a valid checksummed Ethereum address.
          - `dstToken` string, required — Destination token EVM address. Must be a valid checksummed Ethereum address.
          - `srcChainId` number, required — The source chain ID for the swap or token bridging. Use a supported chain ID number.
          - `dstChainId` number, required — The destination chain ID for the swap or token bridging. Use a supported chain ID number.
          - `amount` string, required
          - `routeSelectionMode` 'cheap' | 'fast-quote' | 'fast-execution' — Swap route selection strategy. Use `cheap` (default) to evaluate every route and pick the highest output. Use `fast-quote` to return as soon as the first valid route is discovered. `fast-execution` is reserved for future use.
          - `allowSwapProviders` string — Comma-separated list of allowed swap providers.
          - `denySwapProviders` string — Comma-separated list of denied swap providers.
          - `allowBridgeProviders` string — Comma-separated list of allowed bridge providers.
          - `denyBridgeProviders` string — Comma-separated list of denied bridge providers.
          - `slippage` number, required — Slippage tolerance (0-1, default: 0.01 = 1%)
          - `lowerBoundTimestamp` number — Lower bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
          - `upperBoundTimestamp` number — Upper bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
        - `batch` boolean — Flag to enable or disable instructions batching. By default, batching is enabled
      - object
        - `type` '/instructions/intent', required — Compose flow for the "intent" type for advanced multi-chain, multi-asset operations.
        - `data` object, required
          - `slippage` number, required — Slippage must be a number between 0 and 1 (inclusive)
          - `inputPositions` object[], required
            - `chainToken` object, required — The chain and token for the input position. Must include a supported chainId and a valid EVM token address.
              - …
            - `amount` string, required
          - `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
            - `chainToken` object, required — The chain and token for the target position. Must include a supported chainId and a valid EVM token address.
              - …
            - `weight` unknown, required
          - `lowerBoundTimestamp` number — Lower bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
          - `upperBoundTimestamp` number — Upper bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
          - `routeSelectionMode` 'cheap' | 'fast-quote' | 'fast-execution' — Swap route selection strategy. Use `cheap` (default) to evaluate every route and pick the highest output. Use `fast-quote` to return as soon as the first valid route is discovered. `fast-execution` is reserved for future use.
          - `allowSwapProviders` string — Comma-separated list of allowed swap providers.
          - `denySwapProviders` string — Comma-separated list of denied swap providers.
          - `allowBridgeProviders` string — Comma-separated list of allowed bridge providers.
          - `denyBridgeProviders` string — Comma-separated list of denied bridge providers.
        - `batch` boolean — Flag to enable or disable instructions batching. By default, batching is enabled
      - object
        - `type` '/instructions/intent-vault', required — Compose flow for vault-to-vault operations via VaultsFYI. Supports token→vault, vault→token, and vault→vault flows.
        - `data` object, required
          - `srcChainId` number, required — The source chain ID
          - `srcToken` string — Source token address. Mutually exclusive with srcVault.
          - `srcVault` string — VaultsFYI vault address to redeem from. Mutually exclusive with srcToken.
          - `dstChainId` number, required — The destination chain ID
          - `dstToken` string — Destination token address. Mutually exclusive with dstVault.
          - `dstVault` string — VaultsFYI vault address to deposit to. Mutually exclusive with dstToken.
          - `amount` string, required
          - `slippage` number, required — Slippage tolerance (0-1, default: 0.01 = 1%)
          - `allowSwapProviders` string — Comma-separated list of allowed swap providers.
          - `denySwapProviders` string — Comma-separated list of denied swap providers.
          - `allowBridgeProviders` string — Comma-separated list of allowed bridge providers.
          - `denyBridgeProviders` string — Comma-separated list of denied bridge providers.
          - `routeSelectionMode` 'cheap' | 'fast-quote' — Route selection strategy: cheap (default) or fast-quote
          - `lowerBoundTimestamp` number — Lower bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
          - `upperBoundTimestamp` number — Upper bound execution timestamp to be applied for specific instruction. This will override the default and global timebound configurations. If multiple instructions are batched together as single userOp which has multiple timebounds, the bigger timebound window will be used
        - `batch` boolean — Flag to enable or disable instructions batching. By default, batching is enabled
  - `accountAddress` object — Optional mapping of chainId to Nexus address for upgraded legacy accounts. Pass the upgradedAddresses from /mee/orchestrator response here.

## Response `200`

Combined response containing composed instructions and the resulting MEE quote.

- object — Combined response containing composed instructions and the resulting MEE quote.
  - `ownerAddress` string, required — Owner wallet address which will be used as a owner of orchestrator account
  - `fee` object, required — Fee details: amount, token address, and chain ID.
    - `amount` string, required — Fee amount for the quote in wei.
    - `token` string, required — EVM address of the fee token (zero address for native ETH).
    - `chainId` number, required — Chain ID where the fee token resides.
  - `quoteType` 'permit' | 'onchain' | 'simple' | 'permit-sca' | 'mm-dtk', required — Type of MEE signature: permit, onchain, simple, permit-sca, or mm-dtk.
  - `quote` object, required — MEE network compatible quote information
    - `hash` string, required — Supertransaction hash of the quote.
    - `node` string, required — EVM address of the node providing the quote.
    - `commitment` string, required — Node's commitment hash for the supertransaction quote (hex string, 0x-prefixed).
    - `paymentInfo` object, required
      - `sender` string, required — Sender EVM address (optional)
      - `initCode` string, required — Init code as hex string (optional)
      - `nonce` string, required — Nonce as string (optional)
      - `token` string, required — Payment token address
      - `chainId` number, required — Chain ID of the payment token
      - `verificationGasLimit` string — Verification gas limit as string (optional)
      - `eoa` string — EOA address (optional)
      - `eip7702Auth` object — Object containing the EIP-7702 authorization signature fields for delegation, including the signer address, chain ID, nonce, and ECDSA signature components (r, s, v/yParity). Used to prove delegation intent and validity.
        - `address` string, required — The EVM address of the delegation contract to which your EOA (Externally Owned Account) is being upgraded. Must be a valid checksummed Ethereum address.
        - `chainId` number, required — The chain ID for which this authorization is valid. Use 0 for multichain or specify a supported chain ID.
        - `nonce` number, required — Signature nonce
        - `r` string, required — The "r" value of the ECDSA signature, as a 32-byte hex string prefixed with 0x.
        - `s` string, required — The "s" value of the ECDSA signature, as a 32-byte hex string prefixed with 0x.
        - `v` string — The "v" value of the ECDSA signature (recovery id), as a string. Optional for EIP-2098 signatures.
        - `yParity` number, required — The y-parity value (EIP-2098) for the signature. Should be 0 or 1.
      - `shortEncoding` boolean, required — Short encoding flag (default: false)
      - `callGasLimit` string — Call gas limit as string (optional)
      - `sponsored` boolean — Sponsored flag (optional)
      - `sponsorshipUrl` string — Sponsored ulr (optional)
      - `tokenAmount` string — Token amount as string (optional)
      - `tokenValue` string, required — Token value as string in USD
      - `tokenWeiAmount` string, required — Token wei amount as string (optional)
      - `gasFee` string — Gas fee as string (optional)
      - `orchestrationFee` string — Orchestration fee as string (optional)
    - `userOps` object[], required — Array of MEE UserOperation objects for the quote.
      - `userOp` object, required — Object containing the fields of a UserOperation, including sender, nonce, calldata, gas limits, and signature.
        - `sender` string, required — The address of the account initiating the user operation.
        - `nonce` string, required — The nonce of the sender account, as a bigint.
        - `initCode` string — The initCode for contract creation, as a hex string. Optional.
        - `callData` string, required — The calldata for the user operation, as a hex string.
        - `callGasLimit` string, required — The gas limit for the call, as a bigint.
        - `verificationGasLimit` string, required — The gas limit for verification, as a bigint.
        - `preVerificationGas` string, required — The gas used before verification, as a bigint.
        - `maxFeePerGas` string, required — The maximum fee per gas, as a bigint.
        - `maxPriorityFeePerGas` string, required — The maximum priority fee per gas, as a bigint.
        - `paymasterAndData` string — The paymaster and data field, as a hex string. Optional.
        - `signature` string — The signature for the user operation, as a hex string. Optional.
      - `userOpHash` string, required — The hash of the user operation.
      - `meeUserOpHash` string, required — The MEE-specific hash of the user operation.
      - `lowerBoundTimestamp` number, required — The lower bound timestamp for the user operation.
      - `upperBoundTimestamp` number, required — The upper bound timestamp for the user operation.
      - `maxGasLimit` string, required — The maximum gas limit for the user operation.
      - `maxFeePerGas` string, required — The maximum fee per gas for the user operation.
      - `chainId` number, required — The chain ID for the user operation.
      - `eip7702Auth` object — Object containing the EIP-7702 authorization signature fields for delegation, including the signer address, chain ID, nonce, and ECDSA signature components (r, s, v/yParity). Used to prove delegation intent and validity.
        - `address` string, required — The EVM address of the delegation contract to which your EOA (Externally Owned Account) is being upgraded. Must be a valid checksummed Ethereum address.
        - `chainId` number, required — The chain ID for which this authorization is valid. Use 0 for multichain or specify a supported chain ID.
        - `nonce` number, required — Signature nonce
        - `r` string, required — The "r" value of the ECDSA signature, as a 32-byte hex string prefixed with 0x.
        - `s` string, required — The "s" value of the ECDSA signature, as a 32-byte hex string prefixed with 0x.
        - `v` string — The "v" value of the ECDSA signature (recovery id), as a string. Optional for EIP-2098 signatures.
        - `yParity` number, required — The y-parity value (EIP-2098) for the signature. Should be 0 or 1.
      - `isCleanUpUserOp` boolean — Whether this is a clean-up user operation.
      - `shortEncoding` boolean — Whether the user operation uses short encoding.
    - `fundingTokens` object[] — Optional array of funding tokens for token pull execution.
      - `tokenAddress` string, required — Contract address of the token that will be deposited into the Nexus smart account.
      - `chainId` number, required — Chain ID where the funding token resides. Use a supported chain ID.
      - `amount` string, required — Amount of funding token in wei/smallest unit to deposit.
  - `payloadToSign` union[], required — Array of payloads to be signed, structure depends on the quoteType.
    - union
      - object — Full EIP-712 permit signature data (payload and metadata)
        - `signablePayload` object, required — Payload to be signed for EIP-712 permit
          - `domain` object — EIP-712 domain object
            - `name` string — Token or contract name (e.g. 'USD Coin')
            - `version` string — Contract version (e.g. '1')
            - `chainId` number — EVM chain ID (e.g. 1 for Ethereum mainnet)
            - `verifyingContract` string — Address of the contract being verified
            - `salt` string — Optional domain salt (hex string)
          - `types` object, required
          - `message` object, required — Key-value pairs for the EIP-712 message
          - `primaryType` string, required — Name of the main EIP-712 struct to sign (e.g. 'Permit')
        - `metadata` object, required — Extra metadata for the permit signature
          - `nonce` string, required — Permit nonce (as string)
          - `name` string, required — Token or contract name
          - `version` string, required — Contract version
          - `domainSeparator` string, required — EIP-712 domain separator (hex string)
          - `owner` string, required — Address of the permit owner
          - `spender` string, required — Address of the spender
          - `amount` string, required — Permit amount in wei (as string)
      - object — On-chain signature data for direct contract calls
        - `to` string, required — Target contract address for the on-chain call
        - `data` string, required — Calldata for the on-chain transaction (hex string)
        - `value` string, required — ETH value to send with the transaction (in wei, as string)
        - `chainId` number, required — Chain ID for the on-chain transaction
      - object — Message with raw transaction hash to sign for simple quote type (legacy)
        - `message` object, required
          - `raw` string, required — Raw transaction hash to sign (hex string)
      - object — EIP-712 typed data payload for signing supertransactions (MEE >= 2.2.1)
        - `domain` object, required — EIP-712 domain for the SuperTx signature
          - `name` string, required — Domain name for the signature
        - `types` object, required — EIP-712 type definitions for SuperTx
          - `MeeUserOp` object[], required — MeeUserOp struct fields
            - `name` string, required — A string value.
            - `type` string, required — A string value.
          - `SuperTx` object[], required — SuperTx struct fields
            - `name` string, required — A string value.
            - `type` string, required — A string value.
        - `primaryType` 'SuperTx', required — Primary type for the EIP-712 signature
        - `message` object, required — The SuperTx message to be signed
          - `meeUserOps` object[], required — Array of MeeUserOp objects to be signed
            - `userOpHash` string, required — User operation hash (bytes32)
            - `lowerBoundTimestamp` number, required — Lower bound timestamp for the operation
            - `upperBoundTimestamp` number, required — Upper bound timestamp for the operation
  - `instructions` object[], required
    - `calls` object[], required
      - `to` string — EVM address of the target smart contract to invoke for this call. Optional in Composability v1.1.0+ (encoded as inputParam).
      - `value` string — Amount of native token (in wei) to send with the contract call. Must be a non-negative integer. Optional in Composability v1.1.0+ (encoded as inputParam).
      - `functionSig` string, required — Function signature as a string, e.g. "transfer(address,uint256)". Must match the target contract ABI.
      - `inputParams` object[], required
        - `paramType` 0 | 1 | 2
        - `fetcherType` 0 | 1 | 2, required
        - `paramData` string, required — String representing the input parameter data, such as ABI-encoded bytes or a direct value.
        - `constraints` object[], required
          - `constraintType` 0 | 1 | 2 | 3, required
          - `referenceData` string, required — String data used as the reference for the constraint, such as a literal value or ABI-encoded data.
      - `outputParams` object[], required
        - `fetcherType` 0 | 1, required
        - `paramData` string, required — String representing the output parameter data, such as ABI-encoded bytes or a result value.
      - `gasLimit` string — Gas limit for the contract call. Optional - if not provided, it will be estimated.
    - `chainId` number, required — Chain ID on which this instruction should be executed. Must be a supported EVM chain ID.
    - `isComposable` boolean — Indicates if this instruction is composable with others in the same execution batch.
    - `lowerBoundTimestamp` number — Lower bound execution timestamp to be applied for specific instruction.
    - `upperBoundTimestamp` number — Upper bound execution timestamp to be applied for specific instruction.
  - `returnedData` unknown[], required
    - unknown

## Other responses

- `400` — 400
- `412` — 412
- `500` — 500

---

[API](https://skmtc.dev/biconomy/apis/supertransaction-api.md) · [All operations](https://skmtc.dev/biconomy/apis/supertransaction-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/biconomy/supertransaction-api/revisions/ac7ceba8e320/schema)
