> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lpagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get onchain statistics for a specific pool

> Retrieve aggregated statistics including total open positions, input values, and unique users for a pool. Works on Solana (Meteora DLMM, DAMM V2) and Robinhood Chain (Uniswap V3, Uniswap V4); pick the network with `chain` and narrow the protocols with `platform`.



## OpenAPI

````yaml /api-reference/openapi.json get /pools/{poolId}/onchain-stats
openapi: 3.0.0
info:
  title: LP Agent Open API
  version: 1.0.0
  description: |+
    Public API for LP Agent

    **Authentication**

    All endpoints require an API key passed via the `x-api-key` header.

servers:
  - url: https://api.lpagent.io/open-api/v1
    description: Production
security:
  - apiKeyAuth: []
tags: []
paths:
  /pools/{poolId}/onchain-stats:
    get:
      tags:
        - Pools
      summary: Get onchain statistics for a specific pool
      description: >-
        Retrieve aggregated statistics including total open positions, input
        values, and unique users for a pool. Works on Solana (Meteora DLMM, DAMM
        V2) and Robinhood Chain (Uniswap V3, Uniswap V4); pick the network with
        `chain` and narrow the protocols with `platform`.
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
          description: >-
            Pool ID. On Solana, the Meteora pool address. On Robinhood Chain,
            the Uniswap V3 pool address or the Uniswap V4 pool ID (32-byte `0x`
            hash), in any letter case.
          example: 7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM
        - in: query
          name: chain
          schema:
            type: string
            enum:
              - SOL
              - ROBINHOOD
          description: >-
            Blockchain network the pool lives on. `SOL` counts Meteora (DLMM /
            DAMM v2) positions; `ROBINHOOD` counts Uniswap V3 and V4 positions
            on Robinhood Chain (EVM, chain id 4663). When omitted, it is
            inferred from `poolId`: a `0x` ID is `ROBINHOOD`, anything else is
            `SOL`. An unrecognised value falls back to `SOL`.
        - in: query
          name: platform
          schema:
            type: string
          description: >-
            Comma-separated protocols to count. Omit it to count every protocol
            in the pool. Valid values are `meteora` and `meteora_damm_v2` on
            `SOL`, `uniswap_v3` and `uniswap_v4` on `ROBINHOOD`. A protocol that
            is not served on the requested chain simply counts nothing.
          example: meteora,meteora_damm_v2
      responses:
        '200':
          description: Successfully retrieved pool onchain stats
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      poolStats:
                        type: array
                        items:
                          type: object
                          properties:
                            pool:
                              type: string
                              description: Pool address
                              example: 7d51qGEeAKiPakkxLoHda9egShXQLJcjFYpHEcX4d3EM
                            total_open_positions:
                              type: number
                              description: Count of open positions
                              example: 42
                            unique_owners:
                              type: number
                              description: Count of distinct position owners
                              example: 15
                            total_input_value:
                              type: number
                              description: Total input value in USD
                              example: 0
                            total_input_native:
                              type: number
                              description: Total input value in native token
                              example: 0
        '404':
          description: No data found for the pool
        '500':
          description: Internal server error
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````