GET
/
node
/
v1
/
onchain
/
history
/
{base}
/
{quote}
curl --request GET \
  --url https://{environment}.pragma.build/node/v1/onchain/history/{base}/{quote}
[
  {
    "decimals": 1,
    "median_price": "<string>",
    "nb_sources_aggregated": 1,
    "pair_id": "<string>",
    "timestamp": 1
  }
]

Path Parameters

base
string
required

Base Asset

quote
string
required

Quote Asset

Query Parameters

network
enum<string>
required
Available options:
sepolia,
mainnet
timestamp
string
required

Represents a range of timestamps

chunk_interval
enum<string> | null
Available options:
100ms,
1s,
5s,
1min,
15min,
1h,
2h,
1d,
1w
routing
boolean | null

Response

200 - application/json
Get the historical onchain median price
decimals
integer
required
Required range: x >= 0
median_price
string
required
nb_sources_aggregated
integer
required
Required range: x >= 0
pair_id
string
required
timestamp
integer
required
Required range: x >= 0