expand.network
  • Overview
  • Getting Started
  • 🔑How do I get my API Key?
  • 📑List of All Endpoints
  • ⚙️SDK
    • Overview
    • Getting Started
  • ⛓️INTEGRATIONS
    • ⚡Blockchains
      • EVM based blockchains
        • Ethereum
        • Binance Smart Chain
        • Avalanche - C
        • Avalanche - P
        • Avalanche - X
        • Polygon
        • Cronos
        • Arbitrum
        • Fantom
        • Optimism
        • Base
        • zkSync Era
        • Mantle
      • Non-EVM based chains
        • Tron
        • Solana
        • Near
        • Algorand
        • Aptos
        • Sui
        • Starknet
        • TON
        • Cosmos Hub
        • Osmosis
        • Stacks
        • Bitcoin
        • Stellar
          • Stellar RWA
        • XRP Ledger
          • XRP Ledger RWA
    • ⚡Bridges
      • Stargate
      • Stargate V2
      • Squid Router
      • Squid Router V2
      • Allbridge Classic
      • Allbridge Core
    • ⚡DEX & DEX Aggregators
      • Uniswap V2
      • Uniswap V3
      • Uniswap X
      • Sushiswap V2
      • PancakeSwap V2
      • PancakeSwap V3
      • Aerodrome
      • Camelot V3
      • Curve V2
      • Balancer V2
      • STON.fi
      • Trader Joe
      • Orca
      • Raydium
      • SDEX
      • Cetus
      • REF Finance
      • Liquidswap
      • Sologenic
      • Alex
      • 0x (Aggregator)
      • 1inch (Aggregator)
      • Kyberswap (Aggregator)
        • Kyberswap ( Limit Order Endpoints )
      • Jupiter (Aggregator)
    • ⚡Derivatives
      • dYdX V4
    • ⚡Fungible Tokens
      • ERC20
      • WETH
    • ⚡Lending Protocols
      • Aave V2
      • Aave V3
      • Compound V2
      • Compound V3
      • Morpho
    • ⚡Yield Aggregators
      • Yearn Finance V2
      • Harvest Finance
      • Pendle
    • ⚡Liquid Staking
      • Chorus One
      • Lido V2
      • Stader
      • Benqi
      • Jito
      • EigenLayer
    • ⚡Non Fungible Tokens
      • ERC721
      • ERC1155
      • Metaplex
    • ⚡Oracles
      • ChainLink
      • WinkLink
      • Pyth Network
      • RedStone
    • ⚡Stablecoins
      • EVM
    • ⚡Synthetics
      • Synthetix
    • ⚡Supported Wallets
      • MPC Wallets
        • DFNS
        • FORDEFI
        • FIREBLOCKS
        • CIRCLE
      • HD Wallets
        • PHANTOM
        • COINBASE
        • TON Wallet
      • Wallet Connect v2
  • How To
    • Execute a Local Swap
    • Execute a Cross Chain Swap
    • Use Limit Orders
    • Lend and Borrow
    • Provision Liquidity
      • Adding Liquidity
      • Removing liquidity
    • Yield Farm
    • Use Our Transaction Decoder
    • Submit an RFQ
    • Subscribe to Events
    • Stream Data (WebSocket)
      • Stream Transaction
      • Stream Trade
      • Stream Gas
      • Stream Ticker Price
    • Source Pricing
    • Track Memecoins
    • Manage Token Approvals
  • Use Cases
    • Trade Reconciliation
    • Portfolio Management
    • Trading Features
    • On-Chain Data: DEX Liquidity Pool Forensics
    • Transaction and Pool Analysis
  • Account Abstraction
    • Overview
      • User Endpoints
      • Paymaster Endpoint
      • Bundler Endpoint
    • ⚙️SDK - Overview
  • Additional Info
    • Error Messages
    • Client-Side Security Essentials
    • Compute Unit Costs
    • API Metadata
    • Audit Certificate
    • Brand Assets
    • FAQs
    • Quicknode Marketplace
      • DEX
      • Lending Protocols
  • ID's
    • Chain IDs
    • Bridge IDs
      • Internal Chain IDs for Bridges
    • DEX IDs
    • Lending Protocol IDs
    • Yield Aggregator ID
    • Liquid Staking IDs
    • Oracle IDs
    • Stablecoin IDs
    • Derivatives IDs
    • Synthetics IDs
  • Mapping
    • Blockchains
    • DEXs
      • Uniswap V2
      • Uniswap V3
      • Sushiswap
      • PancakeSwap
      • Curve
      • Balancer
    • Lending Protocols
      • Aave
      • Compound
  • Protocol Spender
    • Spender list
Powered by GitBook
On this page
  • /quoteaggregator
  • /swapaggregator
  1. INTEGRATIONS

Bridges

We are providing connectivity across multiple chains via Bridges.

Following are the common functions implemented for Bridge Protocol:

Name
Type
Description

getprice

Read

Get the swap quotation for the given token pairs.

getliquidity

Read

Get the balance of a particular token pair of an account.

gettransaction

Read

Get details of a transaction.

getsignature

Read

Retrieves the signature details using the transaction hash of swap.

getsupportedchains

Read

Get the list of chains supported by Squid Router, on expand.network.

getsupportedtokens

Read

Get the list of tokens supported by Squid Router, on the specified chain, on expand.network.

getroute

Read

Get the route details as to how the tokens will be bridged, token amount, etc.

Available on Squid Router

swap

Write

Swap assets across multiple chains.

unlock

Write

Initiate the transaction to unlock asset on the destination chain.

addliquidity

Write

Loan your assets to the specified bridge.

removeliquidity

Write

Remove user liquidity across multiple chains.

Read

Returns a list of all the quotes on different bridges.

Write

Returns the aggregated prepared swap quotes for every Bridges, in which the swap is present.

/quoteaggregator

Returns a list of all the quotes for a pool on different Bridges.

GET https://api.expand.network/bridge/quoteaggregator

Query Parameters

Name
Type
Description

srcChainId

String

srcTokenSymbol*

String

Source token symbol

dstChainId*

String

dstTokenSymbol*

String

Destination token symbol

amountIn*

String

Amount of source token.

excludedBridges

String

Comma-separated values of bridges to exclude.

https://api.expand.network/bridge/quoteaggregator?srcTokenSymbol=USDC&srcChainId=10&dstChainId=1&dstTokenSymbol=USDC&amountIn=10000000
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "bridgeId": "600",
            "bridgeName": "SquidRouterV2",
            "srcChainId": "10",
            "dstChainId": "1",
            "srcTokenSymbol": "USDC",
            "dstTokenSymbol": "USDC",
            "amountIn": "10000000",
            "amountsOut": [
                "10000000",
                "7054326"
            ]
        },
        {
            "bridgeId": "400",
            "bridgeName": "AllbridgeCore",
            "srcChainId": "10",
            "dstChainId": "1",
            "srcTokenSymbol": "USDC",
            "dstTokenSymbol": "USDC",
            "amountIn": "10000000",
            "amountsOut": [
                "10000000",
                "9990000"
            ]
        },
        {
            "bridgeId": "500",
            "bridgeName": "StargateV2",
            "srcChainId": "10",
            "dstChainId": "1",
            "srcTokenSymbol": "USDC",
            "dstTokenSymbol": "USDC",
            "amountIn": "10000000",
            "amountsOut": [
                "10000000",
                "9984999"
            ]
        }
    ]
}

/swapaggregator

Returns the aggregated prepared swap quotes for every Bridges, in which the swap is present.

POST https://api.expand.network/bridge/swapaggregator

Request Body

Name
Type
Description

srcChainId

String

srcTokenSymbol*

String

Source token symbol

dstChainId*

String

dstTokenSymbol*

String

Destination token symbol

amountIn*

String

Amount of source token.

from*

String

Address of the sender of the token.

to*

String

Address of the recipient of the token.

gas*

String

Maximum gas limit provided by the sender, for the transaction.

excludedBridges

String

Comma-separated values of bridges to exclude.

bestNetPrice

Boolean

If true, the endpoint will sort the prepared transactions by amountsOut minus the amount of gas in descending order. Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.

bestQuote

Boolean

If true, the endpoint will sort the prepared transactions by amountsOut (the best quote) in descending order Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.

lowestGas

Boolean

If true, the endpoint will sort the prepared transactions by amount of gas in ascending order Note: If you select "true" for the "bestQuote", "lowestGas" and "bestNetPrice" parameters, the "bestNetPrice" parameter will apply.

gasPriority

String

low, medium, or high.

{
    "srcChainId": "10",
    "dstChainId": "1",
    "srcTokenSymbol": "USDC",
    "dstTokenSymbol": "USDC",
    "amountIn": "10000000",
    "gas": "3000",
    "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    "cheapestSwap": false,
    "bestSwap": true,
    "bestNetPrice": false
}
{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "bridgeId": "400",
            "bridgeName": "AllbridgeCore",
            "chainId": "10",
            "gas": "3000",
            "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "to": "0x08391edF36f41f05d27A1e0fD7a29448417C1CD0",
            "value": "2979066141683504",
            "data": "0x7dfb08f10000000000000000000000000000000000000000000000000000000000989680000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa9604500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
            "amountsOut": "9990000",
            "estimationCheck": true,
            "referenceId": "7dc5c003b1474a6b8042be19029a19fd"
        },
        {
            "bridgeId": "500",
            "bridgeName": "StargateV2",
            "chainId": "10",
            "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "to": "0xcE8CcA271Ebc0533920C83d39F417ED6A0abB7D0",
            "value": "3275441876392045",
            "gas": "3000",
            "data": "0xc7c7f5b30000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000ba2ff3d86586d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000007595000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000989680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000",
            "amountsOut": "9984999",
            "estimationCheck": true,
            "referenceId": "7dc5c003b1474a6b8042be19029a19fd"
        }
    ]
}

With gasPriority:

{
    "srcChainId": "10",
    "dstChainId": "1",
    "srcTokenSymbol": "USDC",
    "dstTokenSymbol": "USDC",
    "amountIn": "10000000",
    "gas": "3000",
    "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    "to": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
    "cheapestSwap": false,
    "bestSwap": true,
    "bestNetPrice": false,
    "gasPriority": "medium"
}

With gasPriority:

{
    "status": 200,
    "msg": "success",
    "data": [
        {
            "bridgeId": "400",
            "bridgeName": "AllbridgeCore",
            "chainId": "10",
            "gas": "3000",
            "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "to": "0x08391edF36f41f05d27A1e0fD7a29448417C1CD0",
            "value": "2979066141683504",
            "data": "0x7dfb08f10000000000000000000000000000000000000000000000000000000000989680000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa9604500000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000",
            "gasPrice": "1200571",
            "amountsOut": "9990000",
            "estimationCheck": true,
            "referenceId": "0bf0efaaf78845b684dc360640c6b4a2"
        },
        {
            "bridgeId": "500",
            "bridgeName": "StargateV2",
            "chainId": "10",
            "from": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
            "to": "0xcE8CcA271Ebc0533920C83d39F417ED6A0abB7D0",
            "value": "3275441876392045",
            "gas": "3000",
            "data": "0xc7c7f5b30000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000ba2ff3d86586d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000007595000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000989680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010100000000000000000000000000000000000000000000000000000000000000",
            "gasPrice": "1200572",
            "amountsOut": "9984999",
            "estimationCheck": true,
            "referenceId": "0bf0efaaf78845b684dc360640c6b4a2"
        }
    ]
}
PreviousXRP Ledger RWANextStargate

Last updated 6 days ago

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

Refer to the page for details.

⛓️
⚡
Chain ID
Chain ID
Chain ID
Chain ID
quoteaggregator
swapaggregator