---
title: "Aggregate Bridge Swap"
method: POST
path: "/defi/v1/bridge/swaps"
tags: ["bridge"]
---

# Aggregate Bridge Swap

`POST /defi/v1/bridge/swaps`

Aggregates swap quotes from all bridges supporting a specified token pair. It allows users to customize their query to prioritize either the best output or the lowest gas costs. The response provides detailed transaction data including bridge identifiers, output amounts, swap routing parameters (such as call data), gas estimates, and a reference, enabling traders to compare and select the most efficient swap route for their needs.

> 💡 
**Compute Unit Value:** `95` (Fixed)

## Request body

- BridgeSwapaggregatorRequest — The request body for a /defi/v1/bridge/swaps
  - `srcChainId` string — The unique chain ID to specify the source chain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-chains).
  - `dstChainId` string, required — The unique chain ID to specify the destination chain. Find more [here](https://docs.blockdaemon.com/docs/defi-api-supported-protocols#supported-chains).
  - `srcChainSymbol` string — Symbol of the source chain.
  - `srcTokenSymbol` string — Symbol of the token to swap.
  - `dstTokenSymbol` string — Symbol of the token to be received after the swap.
  - `amountIn` string, required — Amount of the token to be swapped.
  - `srcTokenAddress` string — Address of the source token.
  - `dstTokenAddress` string — Address of the destination token.
  - `from` string, required — Address of the sender of the token.
  - `gas` string — Maximum gas to be approved for the transaction.
  - `to` string, required — Address of the recipient of the token.
  - `excludedBridges` string — Comma-separated values of bridges to exclude.
  - `bestNetPrice` boolean — If true, sorts prepared transactions by net value (amountsOut minus gas) in descending order. If multiple sort parameters are true, bestNetPrice takes precedence.
  - `bestQuote` boolean — If true, sorts prepared transactions by amountsOut in descending order. If multiple sort parameters are true, bestNetPrice takes precedence.
  - `lowestGas` boolean — If true, sorts prepared transactions by gas cost in ascending order. If multiple sort parameters are true, bestNetPrice takes precedence.
  - `gasPriority` string — Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.
  - `enableFee` boolean — Flag to include a basis points fee transaction alongside the main transaction when set to true.
  - `batchOption` 'EIP-5792' | 'EIP-7702' — undefined
  - `batcherContract` string — The EOA address of the batcher that will be used to execute the transaction when using EIP-7702 batching. If not provided, the default batcher contract for the chain will be used.

## Response `200`

Successful response

- object
  - `status` number — Numeric status code indicating success or failure of the API call
  - `msg` string — Human-readable message describing the API result or error
  - `data` union
    - object[]
      - `bridgeId` string, required — Unique identifier for a bridge service
      - `bridgeName` string, required — Human-readable bridge service name
      - `chainId` string, required — Blockchain network identifier (EVM chain ID, Solana chain name, etc.)
      - `from` string, required — Sender's wallet address
      - `to` string, required — Recipient's wallet address
      - `value` string, required — Amount being transferred or involved in a transaction
      - `gas` string, required — Gas limit for the transaction
      - `data` string, required — Main payload object or array returned by the API
      - `gasPrice` string — Price per gas unit for the transaction
      - `amountsOut` string, required — Expected output amounts from swaps or conversions
      - `estimationCheck` union, required — Flag or value indicating transaction fee/estimate status
        - string
        - boolean
      - `referenceId` string, required — Unique ID for tracking a specific transaction or operation
    - object
      - `createFeeTxn` object, required
        - `chainId` string, required — Blockchain network identifier (EVM chain ID, Solana chain name, etc.)
        - `from` string, required — Sender's wallet address
        - `to` string, required — Recipient's wallet address
        - `value` string, required — Amount being transferred or involved in a transaction
        - `gasPrice` string — Price per gas unit for the transaction
        - `gas` string, required — Gas limit for the transaction
      - `swapaggregatorTxn` object[], required
        - `bridgeId` string, required — Unique identifier for a bridge service
        - `bridgeName` string, required — Human-readable bridge service name
        - `chainId` string, required — Blockchain network identifier (EVM chain ID, Solana chain name, etc.)
        - `from` string, required — Sender's wallet address
        - `to` string, required — Recipient's wallet address
        - `value` string, required — Amount being transferred or involved in a transaction
        - `gas` string, required — Gas limit for the transaction
        - `data` string, required — Main payload object or array returned by the API
        - `gasPrice` string — Price per gas unit for the transaction
        - `amountsOut` string, required — Expected output amounts from swaps or conversions
        - `estimationCheck` union, required — Flag or value indicating transaction fee/estimate status
          - string
          - boolean
        - `referenceId` string, required — Unique ID for tracking a specific transaction or operation
    - object[]
      - `from` string, required
      - `bridgeName` string, required
      - `chainId` string, required
      - `amountsOut` string, required
      - `referenceId` string, required
      - `methodUsed` 'EIP-5792' | 'EIP-7702', required
      - `calls` object[], required
        - `to` string, required
        - `value` string, required
        - `data` string, required

---

[API](https://skmtc.dev/blockdaemon/apis/staking-api.md) · [All operations](https://skmtc.dev/blockdaemon/apis/staking-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/blockdaemon/staking-api/revisions/f94e296a08a3/schema)
