Price History

Returns an array of price snapshots for a specific provider and resource type over a given time period. Useful for charting trends and analyzing price movements.

GET/api/v1/prices/history

Query parameters

providerstringREQUIRED
Provider identifier (e.g. "sohu", "tronsave")
resourcestringREQUIRED
Resource typeOne of: ENERGYBANDWIDTH
periodstringOPTIONAL
Time window for historical dataOne of: 1h6h24h7d30dDefault: 24h

Request examples

curl "https://merx.exchange/api/v1/prices/history?provider=sohu&resource=ENERGY&period=7d"

Response

200Array of price snapshots
[
  {
    "timestamp": "2026-03-28T12:00:00.000Z",
    "price_sun": 30,
    "available": 5000000
  },
  {
    "timestamp": "2026-03-28T12:30:00.000Z",
    "price_sun": 32,
    "available": 4800000
  },
  {
    "timestamp": "2026-03-28T13:00:00.000Z",
    "price_sun": 29,
    "available": 5200000
  }
]

Response fields

timestampstringISO 8601 timestamp for this snapshot
price_sunnumberPrice per unit in SUN at this point in time
availablenumberAvailable resource units at this snapshot

Snapshot intervals vary by period: 1h and 6h return per-minute data, 24h returns 5-minute intervals, 7d returns hourly, and 30d returns 6-hour intervals.