Get supported tokens and chains
Squid SDK provides all the information you need around the supported tokens and chains consuming them directly from our API

First: init the SDK

init() collects all the necessary and up to date information on tokens and chains from our API.
await squid.init()

Access tokens and chains data

Once you have the SDK inited, you will be able to access the data in the following way:
const tokens = squid.tokens as TokenData[]
const chains = squid.chains as ChainsData
Example: Using the SDK's list of supported tokens using a friendly name filter
const squid = new Squid(); //get squid sdk
await squid.init(); // init, this will get squid metadata including tokens and chains
const params = {
recipientAddress: '0x....',
sourceChainId: squid.chains.Ethereum.chainId,
sourceTokenAddress: squid.tokens.find( //filter the tokens list by chain id and token symbol
t =>
t.symbol === 'aUSDC' &&
t.chainId === squid.chains.Ethereum.chainId
)!.address as string, //usdc on ethereum
sourceAmount: 1,
destinationChainId: squid.chains.Avalanche.chainId,
destinationTokenAddress: squid.tokens.find(
t =>
t.symbol === 'WAVAX' &&
t.chainId === squid.chains.Avalanche.chainId
)!.address as string, //wavax on avalanch
slippage: 1
Note: the token symbols on testnet and mainnet are different!
Copy link
On this page
First: init the SDK
Access tokens and chains data