> ## 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.

# Trades within Time Range by Pool Address

> To query the trades within a range of timestamp based on the provided pool address

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

* Paginate with `cursor` rather than a page number:
  * Pass `meta.next_cursor` back unchanged as `cursor` to fetch the next page.
  * `meta.next_cursor` is `null` on the last page.
* For a relative lookback instead of an absolute window, use [Trades by Pool Address](/reference/pool-trades-contract-address) with `trading_period`.

<Warning>
  `from` and `to` are both required, and the window between them cannot exceed 30 days.

  * Both ends are inclusive.
  * Neither may be later than the current server time.
</Warning>

<PlanExclusivity tier="analyst_above" />

<CacheInfo rate="60 seconds" />


## OpenAPI

````yaml openapi-specs/pro-api.json get /onchain/networks/{network}/pools/{pool_address}/trades/range
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/networks/{network}/pools/{pool_address}/trades/range:
    get:
      summary: Trades within Time Range by Pool Address
      description: >-
        To query the trades within a range of timestamp based on the provided
        pool address
      operationId: pool-trades-contract-address-range
      parameters:
        - name: network
          in: path
          required: true
          description: |-
            Network ID. 
            *refers to [`/onchain/networks`](/reference/networks-list).
          schema:
            type: string
            default: eth
        - name: pool_address
          in: path
          required: true
          description: Pool contract address.
          schema:
            type: string
            default: '0x06da0fd433c1a5d7a4faa01111c044910a184553'
        - name: trade_volume_in_usd_greater_than
          in: query
          required: false
          description: |-
            Filter trades by trade volume in USD greater than this value. 
            Default value: 0
          schema:
            type: number
        - name: token
          in: query
          required: false
          description: |-
            Return trades for token, use this to invert the chart. 
            Available values: `base`, `quote`, or token address. 
            Default: `base`
          schema:
            type: string
        - name: from
          in: query
          required: true
          description: >-
            Starting date in ISO date string (`YYYY-MM-DD` or
            `YYYY-MM-DDTHH:MM`) or UNIX timestamp. 

            **Use ISO date string for best compatibility.**
          schema:
            type: string
            default: '2026-09-01'
        - name: to
          in: query
          required: true
          description: >-
            Ending date in ISO date string (`YYYY-MM-DD` or `YYYY-MM-DDTHH:MM`)
            or UNIX timestamp. 

            **Use ISO date string for best compatibility.**
          schema:
            type: string
            default: '2026-09-08'
        - name: cursor
          in: query
          required: false
          description: >-
            Cursor from the previous response, passed back unchanged to fetch
            the next page.
          schema:
            type: string
        - name: per_page
          in: query
          required: false
          description: |-
            Total results per page. 
            Default value: 100 
            Valid values: 1...300
          schema:
            type: integer
      responses:
        '200':
          description: Trades from a pool within a time range
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trades'
              example:
                data:
                  - id: >-
                      eth_25928873_0x2d17e7f893da1d87e893dd6ddcc42366ea3680c13d4be129d6d1ebac271bac40_167_1788825063
                    type: trade
                    attributes:
                      block_number: 25928873
                      tx_hash: >-
                        0x2d17e7f893da1d87e893dd6ddcc42366ea3680c13d4be129d6d1ebac271bac40
                      tx_from_address: '0x0000000000f8492ebaf65b3c0457cca8948badfe'
                      from_token_amount: '0.475091'
                      to_token_amount: '0.00019056174944482'
                      price_from_in_currency_token: '0.000401105786985693'
                      price_to_in_currency_token: '1.0'
                      price_from_in_usd: '0.999728096656752'
                      price_to_in_usd: '2492.43'
                      block_timestamp: '2026-09-07T23:50:47Z'
                      kind: sell
                      volume_in_usd: '0.474961821168753'
                      from_token_address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
                      to_token_address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
                  - id: >-
                      eth_25928873_0x05a0ba340fc07a23a5179ed0c7b68c0a7fe5e40487f1d2bb5d96f5d2eda6a1cb_26_1788825060
                    type: trade
                    attributes:
                      block_number: 25928873
                      tx_hash: >-
                        0x05a0ba340fc07a23a5179ed0c7b68c0a7fe5e40487f1d2bb5d96f5d2eda6a1cb
                      tx_from_address: '0x0e14a3e9af1afdfc60554e3e2a40c8284d647093'
                      from_token_amount: '42.234864'
                      to_token_amount: '0.0169429755714377'
                      price_from_in_currency_token: '0.000401160888583367'
                      price_to_in_currency_token: '1.0'
                      price_from_in_usd: '0.999865433531841'
                      price_to_in_usd: '2492.43'
                      block_timestamp: '2026-09-07T23:50:47Z'
                      kind: sell
                      volume_in_usd: '42.2291806035184'
                      from_token_address: '0xdac17f958d2ee523a2206206994597c13d831ec7'
                      to_token_address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
                meta:
                  next_cursor: >-
                    eyJidCI6IjIwMjYtMDktMDdUMjM6NTA6NDcuMDAwMDAwMDAwWiIsImJuIjoyNTkyODg3MywidHgiOiIweDA1YTBiYTM0MGZjMDdhMjNhNTE3OWVkMGM3YjY4YzBhN2ZlNWU0MDQ4N2YxZDJiYjVkOTZmNWQyZWRhNmExY2IiLCJsaSI6MjYsIndmIjoxNzg4MjIwODAwLCJmcCI6Ijk1OGY2N2VkZmU2NDRjMmU2ZTE5NTlkNWQ2ZThmM2FjZDY3YTFiYWYzYWI3YzJmMTVhYmUzNjkzMjhhNjEyZTAiLCJpYXQiOjE3ODg5Mzk0MjF9
components:
  schemas:
    Trades:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          items:
            type: object
            required:
              - id
              - type
              - attributes
            properties:
              id:
                type: string
                description: Trade identifier
              type:
                type: string
                description: Resource type
              attributes:
                type: object
                required:
                  - block_number
                  - tx_hash
                  - tx_from_address
                  - from_token_amount
                  - to_token_amount
                  - price_from_in_currency_token
                  - price_to_in_currency_token
                  - price_from_in_usd
                  - price_to_in_usd
                  - block_timestamp
                  - kind
                  - volume_in_usd
                  - from_token_address
                  - to_token_address
                properties:
                  block_number:
                    type: integer
                    description: Block number of the trade
                  tx_hash:
                    type: string
                    description: Transaction hash
                  tx_from_address:
                    type: string
                    description: Transaction sender address
                  from_token_amount:
                    type: string
                    description: Amount of token sent
                  to_token_amount:
                    type: string
                    description: Amount of token received
                  price_from_in_currency_token:
                    type: string
                    description: Price of from-token in currency token
                  price_to_in_currency_token:
                    type: string
                    description: Price of to-token in currency token
                  price_from_in_usd:
                    type: string
                    description: Price of from-token in USD
                  price_to_in_usd:
                    type: string
                    description: Price of to-token in USD
                  block_timestamp:
                    type: string
                    description: Block timestamp
                  kind:
                    type: string
                    description: Trade kind (buy or sell)
                  volume_in_usd:
                    type: string
                    description: Trade volume in USD
                  from_token_address:
                    type: string
                    description: From-token contract address
                  to_token_address:
                    type: string
                    description: To-token contract address
        meta:
          type: object
          required:
            - next_cursor
          properties:
            next_cursor:
              type: string
              nullable: true
              description: Cursor for the next page, null when there are no further pages
  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)

````