---
title: "Build multi exchange batch transaction data"
method: POST
path: "/exchanges/multi/{multiId}/tx/build"
tags: ["Exchanges"]
---

# Build multi exchange batch transaction data

`POST /exchanges/multi/{multiId}/tx/build`

Builds batched transaction data for all orders in a multi exchange group.
Supports Solana (up to 10 deposits per batch) and EVM ERC-4337 (up to 20 legs per batch).
All orders must share the same source token chain.
For EVM the built UserOp is stored server-side until submitted, hence POST.

## Path parameters

- `multiId` string, required

## Request body

- MultiExchangeTxBuildRequest — Request body for POST /exchanges/multi/{multiId}/tx/build
  - `sender` string, required — Wallet address that will sign and fund the transaction(s)
  - `houdiniIds` string[] — Optional subset of orders to build for; defaults to all orders in the group

## Response `200`

Success

- MultiExchangeTxResult
  - `multiId` string, required
  - `chain` string, required — Chain kind of the from token (e.g. "solana", "evm")
  - `transactions` TxBatch[], required
    - `houdiniIds` string[], required — HoudiniIds of the orders included in this batch
    - `txData` union, required — Network-specific transaction data ready to broadcast
      - EvmBatchTxSlimData — Slim response returned to the frontend — backend stores the full userOp in DB
        - `userOpHash` string, required
        - `to` string, required
        - `data` string, required
        - `value` string, required
        - `chainId` number, double, required
        - `tokenAmount` string, required
      - union — Union — add new network types here as they are supported
        - SolanaBatchTxData
          - `data` string, required — Serialized transaction bytes (base64)
        - EvmBatchTxData
          - `userOp` EvmUserOp, required — EntryPoint v0.7 unpacked UserOp. User pays gas from Smart Account balance — no paymaster.
            - `sender` string, required
            - `nonce` string, required
            - `factory` string
            - `factoryData` string
            - `callData` string, required
            - `callGasLimit` string, required
            - `verificationGasLimit` string, required
            - `preVerificationGas` string, required
            - `maxFeePerGas` string, required
            - `maxPriorityFeePerGas` string, required
            - `signature` string, required
            - `paymaster` string
            - `paymasterData` string
            - `paymasterVerificationGasLimit` string
            - `paymasterPostOpGasLimit` string
          - `userOpHash` string, required
          - `chainId` number, double, required
          - `entryPoint` string, required
          - `to` string, required
          - `smartAccountAddress` string, required
          - `gasEstimate` EvmGasEstimate, required
            - `gasCostWei` string, required
            - `gasCostNative` string, required
            - `nativeSymbol` string, required
            - `totalTransferAmountWei` string, required
            - `requiredSmartAccountBalanceWei` string, required
            - `gasCostToken` string
            - `gasCostTokenDecimals` number, double
          - `data` string, required
          - `value` string, required
          - `tokenAmount` string, required
  - `depositNeeded` string — How much more native ETH (wei) the SA needs before submission; "0" means already funded
  - `saCurrentBalance` string — Current SA native balance in wei

## Other responses

- `404` — Not found
- `409` — Bundle already submitted
- `422` — Validation Failed
- `500` — Internal Server Error

---

[API](https://skmtc.net/houdiniswap/apis/houdiniswap-backend.md) · [All operations](https://skmtc.net/houdiniswap/apis/houdiniswap-backend/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/houdiniswap/houdiniswap-backend/versions/2063dbc88d59/schema)
