Stargate V2

/getsupportedchains

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

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

Query Parameters

Name
Type
Description

bridgeId*

String

Refer to the Bridge ID page for details.

rpc

String

Remote procedural call URL.

https://api.expand.network/bridge/getsupportedchains?bridgeId=500

/getsupportedtokens

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

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

Query Parameters

Name
Type
Description

bridgeId*

String

Refer to the Bridge ID page for details.

rpc

String

Remote procedural call URL.

chainId*

String

Refer to the Chain ID page for details.

https://api.expand.network/bridge/getsupportedtokens?bridgeId=500&chainId=1

/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.

amountIn*

String

Address of the pool.

address

String

Sender's public address.

srcChainId

String

Refer to the Chain ID page for details.

bridgeId

String

Refer to the Bridge ID page for details.

dstChainId*

String

Destination Chain ID.

srcTokenSymbol*

String

Source token symbol

dstTokenSymbol*

String

Destination token symbol

https://api.expand.network/bridge/getprice?bridgeId=500&srcTokenSymbol=USDC&srcChainId=8453&amountIn=100000000&dstChainId=42161&dstTokenSymbol=USDC

/getliquidity

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

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

Query Parameters

Name
Type
Description

rpc

String

Remote procedural call URL.

srcTokenSymbol*

String

Source Token symbol

address

String

Sender's public address.

srcChainId

String

Refer to the Chain ID page for details.

bridgeId

String

Refer to the Bridge ID page for details.

https://api.expand.network/bridge/getliquidity?bridgeId=500&srcTokenSymbol=USDC&srcChainId=1&address=0x384897A791f1553e0eB852Cac4476dd72e0794d1

/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

Refer to the Bridge ID page for details.

srcChainid

String

By default, Ethereum mainnet. Refer to the Chain ID page for details.

https://api.expand.network/bridge/gettransaction?transactionHash=0x8a1f55fe1b6362b998806e07bc6f1e3c93a97f4a5935d8e92042b9a616d4e81e&bridgeId=500

/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

Refer to the Bridge ID page for details.

srcTokenSymbol*

String

Symbol of token to swap.

dstChainId*

String

Destination chain Id. Refer to the Chain ID page for details.

amountIn*

String

Amount of token to be swapped.

from*

String

Address of the sender of the token.

amountOutMin*

String

Minimum amount accepted as the result of swap.

gas*

String

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

to

String

Address of the recipient of the token.

dstTokenSymbol

String

Symbol of token to be received as a result of swap.

srcChainId

String

Source Chain Id. By default, Ethereum mainnet. Refer to the Chain ID page for details.

srcChainSymbol

String

Source Chain Symbol.

slippage

String

Percentage of total swap value. By default, 1.

0 <= slippage value <= 100

gasPriority

String

low, medium, or high.

transferMode

String

Mode of transport-bus or taxi. By default, taxi

ofacCheck

Boolean

if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet

{
    "srcChainId": "8453",
    "dstChainId": "1",
    "srcTokenSymbol": "ETH",
    "dstTokenSymbol": "ETH",
    "amountIn": "10000000000000000",
    "gas": "80000",
    "bridgeId": "500",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "amountOutMin": "0",    
    "transferMode": "bus"
}

With gasPriority:

{
    "srcChainId": "8453",
    "dstChainId": "1",
    "srcTokenSymbol": "ETH",
    "dstTokenSymbol": "ETH",
    "amountIn": "10000000000000000",
    "gas": "80000",
    "bridgeId": "500",
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "amountOutMin": "0",
    "transferMode": "bus",
    "gasPriority": "low"
}

/addliquidity

Loan your assets to the specified bridge.

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

Request Body

Name
Type
Description

bridgeId

String

Refer to the Bridge ID page for details.

rpc

String

Remote procedural call URL.

srcChainId

String

Source Chain Id. By default, Ethereum mainnet. Refer to the Chain ID page for details.

srcTokenSymbol*

String

Symbol of token to add liquidity.

from*

String

Address of the sender of the token.

amountIn*

String

Amount of token to add liquidity.

gas*

String

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

gasPriority

String

low, medium, or high.

ofacCheck

Boolean

if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet

{
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "amountIn": "10000000000000000",
    "srcChainId": "8453",
    "srcTokenSymbol": "ETH",
    "gas": "2002",
    "bridgeId": "500"
}

With gasPriority:

{
    "from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
    "amountIn": "10000000000000000",
    "srcChainId": "8453",
    "srcTokenSymbol": "ETH",
    "gas": "2002",
    "bridgeId": "500",
   "gasPriority": "medium"
}

/removeliquidity

Remove user liquidity across multiple chains.

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

Request Body

Name
Type
Description

bridgeId

String

Refer to the Bridge ID page for details.

rpc

String

Remote procedural call URL.

srcChainId

String

Source Chain Id. By default, Ethereum mainnet. Refer to the Chain ID page for details.

srcTokenSymbol*

String

Symbol of token to add liquidity.

from*

String

Address of the sender of the token.

to*

String

Address of the reciever of the token.

amountOut*

String

Amount of token to remove liquidity.

gas*

String

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

gasPriority

String

low, medium, or high.

ofacCheck

Boolean

if true,provides insights of the contract and tokens involved in the transaction. By Default, false Available on Ethereum, Polygon, BSC, Avalanche, Arbitrum and Optimism Mainnet

{
    "srcChainId": "1",
    "bridgeId": "500",
    "srcTokenSymbol": "ETH",
    "amountOut": "10000000",
    "gas": "400000",
    "from": "0xe58Aa11A1AD425b12B4a3155124245cd36DA4f5e",
    "to": "0xe58Aa11A1AD425b12B4a3155124245cd36DA4f5e"
}

With gasPriority:

{
    "srcChainId": "1",
    "bridgeId": "500",
    "srcTokenSymbol": "ETH",
    "amountOut": "10000000",
    "gas": "400000",
    "from": "0xe58Aa11A1AD425b12B4a3155124245cd36DA4f5e",
    "to": "0xe58Aa11A1AD425b12B4a3155124245cd36DA4f5e",
    "gasPriority": "high"
}

With ofacCheck:

{
    "srcChainId": "1",
    "bridgeId": "500",
    "srcTokenSymbol": "ETH",
    "amountOut": "10000000",
    "gas": "400000",
    "from": "0xe58Aa11A1AD425b12B4a3155124245cd36DA4f5e",
    "to": "0xe58Aa11A1AD425b12B4a3155124245cd36DA4f5e",
    "gasPriority": "high",
    "ofacCheck": true
}

Last updated