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.

Write

Returns the approve and swap transaction on a DEX supported by Expand.

Read

Returns a list of all the tokens on different Bridges.

/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

Refer to the Chain ID page for details.

srcTokenSymbol*

String

Source token symbol

dstChainId*

String

Refer to the Chain ID page for details.

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

/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

Refer to the Chain ID page for details.

srcTokenSymbol*

String

Source token symbol

dstChainId*

String

Refer to the Chain ID page for details.

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
}

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"
}

/swapwithapproval

Returns the approve and swap transaction on a DEX supported by Expand.

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

Request Body

Name
Type
Description

bridgeId

String

Refer to the Bridge_ID page for details.

amountIn*

String

Amount of src token

amountOutMin*

String

Minimum amount accepted as the result of the swap.

srcChainId*

String

The unique chain ID to specify the source chain.

srcTokenSymbol

String

Symbol of the token to swap.

dstChainId

String

The unique chain ID to specify the destination chain.

dstTokenSymbol

String

Symbol of the token to be received after the swap.

from

String

Address of the token sender.

to

String

Address of the token recipient.

enableFee

String

Flag to include a basis points fee transaction alongside the main transaction when set to true.

gasPriority

String

Specifies the priority level for gas fees (e.g., 'low', 'medium', or 'high'), which influences the transaction speed and cost.

gas

String

Maximum gas to be approved for the transaction.

slippage

String

Percentage of total swap value allowed for slippage. Default is 1 (0 <= slippage <= 100).

{
  "bridgeId": "600",
  "srcChainId": "1",
  "dstChainId": "1",
  "srcTokenSymbol": "USDT",
  "dstTokenSymbol": "ETH",
  "amountIn": "10000",
  "amountOutMin": "0",
  "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
  "gasPriority": "low",
  "srcChainSymbol": "ETH"
}

/tokens

Returns a list of all the tokens on different Bridges.

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

https://api.expand.network/bridge/tokens

Last updated