---
title: "Get min/max price over a window"
url: https://docs.truemarkets.co/api/market-data/get-price-range
description: "Returns the minimum and maximum price observed for an asset within a"
---

Docs index: https://docs.truemarkets.co/llms.txt

# Get min/max price over a window

```
GET https://api.truemarkets.co/v1/defi/market/prices/range
```

Returns the minimum and maximum price observed for an asset within a
configurable lookback window, along with the timestamps at which each
extreme occurred. Useful for surfacing 24h highs/lows or computing
period-over-period statistics.

See the [Time Window & Resolution](#section/Time-Window-and-Resolution)
section for the format of `window`.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `asset_id` | query | string (uuid) | no | Backend asset ID. Mutually exclusive with `symbol`: exactly one of the two is required, and naming both is a 400. |
| `symbol` | query | string | no | Asset symbol to fetch the range for (e.g. `SOL`, `BTC`). |
| `window` | query | string | no | Lookback period (e.g. `1h`, `4h`, `1d`, `7d`, `1M`). |
| `asset_class` | query | string, one of `spot`, `perp` | no | Asset class to resolve the symbol in. Defaults to `spot`. |

## Responses

Every error status returns the same body, described in [Errors](https://docs.truemarkets.co/developer-resources/errors.md).

### 200

Price range data for the requested symbol

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `asset_id` | string (uuid) | no | Backend asset ID. Absent on the CeFi routes. |
| `symbol` | string | no | The asset symbol |
| `window` | string | no | The time window used for the query |
| `min_price` | string | no | Minimum price within the window |
| `max_price` | string | no | Maximum price within the window |
| `min_timestamp` | string | no | ISO 8601 timestamp when the minimum price occurred |
| `max_timestamp` | string | no | ISO 8601 timestamp when the maximum price occurred |

### 400

Bad request - invalid parameters

### 404

Symbol not found or no price data

### 500

Internal server error
