Merkl Developer Portal logo
get

/v4/opportunities/{id}/tvl-records

Get historical TVL records for an opportunity.

Path parameters

idstring
required

Opportunity ID (path-only). Two accepted forms: (1) internal numeric hash, ≤20 digits (e.g. 7673870997270712040), or (2) composite {chainId}-{type}-{identifier} (e.g. 1-ERC20LOGPROCESSOR-0x35Cbe8542E70fa2f7F9cDF129F19e593F4b4f560). The composite form is path-only — query filters (?id=, ?opportunityId=) only accept the numeric form. NOT a campaign ID. See ID types.

Query parameters

pagenumber | stringdefault: 0

0-indexed page number

itemsnumber | stringdefault: 100

Number of items returned by page

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. For SOFR_SPREAD_RATCHET opportunities the default is COMPUTE (one point per engine compute) instead, because they have no DAY series.