Squid Router

/gettransaction

Get details of a transaction.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

transactionHash*

String

The transaction hash.

bridgeId*

String

https://api.expand.network/bridge/gettransaction?bridgeId=200&transactionHash=0x06477aa2bc628a40caeaae660c1ac0e3acb18b4131aae55525d591fafe0cbc7c

/getprice

Get the swap quotation for the given token pairs.

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

srcChainId

String

bridgeId*

String

dstChainId*

String

srcTokenSymbol*

String

Source token symbol.

dstTokenSymbol*

String

Destination token symbol.

amountIn*

String

Amount of token.

https://api.expand.network/bridge/getprice?bridgeId=200&srcTokenSymbol=WBTC&dstTokenSymbol=BNB&srcChainId=1&amountIn=100000&dstChainId=56

/chains

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

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

Query Parameters

Name
Type
Description

bridgeId*

String

rpc

String

Remote procedural call URL.

https://api.expand.network/bridge/chains?bridgeId=200

/tokens

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

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

Query Parameters

Name
Type
Description

bridgeId*

String

rpc

String

Remote procedural call URL.

chain*

String

https://api.expand.network/bridge/tokens?bridgeId=200&chain=1

/getroute

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

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

srcChainId

String

bridgeId*

String

dstChainId*

String

srcTokenSymbol*

String

Source token symbol.

dstTokenSymbol*

String

Destination token symbol.

amountIn*

String

Amount of token.

https://api.expand.network/bridge/getroute?bridgeId=200&dstChainId=137&srcTokenSymbol=ETH&dstTokenSymbol=USDC&amountIn=100000000000

/swap

Swap assets across multiple chains.

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

Request Body

Name
Type
Description

rpc

String

Remote procedural call URL.

bridgeId

String

srcChainId

String

dstChainId*

String

Destination chain id.

srcTokenSymbol*

String

Source Token Symbol.

dstTokenSymbol*

String

Destination Token Symbol.

amountIn*

String

Amount of token.

from*

String

Address of the sender of the token.

gas*

String

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

to*

String

Address of the recipient of the token.

gasPriority

String

low, medium, or high.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 10

{
    "bridgeId": "200",
    "srcChainId": "1",
    "dstChainId": "137",
    "srcTokenSymbol": "WETH",
    "dstTokenSymbol": "USDC",
    "amountIn": "100000000000000",
    "from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
    "gas": "920000",
    "to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994"
}

With gasPriority:

{
    "bridgeId": "200",
    "srcChainId": "1",
    "dstChainId": "137",
    "srcTokenSymbol": "WETH",
    "dstTokenSymbol": "USDC",
    "amountIn": "1000000000000",
    "from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
    "gas": "920000",
    "gasPriority": "medium",
    "to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994"
}

With slippage:

{
    "bridgeId": "200",
    "srcChainId": "1",
    "dstChainId": "137",
    "srcTokenSymbol": "WETH",
    "dstTokenSymbol": "MATIC",
    "amountIn": "1000000000000",
    "from": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
    "gas": "920000",
    "to": "0xa67E9B68c41b0f26184D64C26e0b2B81466E5994",
    "slippage": "3"
}

Last updated

#553: ENC-2526-LIDO

Change request updated