Whitelisted Tokens
The /tokens
endpoint lets you identify the tokens whitelisted by Hypersonic with a simple ping.
💡
Any token can be imported via UI or used in an API call, but we can't guarantee valid routes for them.
Search a token
You can find out if a token is supported using this endpoint:
https://api.hypersonic.exchange/v1/tokens/{chain_name}/search/{token_address}
Request type: GET
Parameters
chain_name
token_address
Responses
200
Successful request.404
Token not found.5xx
Service unavailable.
[
{
"chainId": 10,
"address": "0x4200000000000000000000000000000000000006",
"name": "Wrapped Ether",
"symbol": "WETH",
"decimals": 18,
"logoURI": "https://ethereum-optimism.github.io/data/WETH/logo.png",
"extensions": {
"opListId": "default",
"opTokenId": "WETH"
}
}
]
Try it yourself
To ping the API using curl, you can use the following command:
curl https://api.hypersonic.exchange/v1/tokens/optimism/search/0x4200000000000000000000000000000000000006
This will send a GET
request to the infos endpoint and return the response.
Get all tokens
You can also retrieve a complete list of whitelisted tokens using this endpoint:
https://api.hypersonic.exchange/v1/tokens/{chain_name}/full
Request type: GET
Parameters
chain_name
Responses
200
Successful request.5xx
Service unavailable.
[
{
"chainId": 10,
"address": "0x76FB31fb4af56892A25e32cFC43De717950c9278",
"name": "Aave Token",
"symbol": "AAVE",
"decimals": 18,
"logoURI": "https://ethereum-optimism.github.io/data/AAVE/logo.svg",
"extensions": {
"optimismBridgeAddress": "0x4200000000000000000000000000000000000010",
"opListId": "default",
"opTokenId": "AAVE"
}
},
...
]
Try it yourself
To ping the API using curl, you can use the following command:
curl https://api.hypersonic.exchange/v1/tokens/optimism/full
This will send a GET
request to the infos endpoint and return the response.