Historical Price Data
Endpoint
Section titled “Endpoint”GET /prices-history
Base URL: https://api.openfish.fun
Authentication
Section titled “Authentication”None required.
Parameters
Section titled “Parameters”| Parameter | Type | Required | Description |
|---|---|---|---|
market | string | Yes | Condition ID of the market |
interval | string | No | Time interval (reserved for future use) |
fidelity | integer | No | How many data points to return. Default: 50 |
startTs | integer | No | Begin of the time range (UNIX timestamp) |
endTs | integer | No | End of the time range (UNIX timestamp) |
Response
Section titled “Response”{ "history": [ { "t": 1699900000, "p": 0.45 }, { "t": 1699950000, "p": 0.47 }, { "t": 1700000000, "p": 0.50 } ]}| Field | Type | Description |
|---|---|---|
history | array | Ordered sequence of time-price data points |
history[].t | integer | UNIX timestamp |
history[].p | number | Price at that timestamp (4 decimal precision) |
curl "https://api.openfish.fun/prices-history?market=0x0000...0001&fidelity=100&startTs=1699900000&endTs=1700000000"