Merkl Developer Portal logo
get

/v4/opportunities/tvl-records

Get compact historical TVL series for several opportunities at once. Repeat ids once per opportunity.

Query parameters

idsstring[]
required

Opportunity IDs (numeric hash) to read history for. Repeat the parameter once per id.

fromnumber

Lower bound (inclusive) for the record's unix timestamp, in seconds.

tonumber

Upper bound (inclusive) for the record's unix timestamp, in seconds.

grainenum

Resolution of the returned records. DAY (the default) is one point per UTC day and is kept indefinitely. RAW (one point per sample) and HOUR are kept for a limited window. SOFR_SPREAD_RATCHET opportunities have no DAY series; the default still returns one point per UTC day for them.

Responses

200
TVL series per opportunity id, ascending by timestamp. Ids with no record are absent.
Schema
objectTVL series per opportunity id, ascending by timestamp. Ids with no record are absent.
Example
{}
400
Response for status 400
Schema
object
typestring
required
URI reference identifying the problem type
titlestring
required
Short, stable, human-readable summary
statusnumber
required
HTTP status code
detailstring
required
Human-readable explanation specific to this occurrence
Example
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string"
}
500
Response for status 500
Schema
object
typestring
required
URI reference identifying the problem type
titlestring
required
Short, stable, human-readable summary
statusnumber
required
HTTP status code
detailstring
required
Human-readable explanation specific to this occurrence
Example
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string"
}