Merkl Developer Portal logo

Transactions Analytics

Look up position state changes by transaction hash, and list a user's transactions

Get Transactions

Fetch state data associated with specific transaction hashes:

GET /v4/analytics/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 /v4/analytics/transactions/1?txHashes=0x123abc...,0x456def...

Get Transaction Hashes by User

Fetch all transaction hashes for a user, grouped by opportunity (indexing ID):

GET /v4/analytics/transactions/by-user/{userAddress}/{chainId?}

Path Parameters:

  • userAddress (required): User wallet address
  • chainId (optional): Chain ID to filter by

Query Parameters:

  • first (optional, numeric, 1–10000): Number of rows per page. Defaults to 10000
  • after (optional, string): Cursor for pagination (from previous pageInfo.endCursor)

Example:

GET /v4/analytics/transactions/by-user/0x1234.../1?first=100

Response format

{
  "data": [
    {
      "stateType": "position",
      "blockNumber": 123456,
      "blockTimestamp": 1234567890,
      "chainId": 1,
      "storingId": "...",
      "protocol": "uniswap-v3",
      "action": "swap",
      "identifier": "0xPoolAddress",
      "state": { ... },
      "txHashes": ["0x..."]
    }
  ],
  "totalCount": 5
}