Skip to main content
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": [
    "<string>"
  ],
  "from": 123,
  "interval": 123,
  "to": 123
}
'
[
  {
    "token": "<string>",
    "prices": [
      {
        "timestamp": 123,
        "usd_price": 123,
        "usd_volume": 123
      }
    ]
  }
]

Authorizations

X-Api-Key
string
header
required

Your Prism API key. You can get one for free in the Prism Dashboard.

Body

application/json
tokens
string[]
required

List of token addresses to retrieve price history for.

Required array length: 1 - 100 elements
from
integer
required

Start time for the history range.

interval
integer
required

Time interval to aggregate metrics by.

to
integer

End time for the history range. Defaults to the current time.

Response

Price history for the specified tokens.

token
string

Token mint address.

prices
object[]

Array of price snapshots over the requested range.