{
  "openapi": "3.1.0",
  "info": {
    "title": "BABA Labs PoolLens API",
    "version": "0.1.2",
    "description": "Live state of concentrated-liquidity pools and positions (Aerodrome Slipstream, Uniswap v3-style), read from chain in one call at one block through the open-source PoolLens contract. Every response includes the block number and the eth_call needed to verify it yourself. Read-only: no keys, no signing, no advice."
  },
  "servers": [
    {
      "url": "https://labs.babacapital.app"
    }
  ],
  "paths": {
    "/v1/position": {
      "get": {
        "operationId": "getPosition",
        "summary": "One LP position: in range or not, token amounts, and uncollected fees exactly as collect() would pay",
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "hyperevm"
              ],
              "default": "base"
            }
          },
          {
            "name": "npm",
            "in": "query",
            "description": "Position-manager (NFT) contract address. On Base, 'aerodrome' is accepted and is the default.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tokenId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. `data` holds the answer, `proof` holds the block and the exact eth_call that reproduces it."
          }
        }
      }
    },
    "/v1/positions": {
      "get": {
        "operationId": "listPositions",
        "summary": "All LP positions an address holds on one position manager (max 20 per call), with an out-of-range count",
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "hyperevm"
              ],
              "default": "base"
            }
          },
          {
            "name": "npm",
            "in": "query",
            "description": "Position-manager (NFT) contract address. On Base, 'aerodrome' is accepted and is the default.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "owner",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 20,
              "maximum": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. `data` holds the answer, `proof` holds the block and the exact eth_call that reproduces it."
          }
        }
      }
    },
    "/v1/pool": {
      "get": {
        "operationId": "getPool",
        "summary": "One pool: tokens, fee, tick, price, liquidity, staked liquidity and gauge",
        "parameters": [
          {
            "name": "chain",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "base",
                "hyperevm"
              ],
              "default": "base"
            }
          },
          {
            "name": "pool",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK. `data` holds the answer, `proof` holds the block and the exact eth_call that reproduces it."
          }
        }
      }
    }
  }
}