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

# Build fast fill

> Turns a fast fill quote into what the user signs. `steps` ends with one `vm: "sign"` step whose `payload` holds an EIP-712 message: sign `domain`, `types`, `primaryType` and `message` with `eth_signTypedData_v4` from the wallet in `owner`. For a token that is not USDC, `steps` can start with one `approve` to Permit2, which the wallet sends once; later fast fills of that token need only the signature. A quote from `POST /bridge/quote` is refused with `not_fast_fill`. Building the same `decisionId` again returns the same transfer.



## OpenAPI

````yaml openapi/openapi.json POST /fastfill/build
openapi: 3.1.0
info:
  title: BRDG API
  version: 1.0.0
  description: >-
    Quote, build, submit and track cross-chain transfers across every venue BRDG
    aggregates.
servers:
  - url: https://api.brdg.now/v1
security: []
paths:
  /fastfill/build:
    post:
      tags:
        - fastfill
      summary: Build fast fill
      description: >-
        Turns a fast fill quote into what the user signs. `steps` ends with one
        `vm: "sign"` step whose `payload` holds an EIP-712 message: sign
        `domain`, `types`, `primaryType` and `message` with
        `eth_signTypedData_v4` from the wallet in `owner`. For a token that is
        not USDC, `steps` can start with one `approve` to Permit2, which the
        wallet sends once; later fast fills of that token need only the
        signature. A quote from `POST /bridge/quote` is refused with
        `not_fast_fill`. Building the same `decisionId` again returns the same
        transfer.
      parameters:
        - name: X-BRDG-Api-Key
          in: header
          required: false
          description: >-
            Optional partner key for server integrators. With it, each wallet is
            rate limited under the partner rather than on the IP of the calling
            server (a call naming no wallet, per the `userIp` in the body),
            bounded by a partner-wide ceiling. Unknown or disabled keys are
            refused with 401. See [rate limits](/api-reference/rate-limits).
          schema:
            type: string
      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}$
                  description: The `decisionId` from the fast fill quote response.
                venue:
                  type: string
                  minLength: 1
                  maxLength: 40
                quoteId:
                  type: string
                  minLength: 1
                  maxLength: 200
                  description: Build this quote instead of `best`.
                userIp:
                  anyOf:
                    - type: string
                      format: ip
                    - type: string
                      format: ip
                atomicBatch:
                  type: boolean
                  description: >-
                    Optional, `false` when omitted. Send `true` only when the
                    wallet will submit every returned step together as ONE
                    atomic EIP-5792 bundle (`wallet_sendCalls` with
                    `atomicRequired`). Then a route that can carry the fee that
                    way returns a `fee` step beside the bridge step, listed in
                    `feeBatch`. Otherwise the build returns no `fee` step, and
                    the fee rides the venue's own transaction or is not charged.
                    A transfer from Tron never carries a `fee` step.
              required:
                - decisionId
            example:
              decisionId: 5c7e4e05-1d2a-4f0b-9c3e-7a1b2c3d4e5f
      responses:
        '200':
          description: The transfer id and its signature step
          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
                  permit:
                    type: object
                    nullable: true
                    properties:
                      kind:
                        type: string
                        enum:
                          - hypercore_deposit
                      owner:
                        type: string
                      spender:
                        type: string
                      valueAtomic:
                        type: string
                      nonce:
                        type: string
                      deadline:
                        type: string
                      typedData:
                        type: object
                        properties:
                          domain:
                            type: object
                            properties:
                              name:
                                type: string
                              version:
                                type: string
                              chainId:
                                type: integer
                              verifyingContract:
                                type: string
                            required:
                              - name
                              - version
                              - chainId
                              - verifyingContract
                          types:
                            type: object
                            additionalProperties:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - name
                                  - type
                          primaryType:
                            type: string
                            enum:
                              - Permit
                          message:
                            type: object
                            properties:
                              owner:
                                type: string
                              spender:
                                type: string
                              value:
                                type: string
                              nonce:
                                type: string
                              deadline:
                                type: string
                            required:
                              - owner
                              - spender
                              - value
                              - nonce
                              - deadline
                        required:
                          - domain
                          - types
                          - primaryType
                          - message
                    default: null
                    required:
                      - kind
                      - owner
                      - spender
                      - valueAtomic
                      - nonce
                      - deadline
                      - typedData
                  relayFeePermit:
                    type: object
                    nullable: true
                    properties:
                      kind:
                        type: string
                        enum:
                          - hypercore_relay_fee
                      owner:
                        type: string
                      spender:
                        type: string
                      valueAtomic:
                        type: string
                      nonce:
                        type: string
                      deadline:
                        type: string
                      typedData:
                        type: object
                        properties:
                          domain:
                            type: object
                            properties:
                              name:
                                type: string
                              version:
                                type: string
                              chainId:
                                type: integer
                              verifyingContract:
                                type: string
                            required:
                              - name
                              - version
                              - chainId
                              - verifyingContract
                          types:
                            type: object
                            additionalProperties:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - name
                                  - type
                          primaryType:
                            type: string
                            enum:
                              - Permit
                          message:
                            type: object
                            properties:
                              owner:
                                type: string
                              spender:
                                type: string
                              value:
                                type: string
                              nonce:
                                type: string
                              deadline:
                                type: string
                            required:
                              - owner
                              - spender
                              - value
                              - nonce
                              - deadline
                        required:
                          - domain
                          - types
                          - primaryType
                          - message
                    default: null
                    required:
                      - kind
                      - owner
                      - spender
                      - valueAtomic
                      - nonce
                      - deadline
                      - typedData
                  spotTransfer:
                    type: object
                    nullable: true
                    properties:
                      kind:
                        type: string
                        enum:
                          - hypercore_spot_transfer
                      account:
                        type: string
                      amount:
                        type: string
                      nonce:
                        type: integer
                      signatureChainId:
                        type: string
                      typedData:
                        type: object
                        properties:
                          domain:
                            type: object
                            properties:
                              name:
                                type: string
                              version:
                                type: string
                              chainId:
                                type: integer
                              verifyingContract:
                                type: string
                            required:
                              - name
                              - version
                              - chainId
                              - verifyingContract
                          types:
                            type: object
                            additionalProperties:
                              type: array
                              items:
                                type: object
                                properties:
                                  name:
                                    type: string
                                  type:
                                    type: string
                                required:
                                  - name
                                  - type
                          primaryType:
                            type: string
                            enum:
                              - HyperliquidTransaction:UsdClassTransfer
                          message:
                            type: object
                            properties:
                              hyperliquidChain:
                                type: string
                                enum:
                                  - Mainnet
                              amount:
                                type: string
                              toPerp:
                                type: boolean
                              nonce:
                                type: integer
                            required:
                              - hyperliquidChain
                              - amount
                              - toPerp
                              - nonce
                        required:
                          - domain
                          - types
                          - primaryType
                          - message
                    default: null
                    required:
                      - kind
                      - account
                      - amount
                      - nonce
                      - signatureChainId
                      - typedData
                  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: 6f1d2c0a-4b7e-4c55-9a1e-2f0e8c3b7d41
                venue: relay
                steps:
                  - vm: sign
                    step: main
                    scheme: eip712
                    payload:
                      owner: '0x58E602386DB134b1F9B1d6d390C11A2B7b486677'
                      domain:
                        name: USD Coin
                        version: '2'
                        chainId: 8453
                        verifyingContract: '0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913'
                      types:
                        ReceiveWithAuthorization:
                          - name: from
                            type: address
                          - name: to
                            type: address
                          - name: value
                            type: uint256
                          - name: validAfter
                            type: uint256
                          - name: validBefore
                            type: uint256
                          - name: nonce
                            type: bytes32
                      primaryType: ReceiveWithAuthorization
                      message:
                        from: '0x58E602386DB134b1F9B1d6d390C11A2B7b486677'
                        to: '0xccc88a9d1b4ed6b0eaba998850414b24f1c315be'
                        value: '10000000'
                        validAfter: 0
                        validBefore: 1791484288
                        nonce: >-
                          0x8ee9dabf3ef81e81899d9c395fa7d681a7435a88d0deb19916b7b9db027a8f53
                      venueSubmit:
                        endpoint: /execute/permits
                        body:
                          kind: eip3009
                          requestId: >-
                            0x17914836885153788c87ec28425d97ef85bd8916e6bb58e8a52d45c0fd169cd6
                          api: swap
                expiresAt: 1791483388000
                amountInAtomic: '10000000'
                expectedOutAtomic: '9968392'
                minOutAtomic: '9769024'
                requoted: false
                feeCapture: venue-param
                referralCapture: null
                feeBasis: carved
        '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
        '401':
          description: >-
            An `X-BRDG-Api-Key` header was sent and the key is unknown
            (`invalid_api_key`) or disabled (`api_key_disabled`)
          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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.