---
title: "Run dataset: regime-segments (run_id comes from GET /v1/backtests/{id})"
method: GET
path: "/v1/runs/{runId}/regime-segments"
---

# Run dataset: regime-segments (run_id comes from GET /v1/backtests/{id})

`GET /v1/runs/{runId}/regime-segments`

## Request

- Base URL: `https://app.texttoquant.com/api`
- URL: `https://app.texttoquant.com/api/v1/runs/{runId}/regime-segments`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

The numbers behind a finished run. Requires the `resultsHistory` plan feature. The same data is served to the app at `/api/runs/{runId}/regime-segments` under a session JWT; this is the key-authed mirror. Page with `offset`+`limit`, or ask for `maxPoints` to get an even downsample of the WHOLE range in one call. The price action regime block timeline as run length spans {start, end, state} (epoch ms, end inclusive; 1 Trend Up, -1 Trend Down, 0 Quiet Range, 2 Volatile Chop; gaps = bars the classifier declined to label). Its own dataset since 2026-09-14: metrics.regimeBreakdown carries only segmentCount. Chart data for the regime tinted views; per trade attribution is on the trade rows.

## Path parameters

- `runId` string, uuid, required

## Query parameters

- `start` string, date-time
- `end` string, date-time
- `limit` integer
- `maxPoints` integer
- `offset` integer
- `raw` '1'

## Response `200`

Success

- object
  - `success` true, required
  - `data` object, required

## Other responses

- `403`: plan_feature_required (resultsHistory)
- `404`: not_found (run not owned or expired)

---

[API](https://skmtc.dev/texttoquant/apis/texttoquant-api.md) · [All operations](https://skmtc.dev/texttoquant/apis/texttoquant-api/llms.txt) · [OpenAPI document](https://skmtc.dev/texttoquant/apis/texttoquant-api/revisions/d417fc3f4a7d?raw)
