Skip to main content
GET
/
v1
/
assets
/
{symbol}
/
history
cURL
curl --request GET \
  --url https://api.pegana.xyz/v1/assets/{symbol}/history
[
  {
    "discount": "<string>",
    "state": "<string>",
    "ts": "2023-11-07T05:31:56Z",
    "discount_raw": "<string>"
  }
]

Path Parameters

symbol
string
required

Asset symbol — case-sensitive

Query Parameters

bucket
string

raw (default) samples directly from discount_snapshots; 1m reads the 1-minute continuous aggregate so longer ranges stay cheap. Any other value is rejected with 400 rather than silently falling back to raw (QA B-020).

from
string<date-time>

Inclusive lower bound on ts. Defaults to now − 24 hours.

to
string<date-time>

Inclusive upper bound on ts. Defaults to now.

limit
integer<int64>

Page size, clamped to [1, 5000]. Default 500.

Response

Time series of discount values, newest first

discount
string
required

EWMA-smoothed discount (the value the state machine uses).

state
string
required
ts
string<date-time>
required
discount_raw
string | null

Raw discount sample (1 - market/intrinsic) before EWMA smoothing. None for bucket=1m because the continuous aggregate discount_1m only stores avg(discount_smooth). For bucket=raw, populated from discount_snapshots.discount_raw.