---
search:
  tags:
    - Market
    - GET
seo:
  description: >-
    Answers the pool's trading summed… Reference for the GET
    /v1/pools/{chain}/{protocol}/{variant}/{deployment}/{poolKey}/stats endpoint
    in the INVICTUS API.
sidebar:
  label: Trading by window.
  badge: GET
title: Trading by window.
type: openapi-operation
---
Answers the pool's trading summed over each window, shortest first. A window longer than the pool's life is unavailable.

`GET /v1/pools/{chain}/{protocol}/{variant}/{deployment}/{poolKey}/stats`

**Responses**

- `200` — Success.
- `400` — Invalid input; \`errors\` names the fields.
- `404` — Not found, or not yours.
- `429` — Too many requests; \`retryAfterSeconds\` says when to ask again.
- `500` — Server error.

Response example, 200:

```json
{
  "windows": [
    {
      "window": "5m",
      "priceChangePercent": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      },
      "swaps": {
        "status": "exact",
        "value": {
          "total": 0,
          "buys": 0
        },
        "observedAt": 1793145600
      },
      "volumeUsd": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      },
      "netFlowUsd": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      }
    },
    {
      "window": "5m",
      "priceChangePercent": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      },
      "swaps": {
        "status": "exact",
        "value": {
          "total": 0,
          "buys": 0
        },
        "observedAt": 1793145600
      },
      "volumeUsd": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      },
      "netFlowUsd": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      }
    },
    {
      "window": "5m",
      "priceChangePercent": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      },
      "swaps": {
        "status": "exact",
        "value": {
          "total": 0,
          "buys": 0
        },
        "observedAt": 1793145600
      },
      "volumeUsd": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      },
      "netFlowUsd": {
        "status": "exact",
        "value": "1234.56",
        "observedAt": 1793145600
      }
    }
  ],
  "volatilityPercent": {
    "status": "exact",
    "value": "1234.56",
    "observedAt": 1793145600
  },
  "activeTvlUsd": {
    "status": "exact",
    "value": "1234.56",
    "observedAt": 1793145600
  },
  "traders24h": {
    "status": "exact",
    "value": {
      "low": 0,
      "high": 0
    },
    "observedAt": 1793145600
  },
  "asOf": 1793145600
}
```
