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

# Build swap transaction (returns signing-ready payload)



## OpenAPI

````yaml /openapi.json post /api/swaps/build
openapi: 3.1.0
info:
  title: WalletSuite REST API
  description: >-
    Multi-chain wallet operations, balances, prices, and transaction lifecycle
    as a REST API.
  contact:
    name: WalletSuite
    url: https://walletsuite.io
  version: prod
servers:
  - url: https://api.walletsuite.io
    description: WalletSuite API
security:
  - ApiKeyAuth: []
tags:
  - name: Transactions
    description: >-
      Get transaction history by address, check live transaction status, and
      send signed transactions.
  - name: Fees
    description: Fee estimation endpoints
  - name: Balances
    description: Fetch balances on any supported chain (Ethereum, Tron).
  - name: Assets
    description: >-
      List supported blockchain assets from the database loaded at startup from
      bundled resources
  - name: Asset Status
    description: Asset enablement and restrictions.
  - name: Prices
    description: Fiat prices for symbols and contract addresses
  - name: Swaps
    description: Swap quote, route, and transaction building.
  - name: Approvals
    description: Allowance, approval tx data, and approval status.
  - name: NFTs
    description: NFT collections, tokens, owners, and transfer building.
  - name: Staking
    description: Native staking APR, validators, positions, and transaction building.
  - name: Name Service
    description: Name resolution and reverse resolution.
  - name: Chains
    description: Chain registry and chain capabilities.
  - name: Chain Specific
    description: Chain specific endpoints consumable by SDK.
  - name: Blocks
    description: View most recently indexed block information.
  - name: Info
    description: General information and summary counts.
paths:
  /api/swaps/build:
    post:
      tags:
        - Swaps
      summary: Build swap transaction (returns signing-ready payload)
      operationId: build
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapBuildRequestDto'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiResponseSwapQuote'
components:
  schemas:
    SwapBuildRequestDto:
      type: object
      description: Build request — finalize a quote into a signing-ready payload.
      properties:
        quoteId:
          type: string
          description: Quote id returned by `/api/swaps/quote`.
        nonce:
          type: integer
          description: Optional EVM account nonce override.
        priorityFeeMultiplier:
          type: number
          format: double
          description: Optional EIP-1559 tip multiplier in [0.1, 10.0].
          example: '1.2'
      required:
        - quoteId
    ApiResponseSwapQuote:
      type: object
      properties:
        ok:
          type: boolean
        code:
          type: string
        message:
          type: string
        data:
          $ref: '#/components/schemas/SwapQuote'
      required:
        - code
        - message
        - ok
    SwapQuote:
      type: object
      properties:
        provider:
          type: string
          enum:
            - 1inch
            - 0x
            - paraswap
            - kyberswap
            - openocean
            - lifi
            - odos
            - jupiter
            - thorchain
            - mayachain
            - rango
            - squid
            - mayan
            - chainflip
            - aggregator
        srcChain:
          type: string
        dstChain:
          type: string
        srcToken:
          type: string
        dstToken:
          type: string
        srcAmount:
          type: integer
        dstAmount:
          type: integer
        minDstAmount:
          type: integer
        priceImpactBps:
          type: integer
          format: int32
        estimatedGas:
          type: integer
        gasUsd:
          type: number
        estimatedDurationSec:
          type: integer
          format: int32
        approvalSpender:
          type: string
        tx:
          $ref: '#/components/schemas/SwapTxPayload'
        rawProviderRef:
          type: string
        expiresAt:
          type: string
          format: date-time
        fees:
          $ref: '#/components/schemas/SwapFees'
        warnings:
          type: array
          items:
            type: string
        notes:
          type: string
      required:
        - dstAmount
        - dstChain
        - dstToken
        - expiresAt
        - fees
        - minDstAmount
        - provider
        - rawProviderRef
        - srcAmount
        - srcChain
        - srcToken
        - warnings
    SwapTxPayload:
      type: object
      properties:
        type:
          type: string
          enum:
            - EVM
            - COSMOS
            - BTC
            - SOLANA
            - TRON
        chain:
          type: string
        chainId:
          type: integer
          format: int64
        from:
          type: string
        to:
          type: string
        data:
          type: string
        valueWei:
          type: integer
        gasLimit:
          type: integer
        maxPriorityFeePerGas:
          type: integer
        maxFeePerGas:
          type: integer
        gasPrice:
          type: integer
        nonce:
          type: integer
        memo:
          type: string
        approvalRequired:
          type: boolean
        approvalSpender:
          type: string
        approvalToken:
          type: string
        approvalAmount:
          type: integer
        solanaTransactionBase64:
          type: string
        depositAddress:
          type: string
        depositExpiresAt:
          type: string
          format: date-time
      required:
        - approvalRequired
        - chain
        - from
        - to
        - type
    SwapFees:
      type: object
      properties:
        total:
          type: integer
        totalBps:
          type: integer
          format: int32
        integratorBps:
          type: integer
          format: int32
        integratorAmount:
          type: integer
        protocolBps:
          type: integer
          format: int32
        protocolAmount:
          type: integer
        gasBaseFee:
          type: integer
        outboundFee:
          type: integer
        liquidityFee:
          type: integer
        priceImpactBps:
          type: integer
          format: int32
        feeAsset:
          type: string
      required:
        - integratorBps
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: API key provided by WalletSuite team
      name: x-api-key
      in: header

````