Get Available Route Options
Request all available chains, bridges, exchanges, and tokens/coins.
If you want to get a comprehensive overview of which options (chains, bridges, DEXs and tokens) are available at this moment, you can use getPossibilities.
1
async function getPossibilities (
2
request?: PossibilitiesRequest
3
): Promise<PossibilitiesResponse>
4
5
interface PossibilitiesRequest {
6
chains?: number[];
7
bridges?: AllowDenyPrefer;
8
exchanges?: AllowDenyPrefer;
9
}
10
interface PossibilitiesResponse {
11
chains: Chain[];
12
tokens: Token[];
13
bridges: BridgeDefinition[];
14
exchanges: ExchangeDefinition[];
15
}
Copied!
Note that the chains property of PossibilitiesRequest takes an array of chain ids. For a description of the AllowDenyPreferinterface, please see Further specifications using RouteOptions​
The PossibilitiesResponsethen holds information about which of the requested chains is currently available and a list of transferable tokens. It also returns all the possibilities for bridging and exchanging those tokens.
​
Copy link