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

# Pools by Category ID

> To query all the pools based on the provided category ID

export const CacheInfo = ({publicRate, paidRate, rate}) => {
  const fmt = v => v === 0 ? 'Real-time (Cacheless)' : `Every ${v}`;
  if (rate !== undefined) {
    return <Callout icon="clock-rotate-left" color="#2196F3" iconType="regular">
        <strong>Cache / Update Frequency:</strong><br />{fmt(rate)}
      </Callout>;
  }
  if (publicRate !== undefined && paidRate !== undefined) {
    return <Callout icon="clock-rotate-left" color="#2196F3" iconType="regular">
        <strong>Cache / Update Frequency:</strong><ul><li>{fmt(paidRate)} (Paid API)</li><li>{fmt(publicRate)} (Demo / Keyless API)</li></ul>
      </Callout>;
  }
  return null;
};

export const PlanExclusivity = ({tier}) => {
  if (tier === "enterprise") {
    return <Callout icon="crown" color="#FFC107" iconType="regular">
        <strong>Enterprise Only</strong><br />This endpoint is exclusively available to <strong>Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/enterprise">→ Contact sales</a>
      </Callout>;
  }
  if (tier === "analyst_above") {
    return <Callout icon="briefcase" color="#FFC107" iconType="regular">
        <strong>Analyst Plan and Above</strong><br />This endpoint is only available to <strong>Analyst, Lite, Pro, and Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/pricing">→ View pricing</a>
      </Callout>;
  }
  if (tier === "basic_above") {
    return <Callout icon="briefcase" color="#FFC107" iconType="regular">
        <strong>Basic Plan and Above</strong><br />This endpoint is only available to <strong>Basic, Analyst, Lite, Pro, and Enterprise</strong> plan.<br /><a href="https://www.coingecko.com/en/api/pricing">→ View pricing</a>
      </Callout>;
  }
  throw new Error(`PlanExclusivity: invalid tier "${tier}". Use "basic_above", "analyst_above", or "enterprise".`);
};

#### Notes

* Get category IDs from [Categories List](/reference/categories-list). Use `include=base_token` to retrieve tokens for a specific category.
* Trending rankings are determined by:
  * User engagement on GeckoTerminal
  * Market activity (volume, transactions)
  * Pool security (liquidity, honeypot checks)
* Returns up to 20 pools per page. Use the `page` param to navigate more results.
* GeckoTerminal categories are different from [CoinGecko categories](/reference/coins-categories-list).

<PlanExclusivity tier="analyst_above" />

<CacheInfo rate="30 seconds" />

#### SDK Examples

<CodeGroup>
  ```typescript TypeScript theme={null}
  const response = await client.onchain.categories.getPools('pump-fun');

  console.log(JSON.stringify(response, null, 2));
  ```

  ```python Python theme={null}
  response = client.onchain.categories.get_pools("pump-fun")

  print(response.model_dump_json(indent=2))
  ```
</CodeGroup>


## OpenAPI

````yaml openapi-specs/pro-api.json get /onchain/categories/{category_id}/pools
openapi: 3.0.0
info:
  title: CoinGecko Pro API
  version: 3.0.0
servers:
  - url: https://pro-api.coingecko.com/api/v3
security:
  - headerAuth: []
  - queryAuth: []
paths:
  /onchain/categories/{category_id}/pools:
    get:
      summary: Pools by Category ID
      description: To query all the pools based on the provided category ID
      operationId: pools-category
      parameters:
        - name: category_id
          in: path
          required: true
          description: Category ID.
          schema:
            type: string
            default: pump-fun
        - name: include
          in: query
          required: false
          description: |-
            Attributes to include, comma-separated if more than one. 
            Available values: `base_token`, `quote_token`, `dex`, `network`
          schema:
            type: string
        - name: page
          in: query
          required: false
          description: |-
            Page through results. 
            Default value: 1
          schema:
            type: integer
        - name: sort
          in: query
          required: false
          description: |-
            Sort the pools by field. 
            Default: `pool_created_at_desc`
          schema:
            type: string
            enum:
              - m5_trending
              - h1_trending
              - h6_trending
              - h24_trending
              - h24_tx_count_desc
              - h24_volume_usd_desc
              - pool_created_at_desc
              - h24_price_change_percentage_desc
      responses:
        '200':
          description: Pools by category
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CategoriesPools'
              example:
                data:
                  - id: solana_DaZJ1A8ZqiSbSr7M5uFudafDUXLSNQX1zVpcyDhJZEzF
                    type: pool
                    attributes:
                      base_token_price_usd: >-
                        0.0000013253687934057798494580598374625617972585734733709883585887625
                      base_token_price_native_currency: '0.0000000176094592913516'
                      quote_token_price_usd: '80.816693597538487283130171047763638910597932545'
                      quote_token_price_native_currency: '1.0'
                      base_token_price_quote_token: '0.00000001760945929'
                      quote_token_price_base_token: '56787660.7370405'
                      address: DaZJ1A8ZqiSbSr7M5uFudafDUXLSNQX1zVpcyDhJZEzF
                      name: 69 / SOL
                      pool_created_at: '2026-05-28T04:58:01Z'
                      fdv_usd: '5325.9944'
                      market_cap_usd: null
                      price_change_percentage:
                        m5: '2.451'
                        m15: '2.451'
                        m30: '2.451'
                        h1: '2.451'
                        h6: '2.451'
                        h24: '2.451'
                      reserve_in_usd: '1123.21403520731'
                      h24_volume_usd: '4.1209741111'
                      h24_tx_count: 2
                    relationships:
                      base_token:
                        data:
                          id: solana_27pLeUemQJmxYGxsxzUTEkvi2e9eMs2xkBNB85u4pump
                          type: token
                      quote_token:
                        data:
                          id: solana_So11111111111111111111111111111111111111112
                          type: token
                      network:
                        data:
                          id: solana
                          type: network
                      dex:
                        data:
                          id: pump-fun
                          type: dex
                included:
                  - id: solana_27pLeUemQJmxYGxsxzUTEkvi2e9eMs2xkBNB85u4pump
                    type: token
                    attributes:
                      address: 27pLeUemQJmxYGxsxzUTEkvi2e9eMs2xkBNB85u4pump
                      name: pupu69$
                      symbol: '69'
                      decimals: 6
                      image_url: >-
                        https://assets.geckoterminal.com/zhxpv93rywekjkckn59b3a3ghl1v
                      coingecko_coin_id: null
                  - id: solana_So11111111111111111111111111111111111111112
                    type: token
                    attributes:
                      address: So11111111111111111111111111111111111111112
                      name: Wrapped SOL
                      symbol: SOL
                      decimals: 9
                      image_url: >-
                        https://coin-images.coingecko.com/coins/images/21629/large/solana.jpg?1696520989
                      coingecko_coin_id: wrapped-solana
                  - id: pump-fun
                    type: dex
                    attributes:
                      name: Pump.fun
                  - id: solana
                    type: network
                    attributes:
                      name: Solana
                      coingecko_asset_platform_id: solana
components:
  schemas:
    CategoriesPools:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            type: object
            required:
              - id
              - type
              - attributes
              - relationships
            properties:
              id:
                type: string
                description: Pool identifier
              type:
                type: string
                description: Resource type
              attributes:
                type: object
                required:
                  - base_token_price_usd
                  - base_token_price_native_currency
                  - quote_token_price_usd
                  - quote_token_price_native_currency
                  - base_token_price_quote_token
                  - quote_token_price_base_token
                  - address
                  - name
                  - pool_created_at
                  - fdv_usd
                  - market_cap_usd
                  - price_change_percentage
                  - reserve_in_usd
                  - h24_volume_usd
                  - h24_tx_count
                properties:
                  base_token_price_usd:
                    type: string
                    description: Base token price in USD
                  base_token_price_native_currency:
                    type: string
                    nullable: true
                    description: Base token price in native currency
                  quote_token_price_usd:
                    type: string
                    description: Quote token price in USD
                  quote_token_price_native_currency:
                    type: string
                    nullable: true
                    description: Quote token price in native currency
                  base_token_price_quote_token:
                    type: string
                    nullable: true
                    description: Base token price in quote token
                  quote_token_price_base_token:
                    type: string
                    nullable: true
                    description: Quote token price in base token
                  address:
                    type: string
                    description: Pool contract address
                  name:
                    type: string
                    description: Pool name
                  pool_created_at:
                    type: string
                    description: Pool creation timestamp
                  fdv_usd:
                    type: string
                    nullable: true
                    description: Fully diluted valuation in USD
                  market_cap_usd:
                    type: string
                    nullable: true
                    description: Market cap in USD
                  price_change_percentage:
                    type: object
                    description: Price change percentage over various timeframes
                    properties:
                      m5:
                        type: string
                      m15:
                        type: string
                      m30:
                        type: string
                      h1:
                        type: string
                      h6:
                        type: string
                      h24:
                        type: string
                  reserve_in_usd:
                    type: string
                    nullable: true
                    description: Total reserve in USD
                  h24_volume_usd:
                    type: string
                    description: 24hr volume in USD
                  h24_tx_count:
                    type: integer
                    description: 24hr transaction count
              relationships:
                type: object
                description: Related resources
                properties:
                  base_token:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: string
                  quote_token:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: string
                  network:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: string
                  dex:
                    type: object
                    properties:
                      data:
                        type: object
                        properties:
                          id:
                            type: string
                          type:
                            type: string
        included:
          type: array
          description: >-
            Included related resources, present when include parameter is
            specified
          items:
            type: object
            properties:
              id:
                type: string
              type:
                type: string
              attributes:
                type: object
                properties:
                  address:
                    type: string
                  name:
                    type: string
                  symbol:
                    type: string
                  decimals:
                    type: integer
                  image_url:
                    type: string
                    nullable: true
                  coingecko_coin_id:
                    type: string
                    nullable: true
                  coingecko_asset_platform_id:
                    type: string
  securitySchemes:
    headerAuth:
      type: apiKey
      in: header
      name: x-cg-pro-api-key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)
    queryAuth:
      type: apiKey
      in: query
      name: x_cg_pro_api_key
      description: >-
        Learn how to [set up your API
        key](https://docs.coingecko.com/docs/setting-up-your-api-key)

````