curl "https://starknet.impulse.avnu.fi/v3/tokens/0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7/prices/candle?startDate=2024-02-01T00:00:00Z&endDate=2024-02-14T00:00:00Z&resolution=4H"
const tokenAddress = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7';
const endDate = new Date();
const startDate = new Date(endDate.getTime() - 24 * 60 * 60 * 1000);
const params = new URLSearchParams({
startDate: startDate.toISOString(),
endDate: endDate.toISOString(),
resolution: '1H'
});
const response = await fetch(
`https://starknet.impulse.avnu.fi/v3/tokens/${tokenAddress}/prices/candle?${params}`
);
const candles = await response.json();
console.log(`Fetched ${candles.length} candles`);
import requests
from datetime import datetime, timedelta
token_address = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'
end_date = datetime.now()
start_date = end_date - timedelta(days=7)
params = {
'startDate': start_date.isoformat() + 'Z',
'endDate': end_date.isoformat() + 'Z',
'resolution': '4H'
}
response = requests.get(
f'https://starknet.impulse.avnu.fi/v3/tokens/{token_address}/prices/candle',
params=params
)
candles = response.json()
print(f"Fetched {len(candles)} candles")
[
{
"date": "2024-02-05T00:00:00Z",
"open": 2410.30,
"high": 2425.80,
"low": 2405.15,
"close": 2418.60,
"volume": 1250000
},
{
"date": "2024-02-05T04:00:00Z",
"open": 2418.60,
"high": 2435.00,
"low": 2415.25,
"close": 2430.75,
"volume": 1480000
},
{
"date": "2024-02-05T08:00:00Z",
"open": 2430.75,
"high": 2445.90,
"low": 2428.00,
"close": 2435.50,
"volume": 1620000
}
]
Markets
Get OHLCV Data
Retrieve candlestick (OHLCV) data for technical analysis and charting
GET
/
v3
/
tokens
/
{tokenAddress}
/
prices
/
candle
curl "https://starknet.impulse.avnu.fi/v3/tokens/0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7/prices/candle?startDate=2024-02-01T00:00:00Z&endDate=2024-02-14T00:00:00Z&resolution=4H"
const tokenAddress = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7';
const endDate = new Date();
const startDate = new Date(endDate.getTime() - 24 * 60 * 60 * 1000);
const params = new URLSearchParams({
startDate: startDate.toISOString(),
endDate: endDate.toISOString(),
resolution: '1H'
});
const response = await fetch(
`https://starknet.impulse.avnu.fi/v3/tokens/${tokenAddress}/prices/candle?${params}`
);
const candles = await response.json();
console.log(`Fetched ${candles.length} candles`);
import requests
from datetime import datetime, timedelta
token_address = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'
end_date = datetime.now()
start_date = end_date - timedelta(days=7)
params = {
'startDate': start_date.isoformat() + 'Z',
'endDate': end_date.isoformat() + 'Z',
'resolution': '4H'
}
response = requests.get(
f'https://starknet.impulse.avnu.fi/v3/tokens/{token_address}/prices/candle',
params=params
)
candles = response.json()
print(f"Fetched {len(candles)} candles")
[
{
"date": "2024-02-05T00:00:00Z",
"open": 2410.30,
"high": 2425.80,
"low": 2405.15,
"close": 2418.60,
"volume": 1250000
},
{
"date": "2024-02-05T04:00:00Z",
"open": 2418.60,
"high": 2435.00,
"low": 2415.25,
"close": 2430.75,
"volume": 1480000
},
{
"date": "2024-02-05T08:00:00Z",
"open": 2430.75,
"high": 2445.90,
"low": 2428.00,
"close": 2435.50,
"volume": 1620000
}
]
Overview
Returns Open, High, Low, Close, and Volume (OHLCV) candlestick data for any token. Essential for building trading charts and performing technical analysis.Path Parameters
string
required
Token contract address (hex format)
Query Parameters
string
required
Start date (ISO 8601 format)
string
required
End date (ISO 8601 format)
string
default:"1H"
Candle timeframe:
1, 5, 15, 1H, 4H, 1D, 1Wstring
Quote currency token address (defaults to USD)
Response
Returns an array of candlestick objects (CandleDataPoint).
string
required
ISO 8601 timestamp for candle open
number
required
Opening price
number
required
Highest price during period
number
required
Lowest price during period
number
required
Closing price
number
required
Total volume traded
curl "https://starknet.impulse.avnu.fi/v3/tokens/0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7/prices/candle?startDate=2024-02-01T00:00:00Z&endDate=2024-02-14T00:00:00Z&resolution=4H"
const tokenAddress = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7';
const endDate = new Date();
const startDate = new Date(endDate.getTime() - 24 * 60 * 60 * 1000);
const params = new URLSearchParams({
startDate: startDate.toISOString(),
endDate: endDate.toISOString(),
resolution: '1H'
});
const response = await fetch(
`https://starknet.impulse.avnu.fi/v3/tokens/${tokenAddress}/prices/candle?${params}`
);
const candles = await response.json();
console.log(`Fetched ${candles.length} candles`);
import requests
from datetime import datetime, timedelta
token_address = '0x049d36570d4e46f48e99674bd3fcc84644ddd6b96f7c741b1562b82f9e004dc7'
end_date = datetime.now()
start_date = end_date - timedelta(days=7)
params = {
'startDate': start_date.isoformat() + 'Z',
'endDate': end_date.isoformat() + 'Z',
'resolution': '4H'
}
response = requests.get(
f'https://starknet.impulse.avnu.fi/v3/tokens/{token_address}/prices/candle',
params=params
)
candles = response.json()
print(f"Fetched {len(candles)} candles")
[
{
"date": "2024-02-05T00:00:00Z",
"open": 2410.30,
"high": 2425.80,
"low": 2405.15,
"close": 2418.60,
"volume": 1250000
},
{
"date": "2024-02-05T04:00:00Z",
"open": 2418.60,
"high": 2435.00,
"low": 2415.25,
"close": 2430.75,
"volume": 1480000
},
{
"date": "2024-02-05T08:00:00Z",
"open": 2430.75,
"high": 2445.90,
"low": 2428.00,
"close": 2435.50,
"volume": 1620000
}
]
Resolution Values
| Value | Description |
|---|---|
1 | 1 minute |
5 | 5 minutes |
15 | 15 minutes |
1H | 1 hour |
4H | 4 hours |
1D | 1 day |
1W | 1 week |
Was this page helpful?
⌘I