Get supported tokens and chains
SDK
API
Widgets
// access using squid.tokens
const fromToken = squid.tokens.find(
(t) =>
t.symbol.toLocaleLowerCase() === "USDC" && t.chainId === "1"
);
// access using squid.chains
const fromChain = squid.chains.find(
(c) =>
c.chainId === "1"
);
const getChains = async () => {
const result = await axios.get('https://v2.api.squidrouter.com/v2/chains', {
headers: {
'x-integrator-id': integratorId,
},
});
return result.data;
};
const getTokens = async () => {
const result = await axios.get('https://v2.api.squidrouter.com/v2/tokens', {
headers: {
'x-integrator-id': integratorId,
},
});
return result.data;
};
Every widget will automatically pull down all Squid's supported tokens and chains.
Last modified 1mo ago