/v4/analytics/positions/by-identifier/{chainId}/{identifier}
Get positions by opportunity identifierFetch the latest position for every user in a given opportunity.
Response:
- data[indexingId]: Wrapped positions keyed by indexingId. Each positionGroup carries shared metadata (protocol, action, stateType, globalStates, tokens) and a positions map keyed by positionId. Each position entry carries its user field; multiple users may share the same indexingId positionGroup.
- latest is reported as of the indexing checkpoint: its (blockNumber, blockTimestamp) are advanced to how far indexing has completed (state unchanged through there), never beyond it — so the state is never presented as more current than what's indexed.
- globalStates (present when enrichment runs): at the positionGroup level it holds series descriptors only (type, indexingId). The value applied to a snapshot lives on that snapshot's own globalStates[key] = { blockTimestamp, value } — the series row at-or-before the snapshot's timestamp (carry-forward) — so each snapshot is self-describing.
- pagination.positionCount: Total number of position entries returned
- pagination.recipientsCount: Number of distinct user addresses across all positions
Examples:
- Latest positions: GET /v4/analytics/positions/by-identifier/1/0xPoolAddress
Path parameters
chainIdnumber | stringidentifierstringQuery parameters
enrichPositionsbooleanResponses
200Response for status 200
Schema
object
dataobjectpaginationobjectrequired
positionCountnumberrecipientsCountnumberExample
{
"data": {},
"pagination": {
"positionCount": 0,
"recipientsCount": 0
}
}https://analytics.merkl.xyz/v4/analytics/positions/by-identifier/{chainId}/{identifier}curl -X GET "https://analytics.merkl.xyz/v4/analytics/positions/by-identifier/{chainId}/{identifier}"