---
title: "POST /v2/build-tx"
method: POST
path: "/v2/build-tx"
tags: ["Server"]
---

# POST /v2/build-tx

`POST /v2/build-tx`

## Headers

- `API-KEY` string

## Request body

- SingleTxDTO
  - `route` Route, required
    - `routeId` string, required — Unique id for each route.
    - `fromAmount` string, required — Sending token amount.
    - `chainGasBalances` ChainGasBalances, required
    - `toAmount` string, required — Approximate receiving token amount.
    - `usedBridgeNames` string[], required — Array of bridges used in the route
    - `totalUserTx` number, required — Total number of transactions for the route.
    - `totalGasFeesInUsd` number, required — Combined USD gas fees for all transactions in the route.
    - `sender` string, required — Address of user making the transactions.
    - `userTxs` object[], required — Array of user transactions.
    - `serviceTime` number, required — Estimate of total time in seconds, excluding the transaction time.

## Response `200`

Get the tx details for the route.

- SingleTxOutputDTO
  - `success` boolean, required — Status of API.
  - `result` SingleTxResponse, required
    - `userTxType` 'approve' | 'fund-movr' | 'claim' | 'dex-swap' | 'sign', required — Type of user transaction.
    - `txTarget` string, required — Address to which transaction has to be sent.
    - `chainId` 'ETHEREUM' | 'OPTIMISM' | 'BSC' | 'XDAI' | 'POLYGON' | 'FANTOM' | 'ARBITRUM' | 'AVALANCHE', required — Id of chain where transaction has to be sent.
    - `txData` string, required — Calldata for transaction.
    - `txType` 'eth_sendTransaction' | 'eth_signMessage', required — Type of transaction.
    - `value` string, required — Native token amount to be sent with transaction.
    - `totalUserTx` number, required — Total number of transactions in Active Route.
    - `approvalData` ApprovalData, required
      - `minimumApprovalAmount` string, required — Minimum amount of approval needed.
      - `approvalTokenAddress` string, required — Address of token for which approval is required.
      - `allowanceTarget` string, required — Contract address that needs approval.
      - `owner` string, required — Address of owner.

## Other responses

- `201`

---

[API](https://skmtc.net/swaprhq/apis/movr-aggregator-api.md) · [All operations](https://skmtc.net/swaprhq/apis/movr-aggregator-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/swaprhq/movr-aggregator-api/revisions/8b1957cc0e8f/schema)
