Skip to main content

Tokens

Get all tokens supported by Xplore across all chains. Tokens are grouped by chain ID for easy lookup.

If you want to learn more about how to use this endpoint, please have a look at our guide.

API

Endpoint Details

GET /v1/tokens

Get all tokens supported by Xplore across all chains. Tokens are grouped by chain ID for easy lookup.

Request

Headers

X-API-Keystring

The apiKey allows you to authenticate on the API (optional)

Query Parameters

chainsstring

Comma-separated chain IDs to filter by (e.g., "1,137")

Example: 1,137

Response

Status Code: 200 OK
Content Type: application/json

Response

tokensobjectrequired

Tokens grouped by chain ID

addressstringrequired

Token contract address (0x0000… for native tokens)

chainIdstringrequired

Chain where this token exists

symbolstringrequired

Token symbol (e.g., "USDC", "ETH")

decimalsnumberrequired

Number of decimal places

namestringrequired

Full token name

logoURIstring

URL to token logo image

priceUSDstring

Current USD price

coinKeystring

Unique identifier across chains

Example Request

# Get all tokens
curl --request GET \
--url https://xplore.api.v2.routerprotocol.com/v1/tokens \
--header 'X-API-Key: your-api-key-here'

# Get tokens for specific chains
curl --request GET \
--url 'https://xplore.api.v2.routerprotocol.com/v1/tokens?chains=1,137' \
--header 'X-API-Key: your-api-key-here'

Example Response

Status Code: 200 OK

{
"tokens": {
"1": [
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": "1",
"symbol": "USDC",
"decimals": 6,
"name": "USD Coin",
"logoURI": "https://...",
"priceUSD": "1.00",
"coinKey": "USDC"
},
{
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"chainId": "1",
"symbol": "USDT",
"decimals": 6,
"name": "Tether USD",
"logoURI": "https://...",
"priceUSD": "1.00"
}
],
"137": [
{
"address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
"chainId": "137",
"symbol": "USDC",
"decimals": 6,
"name": "USD Coin",
"logoURI": "https://...",
"priceUSD": "1.00"
}
]
}
}

Code Examples

JavaScript/TypeScript

async function getTokens(chains?: string) {
const url = chains
? `https://xplore.api.v2.routerprotocol.com/v1/tokens?chains=${chains}`
: 'https://xplore.api.v2.routerprotocol.com/v1/tokens';

const response = await fetch(url, {
headers: {
'X-API-Key': 'your-api-key-here'
}
});

return await response.json();
}

// Get all tokens
const allTokens = await getTokens();

// Get tokens for Ethereum and Polygon
const ethPolTokens = await getTokens('1,137');

// Find USDC on Ethereum
const ethUSDC = ethPolTokens.tokens['1']?.find(
t => t.symbol === 'USDC'
);

Python

import requests

def get_tokens(chains=None):
url = 'https://xplore.api.v2.routerprotocol.com/v1/tokens'
if chains:
url += f'?chains={chains}'

response = requests.get(
url,
headers={'X-API-Key': 'your-api-key-here'}
)
return response.json()

# Get all tokens
all_tokens = get_tokens()

# Get tokens for Ethereum and Polygon
eth_pol_tokens = get_tokens('1,137')

# Find USDC on Ethereum
eth_usdc = next(
(t for t in eth_pol_tokens['tokens']['1'] if t['symbol'] == 'USDC'),
None
)