Skip to content

Get Token Chart

POST
/v4/web3/token-chart

Retrieve historical token price chart data for a requested time range.

Authorizations

ApiKeyAuth
Type
API Key (header: X-Api-Key)

Request Body

application/json
JSON
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"network": "ethereum",
"type": "DAY"
}

Responses

OK

application/json
JSON
{
"status": "ok",
"payload": {
"prices": [
{
"ts": 1776355249498,
"val": 0.999903962763929
}
]
}
}

Playground

Authorization
Body

Samples

Powered by VitePress OpenAPI

Code examples

bash
curl -X POST https://api.brrr.network/v4/web3/token-chart \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
    "network": "ethereum",
    "type": "DAY"
  }'
javascript
const response = await fetch('https://api.brrr.network/v4/web3/token-chart', {
  method: 'POST',
  headers: {
    'X-Api-Key': process.env.BRRR_API_KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
    network: 'ethereum',
    type: 'DAY',
  }),
});

if (!response.ok) {
  const error = await response.json();
  throw new Error(`Token chart request failed: ${error.errorCode}`);
}

const data = await response.json();
console.log('Price points:', data.payload.prices);
python
import os
import httpx

response = httpx.post(
    'https://api.brrr.network/v4/web3/token-chart',
    headers={
        'X-Api-Key': os.environ['BRRR_API_KEY'],
        'Content-Type': 'application/json',
    },
    json={
        'address': '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
        'network': 'ethereum',
        'type': 'DAY',
    },
)
response.raise_for_status()
print('Price points:', response.json()['payload']['prices'])