
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.
fromnumberLower bound (inclusive) for the record's unix timestamp, in seconds.
tonumberUpper bound (inclusive) for the record's unix timestamp, in seconds.
grainenumResolution 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
200TVL 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
{}400Response for status 400
Schema
object
typestringrequired
URI reference identifying the problem typetitlestringrequired
Short, stable, human-readable summarystatusnumberrequired
HTTP status codedetailstringrequired
Human-readable explanation specific to this occurrenceExample
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}500Response for status 500
Schema
object
typestringrequired
URI reference identifying the problem typetitlestringrequired
Short, stable, human-readable summarystatusnumberrequired
HTTP status codedetailstringrequired
Human-readable explanation specific to this occurrenceExample
{
"type": "string",
"title": "string",
"status": 0,
"detail": "string"
}get
https://api.merkl.xyz/v4/opportunities/tvl-recordscurl -X GET "https://api.merkl.xyz/v4/opportunities/tvl-records"