Skip to main content

Token Prices

Real-time price data for 10,000+ tokens from multiple sources.

Try it Live

Open in Swagger UI โ†’ to test these endpoints interactively.

Endpointsโ€‹

EndpointDescriptionPrice
GET /api/price/{symbol}Single token price$0.001
GET /api/price/batchMultiple tokens$0.002
GET /api/price/smart/{symbol}Best price (multi-source)$0.002
GET /api/price/history/{symbol}Historical prices$0.01

GET /api/price/{symbol}โ€‹

Get current price for a token.

Requestโ€‹

curl https://api.web3identity.com/api/price/ETH

Responseโ€‹

{
"symbol": "ETH",
"name": "Ethereum",
"price": 3245.67,
"change24h": 2.45,
"volume24h": 15234567890,
"marketCap": 389000000000,
"source": "coingecko",
"updatedAt": "2026-02-08T04:30:00Z"
}

SDKโ€‹

const price = await client.getPrice('ETH');
console.log(price.price); // 3245.67

JavaScriptโ€‹

const BASE_URL = 'https://api.web3identity.com';

async function getTokenPrice(symbol) {
const response = await fetch(`${BASE_URL}/api/price/${symbol}`);
if (!response.ok) throw new Error(`Price not found for ${symbol}`);
return response.json();
}

const eth = await getTokenPrice('ETH');
console.log(`ETH: $${eth.price.toFixed(2)} (${eth.change24h > 0 ? '+' : ''}${eth.change24h.toFixed(2)}%)`);
// ETH: $3245.67 (+2.45%)

Pythonโ€‹

import requests

BASE_URL = "https://api.web3identity.com"

def get_price(symbol: str) -> dict:
response = requests.get(f"{BASE_URL}/api/price/{symbol}")
response.raise_for_status()
return response.json()

eth = get_price("ETH")
print(f"ETH: ${eth['price']:,.2f}")
print(f"24h Change: {eth['change24h']:+.2f}%")
print(f"Market Cap: ${eth['marketCap']:,.0f}")

cURLโ€‹

# Get price with formatted output
curl -s https://api.web3identity.com/api/price/ETH | jq '{
symbol: .symbol,
price: "$\(.price | tostring | .[0:7])",
change: "\(.change24h)%",
volume: "$\(.volume24h / 1000000000 | floor)B"
}'

GET /api/price/batchโ€‹

Get prices for multiple tokens in one request.

Requestโ€‹

curl "https://api.web3identity.com/api/price/batch?symbols=ETH,BTC,USDC,ARB"

Responseโ€‹

{
"prices": {
"ETH": { "price": 3245.67, "change24h": 2.45 },
"BTC": { "price": 67890.12, "change24h": 1.23 },
"USDC": { "price": 1.0001, "change24h": 0.01 },
"ARB": { "price": 1.87, "change24h": -3.21 }
},
"count": 4,
"source": "coingecko"
}

SDKโ€‹

const prices = await client.batchPrices(['ETH', 'BTC', 'USDC']);

JavaScriptโ€‹

const BASE_URL = 'https://api.web3identity.com';

async function getBatchPrices(symbols) {
const response = await fetch(
`${BASE_URL}/api/price/batch?symbols=${symbols.join(',')}`
);
return response.json();
}

// Get multiple prices in one request
const { prices } = await getBatchPrices(['ETH', 'BTC', 'SOL', 'ARB', 'OP']);

Object.entries(prices).forEach(([symbol, data]) => {
const arrow = data.change24h >= 0 ? '๐Ÿ“ˆ' : '๐Ÿ“‰';
console.log(`${symbol}: $${data.price.toFixed(2)} ${arrow}`);
});

Pythonโ€‹

import requests

BASE_URL = "https://api.web3identity.com"

def get_batch_prices(symbols: list) -> dict:
response = requests.get(
f"{BASE_URL}/api/price/batch",
params={"symbols": ",".join(symbols)}
)
return response.json()

result = get_batch_prices(["ETH", "BTC", "SOL", "USDC"])
for symbol, data in result["prices"].items():
print(f"{symbol}: ${data['price']:,.2f} ({data['change24h']:+.2f}%)")

cURLโ€‹

# Get batch prices formatted as table
curl -s "https://api.web3identity.com/api/price/batch?symbols=ETH,BTC,SOL,ARB,OP,USDC" | \
jq -r '.prices | to_entries[] | "\(.key)\t$\(.value.price)\t\(.value.change24h)%"'

GET /api/price/smart/{symbol}โ€‹

Multi-source price aggregation for best accuracy.

Queries CoinGecko, DefiLlama, and other sources, returns median price.

Requestโ€‹

curl https://api.web3identity.com/api/price/smart/ETH

Responseโ€‹

{
"symbol": "ETH",
"price": 3245.89,
"sources": [
{ "source": "coingecko", "price": 3245.67 },
{ "source": "defillama", "price": 3246.12 },
{ "source": "coinbase", "price": 3245.88 }
],
"confidence": "high",
"methodology": "median"
}

GET /api/price/history/{symbol}โ€‹

Historical price data.

Query Parametersโ€‹

ParamTypeDefaultDescription
daysnumber7Days of history (1-365)
intervalstringdailyhourly or daily

Requestโ€‹

curl "https://api.web3identity.com/api/price/history/ETH?days=30&interval=daily"

Responseโ€‹

{
"symbol": "ETH",
"history": [
{ "date": "2026-02-07", "price": 3200.45, "volume": 12345678900 },
{ "date": "2026-02-08", "price": 3245.67, "volume": 15234567890 }
],
"count": 30
}

Token Discoveryโ€‹

GET /api/tokens/trendingโ€‹

curl https://api.web3identity.com/api/tokens/trending

GET /api/tokens/searchโ€‹

curl "https://api.web3identity.com/api/tokens/search?q=pepe"

Supported Tokensโ€‹

  • Major: BTC, ETH, USDC, USDT, DAI
  • L2: ARB, OP, MATIC, BASE
  • DeFi: UNI, AAVE, LINK, MKR, LDO
  • Memes: DOGE, SHIB, PEPE, WIF, BONK
  • 10,000+ more via CoinGecko ID

By Contract Addressโ€‹

# Use contract address for exact token
curl https://api.web3identity.com/api/price/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
# Returns USDC

Data Sourcesโ€‹

SourceTokensUpdate Frequency
CoinGecko10,000+30s
DefiLlama5,000+5m
Coinbase500+Real-time