> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bridg.now/llms.txt
> Use this file to discover all available pages before exploring further.

# Build transaction

> Turn a quote into the unsigned transactions a wallet signs. Pass `quoteId` to build a row other than `best`. `steps` is every transaction to sign, in order; only `main` moves the order. A deposit-address venue returns `deposit` instead of `steps`. `expectedOutAtomic` equals the `amountOutAtomic` of the row you built. Idempotent per `decisionId`.



## OpenAPI

````yaml openapi/openapi.json POST /bridge/build
openapi: 3.1.0
info:
  title: Bridg API
  version: 1.0.0
  description: >-
    Quote, build, submit and track cross-chain transfers across every venue
    Bridg aggregates.
servers:
  - url: https://api.bridg.now/v1
security: []
paths:
  /bridge/build:
    post:
      tags:
        - bridge
      summary: Build transaction
      description: >-
        Turn a quote into the unsigned transactions a wallet signs. Pass
        `quoteId` to build a row other than `best`. `steps` is every transaction
        to sign, in order; only `main` moves the order. A deposit-address venue
        returns `deposit` instead of `steps`. `expectedOutAtomic` equals the
        `amountOutAtomic` of the row you built. Idempotent per `decisionId`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                decisionId:
                  type: string
                  pattern: >-
                    ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
                venue:
                  type: string
                  minLength: 1
                  maxLength: 40
                quoteId:
                  type: string
                  minLength: 1
                  maxLength: 200
                privacy:
                  type: boolean
                  default: false
                userIp:
                  anyOf:
                    - type: string
                      format: ip
                    - type: string
                      format: ip
              required:
                - decisionId
            example:
              decisionId: fb0798dc-97d2-41f2-8786-ace0b1c40722
      responses:
        '200':
          description: The transfer id and the unsigned steps
          content:
            application/json:
              schema:
                type: object
                properties:
                  transferId:
                    type: string
                  venue:
                    type: string
                  steps:
                    type: array
                    items:
                      oneOf:
                        - type: object
                          properties:
                            vm:
                              type: string
                              enum:
                                - evm
                            step:
                              type: string
                              enum:
                                - approve
                                - fee
                                - main
                                - redeem
                            chainId:
                              type: integer
                            to:
                              type: string
                            data:
                              type: string
                            value:
                              type: string
                            gasLimit:
                              type: string
                          required:
                            - vm
                            - step
                            - chainId
                            - to
                            - data
                            - value
                        - type: object
                          properties:
                            vm:
                              type: string
                              enum:
                                - svm
                            step:
                              type: string
                              enum:
                                - approve
                                - fee
                                - main
                                - redeem
                            serializedTx:
                              type: string
                            encoding:
                              type: string
                              enum:
                                - base64
                                - hex
                            version:
                              type: string
                              enum:
                                - v0
                                - legacy
                            setPriorityFee:
                              type: boolean
                            refreshBlockhash:
                              type: boolean
                          required:
                            - vm
                            - step
                            - serializedTx
                            - encoding
                            - version
                            - setPriorityFee
                            - refreshBlockhash
                        - type: object
                          properties:
                            vm:
                              type: string
                              enum:
                                - deposit-address
                            step:
                              type: string
                              enum:
                                - approve
                                - fee
                                - main
                                - redeem
                            venueChainId:
                              type: string
                            address:
                              type: string
                            memo:
                              type: string
                            tokenAddress:
                              type: string
                              nullable: true
                            exactAmountAtomic:
                              type: string
                            expiresAt:
                              type: integer
                          required:
                            - vm
                            - step
                            - venueChainId
                            - address
                            - tokenAddress
                            - exactAmountAtomic
                            - expiresAt
                        - type: object
                          properties:
                            vm:
                              type: string
                              enum:
                                - sign
                            step:
                              type: string
                              enum:
                                - approve
                                - fee
                                - main
                                - redeem
                            scheme:
                              type: string
                              enum:
                                - eip712
                                - eip191
                                - ed25519
                                - nep413
                            payload:
                              nullable: true
                          required:
                            - vm
                            - step
                            - scheme
                        - type: object
                          properties:
                            vm:
                              type: string
                              enum:
                                - utxo
                            step:
                              type: string
                              enum:
                                - approve
                                - fee
                                - main
                                - redeem
                            outputs:
                              type: array
                              items:
                                type: object
                                properties:
                                  address:
                                    type: string
                                  valueSats:
                                    type: string
                                required:
                                  - address
                                  - valueSats
                            memo:
                              type: string
                            feeRateSatsPerVbyte:
                              type: number
                          required:
                            - vm
                            - step
                            - outputs
                        - oneOf:
                            - type: object
                              properties:
                                vm:
                                  type: string
                                  enum:
                                    - tron
                                step:
                                  type: string
                                  enum:
                                    - approve
                                    - fee
                                    - main
                                    - redeem
                                kind:
                                  type: string
                                  enum:
                                    - call
                                contract:
                                  type: string
                                data:
                                  type: string
                                callValueSun:
                                  type: string
                                feeLimitSun:
                                  type: string
                                  nullable: true
                              required:
                                - vm
                                - step
                                - kind
                                - contract
                                - data
                                - callValueSun
                                - feeLimitSun
                            - type: object
                              properties:
                                vm:
                                  type: string
                                  enum:
                                    - tron
                                step:
                                  type: string
                                  enum:
                                    - approve
                                    - fee
                                    - main
                                    - redeem
                                kind:
                                  type: string
                                  enum:
                                    - transfer
                                toAddress:
                                  type: string
                                amountSun:
                                  type: string
                              required:
                                - vm
                                - step
                                - kind
                                - toAddress
                                - amountSun
                            - type: object
                              properties:
                                vm:
                                  type: string
                                  enum:
                                    - tron
                                step:
                                  type: string
                                  enum:
                                    - approve
                                    - fee
                                    - main
                                    - redeem
                                kind:
                                  type: string
                                  enum:
                                    - built
                                raw:
                                  nullable: true
                              required:
                                - vm
                                - step
                                - kind
                        - type: object
                          properties:
                            vm:
                              type: string
                              enum:
                                - unsupported
                            step:
                              type: string
                              enum:
                                - main
                            reason:
                              type: string
                          required:
                            - vm
                            - step
                            - reason
                  deposit:
                    type: object
                    properties:
                      address:
                        type: string
                      amountAtomic:
                        type: string
                      memo:
                        type: string
                      deadlineMs:
                        type: integer
                      tokenAddress:
                        type: string
                        nullable: true
                      chainKey:
                        type: string
                    required:
                      - address
                      - amountAtomic
                      - deadlineMs
                      - tokenAddress
                      - chainKey
                  expiresAt:
                    type: integer
                  amountInAtomic:
                    type: string
                  expectedOutAtomic:
                    type: string
                  minOutAtomic:
                    type: string
                  feeCapture:
                    type: string
                    enum:
                      - venue-param
                      - merged
                      - separate-step
                      - batch
                      - none
                  referralCapture:
                    type: string
                    nullable: true
                    enum:
                      - merged
                      - batch
                      - none
                      - null
                  feeBasis:
                    type: string
                    enum:
                      - carved
                      - added
                  feeBatch:
                    type: object
                    properties:
                      chainId:
                        type: integer
                      stepIndexes:
                        type: array
                        items:
                          type: integer
                    required:
                      - chainId
                      - stepIndexes
                  requoted:
                    type: boolean
                  requote:
                    type: object
                    properties:
                      basis:
                        type: string
                        enum:
                          - netOutAtomic
                          - amountOutAtomic
                          - amountInAtomic
                      originalAmount:
                        type: string
                      freshAmount:
                        type: string
                      driftBps:
                        type: integer
                    required:
                      - basis
                      - originalAmount
                      - freshAmount
                      - driftBps
                  boardDrift:
                    type: object
                    properties:
                      corridorKey:
                        type: string
                      boardAmountOutAtomic:
                        type: string
                      firmAmountOutAtomic:
                        type: string
                      driftBps:
                        type: integer
                      boardAgeMs:
                        type: integer
                    required:
                      - corridorKey
                      - boardAmountOutAtomic
                      - firmAmountOutAtomic
                      - driftBps
                      - boardAgeMs
                required:
                  - transferId
                  - venue
                  - steps
                  - expiresAt
                  - amountInAtomic
                  - expectedOutAtomic
                  - minOutAtomic
                  - feeCapture
                  - referralCapture
                  - feeBasis
                  - requoted
              example:
                transferId: ca0e5dee-be62-4a8d-aab9-3c8762b29281
                venue: across
                steps:
                  - vm: evm
                    step: approve
                    chainId: 8453
                    to: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                    data: >-
                      0x095ea7b300000000000000000000000028b5a0e9c621a5badaa536219b3a228c8168cf5d0000000000000000000000000000000000000000000000000000000005f51db0
                    value: '0'
                  - vm: evm
                    step: fee
                    chainId: 8453
                    to: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913'
                    data: >-
                      0xa9059cbb00000000000000000000000058e602386db134b1f9b1d6d390c11a2b7b486677000000000000000000000000000000000000000000000000000000000000c350
                    value: '0'
                  - vm: evm
                    step: main
                    chainId: 8453
                    to: '0x28b5a0e9C621a5BadaA536219b3a228C8168cf5d'
                    value: '0'
                    data: >-
                      0x8e0250ee0000000000000000000000000000000000000000000000000000000005f51db00000000000000000000000000000000000000000000000000000000000000005f83ed8a61fb15505c93de93dffdc5e0d7c573df3f2bc3231c35312da4af16fc2000000000000000000000000833589fcd6edb6e08f4c7c32d4f71b54bda02913caa0da1eec44e89949baa43ecd3fde9fa3b551c53f9dba7492caa875cfa5c47400000000000000000000000000000000000000000000000000000000000032c200000000000000000000000000000000000000000000000000000000000003e81dc0de02c873c0de
                expiresAt: 1789929586118
                amountInAtomic: '99950000'
                expectedOutAtomic: '99937006'
                minOutAtomic: '99937006'
                feeCapture: batch
                referralCapture: null
                feeBasis: carved
                feeBatch:
                  chainId: 8453
                  stepIndexes:
                    - 0
                    - 1
                    - 2
                permit: null
                relayFeePermit: null
                spotTransfer: null
                requoted: false
        '400':
          description: >-
            Malformed request, an unknown asset, or a signed transaction that is
            not what we built
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                      retryAfterMs:
                        type: integer
                    required:
                      - code
                      - message
                required:
                  - error
        '404':
          description: No such decision or transfer, or the aggregator is switched off
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                      retryAfterMs:
                        type: integer
                    required:
                      - code
                      - message
                required:
                  - error
        '409':
          description: >-
            The decision is indicative, the quote expired or drifted, the venue
            is ineligible, or execution is switched off
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                      retryAfterMs:
                        type: integer
                    required:
                      - code
                      - message
                required:
                  - error
        '429':
          description: Rate limited; retry after `retryAfterMs`
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                      retryAfterMs:
                        type: integer
                    required:
                      - code
                      - message
                required:
                  - error
        '502':
          description: The venue refused to build, or the broadcast was rejected
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details:
                        type: object
                        additionalProperties:
                          nullable: true
                      retryAfterMs:
                        type: integer
                    required:
                      - code
                      - message
                required:
                  - error

````