Get Price History
curl --request POST \
--url https://refract.prismapi.io/v1/solana/dex/prices/get-price-history \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tokens": [
"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk"
],
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z",
"interval": 3600
}
'import requests
url = "https://refract.prismapi.io/v1/solana/dex/prices/get-price-history"
payload = {
"tokens": ["Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk"],
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z",
"interval": 3600
}
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({
tokens: ['Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk'],
from: '2026-04-27T00:00:00Z',
to: '2026-04-27T01:00:00Z',
interval: 3600
})
};
fetch('https://refract.prismapi.io/v1/solana/dex/prices/get-price-history', 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/solana/dex/prices/get-price-history",
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([
'tokens' => [
'Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk'
],
'from' => '2026-04-27T00:00:00Z',
'to' => '2026-04-27T01:00:00Z',
'interval' => 3600
]),
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/solana/dex/prices/get-price-history"
payload := strings.NewReader("{\n \"tokens\": [\n \"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk\"\n ],\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\",\n \"interval\": 3600\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/solana/dex/prices/get-price-history")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokens\": [\n \"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk\"\n ],\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\",\n \"interval\": 3600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://refract.prismapi.io/v1/solana/dex/prices/get-price-history")
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 \"tokens\": [\n \"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk\"\n ],\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\",\n \"interval\": 3600\n}"
response = http.request(request)
puts response.read_body[
{
"token_address": "<string>",
"pool_address": "<string>",
"prices": [
{
"timestamp": "2023-11-07T05:31:56Z",
"usd_price": 123,
"usd_volume": 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 History
Returns price history for one or more tokens or pools.
POST
/
v1
/
solana
/
dex
/
prices
/
get-price-history
Get Price History
curl --request POST \
--url https://refract.prismapi.io/v1/solana/dex/prices/get-price-history \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"tokens": [
"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk"
],
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z",
"interval": 3600
}
'import requests
url = "https://refract.prismapi.io/v1/solana/dex/prices/get-price-history"
payload = {
"tokens": ["Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk"],
"from": "2026-04-27T00:00:00Z",
"to": "2026-04-27T01:00:00Z",
"interval": 3600
}
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({
tokens: ['Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk'],
from: '2026-04-27T00:00:00Z',
to: '2026-04-27T01:00:00Z',
interval: 3600
})
};
fetch('https://refract.prismapi.io/v1/solana/dex/prices/get-price-history', 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/solana/dex/prices/get-price-history",
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([
'tokens' => [
'Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk'
],
'from' => '2026-04-27T00:00:00Z',
'to' => '2026-04-27T01:00:00Z',
'interval' => 3600
]),
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/solana/dex/prices/get-price-history"
payload := strings.NewReader("{\n \"tokens\": [\n \"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk\"\n ],\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\",\n \"interval\": 3600\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/solana/dex/prices/get-price-history")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tokens\": [\n \"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk\"\n ],\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\",\n \"interval\": 3600\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://refract.prismapi.io/v1/solana/dex/prices/get-price-history")
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 \"tokens\": [\n \"Z4d9YXR4pSkdKcu9UBcwxHp7i32buzdDtAR1b1Gbonk\"\n ],\n \"from\": \"2026-04-27T00:00:00Z\",\n \"to\": \"2026-04-27T01:00:00Z\",\n \"interval\": 3600\n}"
response = http.request(request)
puts response.read_body[
{
"token_address": "<string>",
"pool_address": "<string>",
"prices": [
{
"timestamp": "2023-11-07T05:31:56Z",
"usd_price": 123,
"usd_volume": 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
Start of the history range, as a date-time RFC3339 string.
Sampling interval between data points, in seconds.
Token addresses to retrieve price history for.
Required array length:
1 - 100 elementsPool addresses to retrieve price history for.
Required array length:
1 - 1000 elementsEnd of the history range, as a date-time RFC3339 string. Defaults to the current time.
Was this page helpful?
⌘I