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

# List pools

> Pools you could provide liquidity to, ranked by what you would keep.

**Read `lp_earns_fees` first.** The launchpad that dominates this chain
graduates tokens into pools whose hook takes the swap fee, so they trade
enormously and pay an external liquidity provider nothing. Those pools are
listed — they carry the memecoin's price and volume — with a fee APR of
exactly zero and a note saying why. Pass `lp_earns_fees=true` to hide them.

The default ordering is `il_adjusted_apr_7d`: the fee APR less the expected
impermanent-loss drag from the pair's own volatility. A pool paying 200% on
an asset that moves 400% is not a better position than one paying 20% on an
asset that moves 30%, and sorting on the raw APR would say it was.

Pools too thin for a rate to mean anything — under 20 swaps a day, or under
$1,000 of liquidity — are served with `ranked: false` and always sort last.



## OpenAPI

````yaml /v2/combined_spec.json get /v2/risk_yield/pools
openapi: 3.1.0
info:
  title: Compass API
  description: Compass Labs DeFi API
  version: 0.0.1
servers:
  - url: https://api.compasslabs.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v2/risk_yield/pools:
    get:
      tags:
        - Risk Yield
      summary: List pools
      description: >-
        Pools you could provide liquidity to, ranked by what you would keep.


        **Read `lp_earns_fees` first.** The launchpad that dominates this chain

        graduates tokens into pools whose hook takes the swap fee, so they trade

        enormously and pay an external liquidity provider nothing. Those pools
        are

        listed — they carry the memecoin's price and volume — with a fee APR of

        exactly zero and a note saying why. Pass `lp_earns_fees=true` to hide
        them.


        The default ordering is `il_adjusted_apr_7d`: the fee APR less the
        expected

        impermanent-loss drag from the pair's own volatility. A pool paying 200%
        on

        an asset that moves 400% is not a better position than one paying 20% on
        an

        asset that moves 30%, and sorting on the raw APR would say it was.


        Pools too thin for a rate to mean anything — under 20 swaps a day, or
        under

        $1,000 of liquidity — are served with `ranked: false` and always sort
        last.
      operationId: v2_risk_yield_pools
      parameters:
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            default: 0
            title: Offset
          description: The offset of the first item to return.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            exclusiveMinimum: 0
            default: 20
            title: Limit
          description: The number of items to return.
        - name: chain
          in: query
          required: true
          schema:
            type: string
            enum:
              - robinhood
            title: Chain
            default: robinhood
        - name: pair_class
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/PairClass'
              - type: 'null'
            title: Pair Class
            default: MEME_STOCK
        - name: token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Token
          description: Pools holding this token, on either side.
        - name: stock_ticker
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Stock Ticker
        - name: dex_version
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/DexVersion'
              - type: 'null'
            title: Dex Version
        - name: launchpad
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/Launchpad'
              - type: 'null'
            title: Launchpad
        - name: lp_earns_fees
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Lp Earns Fees
            default: true
          description: >-
            Leave unset to see everything. Set true to hide the pools whose hook
            keeps the fee — most of this chain's volume, and none of its yield.
        - name: lp_open
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            default: true
            title: Lp Open
          description: Whether liquidity may be added at all.
        - name: watched
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            title: Watched
          description: >-
            Only pools the indexer follows closely, which are the only ones with
            trailing metrics.
        - name: min_tvl_usd
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                minimum: 0
              - type: string
                pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              - type: 'null'
            title: Min Tvl Usd
        - name: min_volume_24h_usd
          in: query
          required: false
          schema:
            anyOf:
              - type: number
                minimum: 0
              - type: string
                pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
              - type: 'null'
            title: Min Volume 24H Usd
        - name: order_by
          in: query
          required: false
          schema:
            type: string
            enum:
              - il_adjusted_apr_7d
              - fee_apr_24h
              - fee_apr_7d
              - tvl_usd
              - volume_24h_usd
              - volume_7d_usd
              - realized_vol_24h
              - realized_vol_7d
              - created_at
            title: PoolOrderBy
            default: il_adjusted_apr_7d
        - name: direction
          in: query
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            title: Direction
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DexPoolsResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: python
          label: Python (SDK)
          source: |-
            from compass_api_sdk import CompassAPI, models


            with CompassAPI(
                api_key_auth="<YOUR_API_KEY_HERE>",
            ) as compass_api:

                res = compass_api.risk_yield.risk_yield_pools(chain=models.V2RiskYieldPoolsChain.ROBINHOOD, offset=0, limit=20, pair_class=models.PairClass.MEME_STOCK, lp_earns_fees=True, lp_open=True, order_by=models.PoolOrderBy.IL_ADJUSTED_APR_7D)

                # Handle response
                print(res)
        - lang: typescript
          label: Typescript (SDK)
          source: |-
            import { CompassApiSDK } from "@compass-labs/api-sdk";

            const compassApiSDK = new CompassApiSDK({
              apiKeyAuth: "<YOUR_API_KEY_HERE>",
            });

            async function run() {
              const result = await compassApiSDK.riskYield.riskYieldPools({
                offset: 0,
                limit: 20,
                chain: "robinhood",
                pairClass: "MEME_STOCK",
                lpEarnsFees: true,
                lpOpen: true,
                orderBy: "il_adjusted_apr_7d",
              });

              console.log(result);
            }

            run();
components:
  schemas:
    PairClass:
      type: string
      enum:
        - MEME_STOCK
        - STOCK_STABLE
        - STOCK_ETH
        - STOCK_STOCK
        - MEME_ETH
        - MEME_STABLE
        - ETH_STABLE
        - OTHER
      title: PairClass
      description: What kind of pair a pool is, which is what the product is sorted by.
    DexVersion:
      type: string
      enum:
        - V3
        - V4
      title: DexVersion
      description: >-
        Which Uniswap deployment a pool belongs to.


        v3 pools hold their own tokens and pay LPs the fee tier. v4 pools live
        in a

        shared PoolManager and may route the fee through a hook, which is where
        the

        launchpad pools' zero LP yield comes from.
    Launchpad:
      type: string
      enum:
        - PONS_V1
        - PONS_V2
        - POOLS_TRADE
        - BAGS
      title: Launchpad
    DexPoolsResponse:
      properties:
        total:
          type: integer
          title: Total
        offset:
          type: integer
          title: Offset
        limit:
          type: integer
          title: Limit
        pools:
          items:
            $ref: '#/components/schemas/DexPoolInfo'
          type: array
          title: Pools
      type: object
      required:
        - total
        - offset
        - limit
        - pools
      title: DexPoolsResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    DexPoolInfo:
      properties:
        pool_id:
          type: integer
          title: Pool Id
        dex_version:
          $ref: '#/components/schemas/DexVersion'
        address:
          anyOf:
            - type: string
            - type: 'null'
          title: Address
          description: v3 pools have their own address; v4 pools share a manager.
        pool_key:
          type: string
          title: Pool Key
          description: The v4 PoolId, or the v3 pool address. Unique per chain.
        token0:
          $ref: '#/components/schemas/DexTokenRef'
        token1:
          $ref: '#/components/schemas/DexTokenRef'
        fee_ppm:
          type: integer
          title: Fee Ppm
        fee_pct:
          type: string
          title: Fee Pct
        tick_spacing:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tick Spacing
        hooks:
          anyOf:
            - type: string
            - type: 'null'
          title: Hooks
        pair_class:
          $ref: '#/components/schemas/PairClass'
        stock_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Stock Token
        meme_token:
          anyOf:
            - type: string
            - type: 'null'
          title: Meme Token
        stock_ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Stock Ticker
        launchpad_origin:
          anyOf:
            - $ref: '#/components/schemas/Launchpad'
            - type: 'null'
        watched:
          type: boolean
          title: Watched
          description: >-
            Whether the indexer follows this pool closely. Unwatched pools carry
            a price but no trailing metrics.
        lp_open:
          type: boolean
          title: Lp Open
          description: Whether anyone may add liquidity, or a hook forbids it.
        lp_earns_fees:
          type: boolean
          title: Lp Earns Fees
          description: >-
            Whether an external liquidity provider receives the swap fee.
            **False for every launchpad-graduated pool on this chain**, whose
            hook takes the fee for the protocol and the creator. Those pools
            trade heavily and pay you nothing.
        lp_fee_note:
          anyOf:
            - type: string
            - type: 'null'
          title: Lp Fee Note
          description: Why, in a sentence, when `lp_earns_fees` is false.
        tvl_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Tvl Usd
        tvl_confidence:
          anyOf:
            - type: string
            - type: 'null'
          title: Tvl Confidence
        volume_24h_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Volume 24H Usd
        volume_7d_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Volume 7D Usd
        fees_24h_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Fees 24H Usd
        fees_7d_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Fees 7D Usd
        swaps_24h:
          anyOf:
            - type: integer
            - type: 'null'
          title: Swaps 24H
        fee_apr_24h:
          anyOf:
            - type: string
            - type: 'null'
          title: Fee Apr 24H
          description: Percent. Exactly 0 when LPs earn no fees.
        fee_apr_7d:
          anyOf:
            - type: string
            - type: 'null'
          title: Fee Apr 7D
        fee_apr_full_range_24h:
          anyOf:
            - type: string
            - type: 'null'
          title: Fee Apr Full Range 24H
          description: >-
            Percent, and the honest one: what a *new* full-range dollar would
            have earned, rather than the return on liquidity already
            concentrated where the price happens to be.
        realized_vol_24h:
          anyOf:
            - type: string
            - type: 'null'
          title: Realized Vol 24H
          description: Annualized standard deviation, in percent.
        realized_vol_7d:
          anyOf:
            - type: string
            - type: 'null'
          title: Realized Vol 7D
        il_adjusted_apr_7d:
          anyOf:
            - type: string
            - type: 'null'
          title: Il Adjusted Apr 7D
          description: >-
            Fee APR less the expected impermanent-loss drag, `sigma^2/8`
            annualized. The number to sort by: a pool paying 200% on an asset
            that moves 400% is not a better position than one paying 20% on an
            asset that moves 30%.
        price:
          anyOf:
            - type: string
            - type: 'null'
          title: Price
          description: token1 per token0, decimals-adjusted.
        price_change_24h_pct:
          anyOf:
            - type: string
            - type: 'null'
          title: Price Change 24H Pct
        locked_share:
          anyOf:
            - type: string
            - type: 'null'
          title: Locked Share
          description: >-
            Fraction of the liquidity that can never be withdrawn — a
            launchpad's graduation position. It will not leave when the price
            moves, and it is not depth anyone chose to provide.
        meme_fdv_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Meme Fdv Usd
        ranked:
          type: boolean
          title: Ranked
          description: >-
            False when the pool is too thin for its APR to mean anything (under
            20 swaps in 24h or $1,000 of TVL). Such pools sort last.
          default: true
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        last_swap_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Swap At
        stats_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Stats Updated At
      type: object
      required:
        - pool_id
        - dex_version
        - pool_key
        - token0
        - token1
        - fee_ppm
        - fee_pct
        - pair_class
        - watched
        - lp_open
        - lp_earns_fees
      title: DexPoolInfo
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    DexTokenRef:
      properties:
        address:
          type: string
          title: Address
        symbol:
          anyOf:
            - type: string
            - type: 'null'
          title: Symbol
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        decimals:
          anyOf:
            - type: integer
            - type: 'null'
          title: Decimals
          description: Null until read on chain; never assume 18 on this chain.
        kind:
          $ref: '#/components/schemas/DexTokenKind'
          default: OTHER
        price_usd:
          anyOf:
            - type: string
            - type: 'null'
          title: Price Usd
        price_source:
          anyOf:
            - $ref: '#/components/schemas/PriceSource'
            - type: 'null'
        price_confidence:
          anyOf:
            - type: string
            - type: 'null'
          title: Price Confidence
          description: 0-1. Below 0.6 the USD figures derived from it are indicative only.
        stock_ticker:
          anyOf:
            - type: string
            - type: 'null'
          title: Stock Ticker
      type: object
      required:
        - address
      title: DexTokenRef
      description: A token as every Risk Yield response describes it.
    DexTokenKind:
      type: string
      enum:
        - STOCK
        - STABLE
        - NATIVE
        - WRAPPED_NATIVE
        - MAJOR
        - LAUNCHPAD_MEME
        - OTHER
      title: DexTokenKind
    PriceSource:
      type: string
      enum:
        - CHAINLINK
        - RH_REST
        - LLAMA
        - POOL
        - PEG
      title: PriceSource
      description: >-
        Where a USD price came from, best first.


        Returned with every price because they are not equally trustworthy: a

        Chainlink feed is a measurement, a price read off a shallow pool is
        closer

        to a rumour.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Your Compass API Key. Get your key
        [here](https://www.compasslabs.ai/dashboard).

````