Transactions Analytics
Access detailed position and transaction data using Merkl States Analytics API
Get Transactions
Fetch state data associated with specific transaction hashes:
GET /v1/transactions/{chainId}
Path Parameters:
chainId(required): Chain ID to query transactions from
Query Parameters:
txHashes(required): Comma-separated transaction hashes (e.g.,0x123abc...,0x456def...)positionKeyFilter(optional): Substring filter for the position key to narrow results
Example:
GET /v1/transactions/1?txHashes=0x123abc...,0x456def...
Get Transaction Hashes by User
Fetch all transaction hashes for a user, grouped by opportunity (indexing ID):
GET /v1/transactions/by-user/{userAddress}/{chainId?}
Path Parameters:
userAddress(required): User wallet addresschainId(optional): Chain ID to filter by
Query Parameters:
first(optional, numeric, 1–10000): Number of rows per page. Defaults to10000after(optional, string): Cursor for pagination (from previouspageInfo.endCursor)
Example:
GET /v1/transactions/by-user/0x1234.../1?first=100
Response Format
Positions
Position endpoints return data grouped by chain ID, then by identifier:
{
"data": {
"1": {
"0xPoolAddress": {
"positionId-1": {
"user": "0x...",
"chainId": 1,
"identifier": "0xPoolAddress",
"positionId": "positionId-1",
"timestamp": 1234567890,
"state": { ... },
"tokens": [ ... ],
"history": [ ... ]
}
}
}
},
"pagination": {
"positionCount": 10,
"totalHistorySnapshots": 150,
"pageInfo": {
"endCursor": "cursor-string",
"hasMoreHistory": true
}
}
}
Transactions
{
"data": [
{
"stateType": "position",
"blockNumber": 123456,
"blockTimestamp": 1234567890,
"chainId": 1,
"storingId": "...",
"protocol": "uniswap-v3",
"action": "swap",
"identifier": "0xPoolAddress",
"state": { ... },
"txHashes": ["0x..."]
}
],
"totalCount": 5
}