# Get Liquidity Pool URL: /docs/api-reference/liquidity-pools/GetPoolController_transactionsApi_v1 Get liquidity pool by pool ID with aggregated stats ## GET /api/v1/liquidity/pools/{id} Request: `GET https://api.notus.team/api/v1/liquidity/pools/{id}` Authentication: send your project's API key in the `x-api-key` header. ```json { "description": "Get liquidity pool by pool ID with aggregated stats", "operationId": "GetPoolController_transactionsApi_v1", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The unique identifier of the pool", "schema": { "minLength": 1, "type": "string", "examples": [ "137-0x4CcD010148379ea531D6C587CfDd60180196F9b1" ] } }, { "name": "rangeInDays", "required": false, "in": "query", "description": "Number of days to aggregate pool statistics for. Must be between 1 and 365 days. Default is 30 days.", "schema": { "minimum": 1, "maximum": 365, "default": 30, "type": "integer", "examples": [ 30 ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetPoolResponseDTO" } } } }, "403": { "description": "FORBIDDEN", "content": { "application/json": { "schema": { "type": "object", "description": "UNAVAILABLE_COMPUTE_UNITS", "required": [ "statusCode", "id", "message" ], "properties": { "statusCode": { "type": "number", "description": "HTTP status code", "examples": [ 403 ] }, "id": { "type": "string", "description": "Our ID of the problem", "examples": [ "UNAVAILABLE_COMPUTE_UNITS" ] }, "message": { "type": "string", "description": "A human readable message that explains the problem", "examples": [ "The project doesn't have enough compute units to perform this action. Please upgrade your plan." ] } } } } } } }, "summary": "Get Liquidity Pool", "tags": [ "Liquidity Pools" ] } ``` ### Schema GetPoolResponseDTO ```json { "type": "object", "properties": { "pool": { "description": "Liquidity pool with aggregated statistics", "allOf": [ { "$ref": "#/components/schemas/PoolDetailsDTO" } ] } }, "required": [ "pool" ] } ``` ### Schema PoolDetailsDTO ```json { "type": "object", "properties": { "id": { "type": "string", "description": "Id of the pool: `${chainId}-${protocolPoolId}`, lowercase. Use it to identify a pool; `address` is not unique for Uniswap V4 pools.", "examples": [ "137-0x45dda9cb7c25131df268515131f647d726f50608" ] }, "provider": { "$ref": "#/components/schemas/ProviderDTO" }, "liquidityProvider": { "type": "string", "description": "Provider id to send as `liquidityProvider` in the liquidity requests for this pool.", "enum": [ "UNISWAP_V3", "PANCAKESWAP_V3", "UNISWAP_V4", "ORCA_WHIRLPOOLS" ], "examples": [ "UNISWAP_V3" ] }, "protocolPoolId": { "type": "string", "description": "The protocol's own id of the pool: the pool contract address, the 32-byte PoolId on Uniswap V4, or the base58 Whirlpool account on Orca.", "examples": [ "0x45dda9cb7c25131df268515131f647d726f50608" ] }, "tickSpacing": { "type": [ "number", "null" ], "description": "Tick spacing of the pool.", "examples": [ 10 ] }, "positionManager": { "type": [ "string", "null" ], "description": "Position manager (NFT contract) the positions in this pool are minted by: their `nftAddress`.", "examples": [ "0xC36442b4a4522E871399CD717aBDD847Ab11FE88" ] }, "poolKey": { "description": "Uniswap V4 PoolKey of the pool; null for other providers.", "type": [ "object", "null" ], "allOf": [ { "$ref": "#/components/schemas/PoolKeyDTO" } ] }, "whirlpool": { "description": "An Orca pool's price and active liquidity, read on-chain when listed; null for other providers, or when the read failed.", "type": [ "object", "null" ], "allOf": [ { "$ref": "#/components/schemas/WhirlpoolStateDTO" } ] }, "address": { "type": "string", "description": "The address of the pool: the checksummed contract on EVM chains, the base58 account on Solana. For Uniswap V4 it is the chain's PoolManager, shared by every V4 pool of that chain.", "examples": [ "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640" ] }, "chain": { "description": "The chain where the pool is deployed", "allOf": [ { "$ref": "#/components/schemas/ChainDTO" } ] }, "fee": { "type": "number", "description": "The fee tier of the pool as decimal (e.g., 0.05 for 0.05%)", "examples": [ 0.05 ] }, "totalValueLockedUSD": { "type": "string", "description": "The total value locked in USD as string", "examples": [ "10000.453" ] }, "tokens": { "description": "The tokens in the pool", "type": "array", "items": { "$ref": "#/components/schemas/LiquidityPoolTokenDTO" } }, "stats": { "description": "Aggregated statistics for the pool over the specified time range", "allOf": [ { "$ref": "#/components/schemas/PoolStatsDTO" } ] } }, "required": [ "id", "provider", "liquidityProvider", "protocolPoolId", "tickSpacing", "positionManager", "poolKey", "whirlpool", "address", "chain", "fee", "totalValueLockedUSD", "tokens", "stats" ] } ``` ### Schema ProviderDTO ```json { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the swap provider used", "examples": [ "XY" ] }, "logoUrl": { "type": "string", "description": "URL to an image of the logo of the provider", "examples": [ "https://assets.notus.team/Lifi.png" ] }, "explorerURL": { "type": "object", "description": "URL to the explorer of the provider", "examples": [ "https://explorer.li.fi" ] } }, "description": "Details about the swap provider that was used", "required": [ "name", "logoUrl", "explorerURL" ] } ``` ### Schema PoolKeyDTO ```json { "type": "object", "properties": { "currency0": { "type": "string", "description": "Lower-sorted currency of the pool. The native token is the zero address.", "pattern": "^0x[a-fA-F0-9]{40}$", "examples": [ "0x0000000000000000000000000000000000000000" ] }, "currency1": { "type": "string", "description": "Higher-sorted currency of the pool.", "pattern": "^0x[a-fA-F0-9]{40}$", "examples": [ "0xaf88d065e77c8cc2239327c5edb3a432268e5831" ] }, "fee": { "type": "number", "description": "LP fee in pips (hundredths of a basis point).", "examples": [ 500 ] }, "tickSpacing": { "type": "number", "description": "Tick spacing of the pool.", "examples": [ 10 ] }, "hooks": { "type": "string", "description": "Hooks contract; always the zero address on listed pools.", "pattern": "^0x[a-fA-F0-9]{40}$", "examples": [ "0x0000000000000000000000000000000000000000" ] } }, "required": [ "currency0", "currency1", "fee", "tickSpacing", "hooks" ] } ``` ### Schema WhirlpoolStateDTO ```json { "type": "object", "properties": { "sqrtPrice": { "type": "string", "description": "Square root of the price of token B in token A, raw units, Q64.64 as the whirlpool holds it.", "examples": [ "7922816251426433759354395033" ] }, "liquidity": { "type": "string", "description": "Liquidity active at the current price.", "examples": [ "123456789012345" ] } }, "required": [ "sqrtPrice", "liquidity" ] } ``` ### Schema ChainDTO ```json { "type": "object", "properties": { "id": { "type": "number", "description": "EVM ID of the blockchain", "examples": [ 137 ] }, "name": { "type": "string", "description": "Name of the blockchain", "examples": [ "POLYGON" ] }, "logo": { "type": "string", "description": "URL for a logo of the blockchain", "examples": [ "https://logopolygon.com" ] } }, "description": "Basic information about a blockchain", "required": [ "id", "name", "logo" ] } ``` ### Schema LiquidityPoolTokenDTO ```json { "type": "object", "properties": { "name": { "type": "string", "description": "Full name of the token", "examples": [ "Wrapped Bitcoin" ] }, "symbol": { "type": "string", "description": "Ticker symbol of the token", "examples": [ "WBTC" ] }, "decimals": { "type": "number", "description": "Maximum amount of decimals this token supports", "examples": [ 18 ] }, "address": { "type": "string", "description": "Address of the token as its blockchain writes it: a checksummed `0x` address on EVM chains, a `C…` contract on Stellar, and `0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE` for the native coin of any chain", "examples": [ "0x2f2a2543b76a4166549f7aab2e75bef0aefc5b0f" ] }, "poolShareInPercentage": { "type": "number", "description": "The percentage share of this token in the pool", "examples": [ 50.5 ] }, "poolShare": { "type": "number", "description": "The actual share amount of this token in the pool", "examples": [ 1000.25 ] }, "logo": { "type": [ "object", "null" ], "description": "Logo of the token", "examples": [ "https://assets.notus.team/wbtc.png" ] } }, "required": [ "name", "symbol", "decimals", "address", "poolShareInPercentage", "poolShare", "logo" ] } ``` ### Schema PoolStatsDTO ```json { "type": "object", "properties": { "rangeInDays": { "type": "number", "description": "Number of days the statistics cover", "examples": [ 30 ] }, "feesInUSD": { "type": "string", "description": "Total fees collected in USD on the period range", "examples": [ "1500.75" ] }, "volumeInUSD": { "type": "string", "description": "Total trading volume in USD on the period range", "examples": [ "50000.25" ] }, "transactionsCount": { "type": "number", "description": "Total number of transactions on the period range", "examples": [ 1250 ] } }, "required": [ "rangeInDays", "feesInUSD", "volumeInUSD", "transactionsCount" ] } ```