Get Price Candles
curl --request POST \
--url https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"chain_id": 1,
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"interval": 60,
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z"
}
'import requests
url = "https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles"
payload = {
"chain_id": 1,
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"interval": 60,
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain_id: 1,
token: '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
interval: 60,
from: '2026-04-27T00:00:00Z',
to: '2026-04-27T01:00:00Z'
})
};
fetch('https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chain_id' => 1,
'token' => '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
'interval' => 60,
'from' => '2026-04-27T00:00:00Z',
'to' => '2026-04-27T01:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles"
payload := strings.NewReader("{\n \"chain_id\": 1,\n \"token\": \"0x6982508145454Ce325dDbE47a25d4ec3d2311933\",\n \"interval\": 60,\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain_id\": 1,\n \"token\": \"0x6982508145454Ce325dDbE47a25d4ec3d2311933\",\n \"interval\": 60,\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain_id\": 1,\n \"token\": \"0x6982508145454Ce325dDbE47a25d4ec3d2311933\",\n \"interval\": 60,\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\"\n}"
response = http.request(request)
puts response.read_body[
{
"timestamp": "2023-11-07T05:31:56Z",
"open": 123,
"high": 123,
"low": 123,
"close": 123,
"volume": 123,
"count": 123
}
]{
"error": "Bad request: Invalid request parameters"
}{
"error": "Unauthorized: Invalid or missing API key"
}{
"error": "Forbidden: Access denied for the current API plan"
}{
"error": "Too many requests: Rate limit exceeded"
}{
"error": "Internal server error"
}Prices
Get Price Candles
Returns price candles for a specific token and/or pool.
POST
/
v1
/
evm
/
dex
/
prices
/
get-price-candles
Get Price Candles
curl --request POST \
--url https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"chain_id": 1,
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"interval": 60,
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z"
}
'import requests
url = "https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles"
payload = {
"chain_id": 1,
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"interval": 60,
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain_id: 1,
token: '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
interval: 60,
from: '2026-04-27T00:00:00Z',
to: '2026-04-27T01:00:00Z'
})
};
fetch('https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'chain_id' => 1,
'token' => '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
'interval' => 60,
'from' => '2026-04-27T00:00:00Z',
'to' => '2026-04-27T01:00:00Z'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles"
payload := strings.NewReader("{\n \"chain_id\": 1,\n \"token\": \"0x6982508145454Ce325dDbE47a25d4ec3d2311933\",\n \"interval\": 60,\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"chain_id\": 1,\n \"token\": \"0x6982508145454Ce325dDbE47a25d4ec3d2311933\",\n \"interval\": 60,\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://refract.prismapi.io/v1/evm/dex/prices/get-price-candles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"chain_id\": 1,\n \"token\": \"0x6982508145454Ce325dDbE47a25d4ec3d2311933\",\n \"interval\": 60,\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\"\n}"
response = http.request(request)
puts response.read_body[
{
"timestamp": "2023-11-07T05:31:56Z",
"open": 123,
"high": 123,
"low": 123,
"close": 123,
"volume": 123,
"count": 123
}
]{
"error": "Bad request: Invalid request parameters"
}{
"error": "Unauthorized: Invalid or missing API key"
}{
"error": "Forbidden: Access denied for the current API plan"
}{
"error": "Too many requests: Rate limit exceeded"
}{
"error": "Internal server error"
}Authorizations
Your Prism API key. You can get one for free in the Prism Dashboard.
Body
application/json
Numeric EVM chain ID to query. See Supported Chains.
Sampling interval between data points, in seconds.
Token address to filter by.
Pool address to filter by.
Start of the candle range, as a date-time RFC3339 string.
Can be combined with to to define a bounded range.
End of the candle range, as a date-time RFC3339 string. Defaults to the current time.
Number of candles to return.
Must be combined with from or to.
Was this page helpful?