---
title: "Re-run gated on a pre-entry context filter (BILLS one credit)"
method: POST
path: "/v1/backtests/{id}/context-run"
---

# Re-run gated on a pre-entry context filter (BILLS one credit)

`POST /v1/backtests/{id}/context-run`

## Request

- Base URL: `https://app.texttoquant.com/api`
- URL: `https://app.texttoquant.com/api/v1/backtests/{id}/context-run`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `contextFilter` object, required

## Response `200`

Job started — returns {jobId}; poll the sibling GET

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

## Other responses

- `400`: SYMBOL_UNRESOLVED (no market and no company name match) or SYMBOL_AMBIGUOUS (a crypto token and a listed share use the same symbol, e.g. CAT). Refused before billing, nothing is charged. details.blockers[0] is the repair card. For the run's own asset each candidates[].patch.asset is a one tap fix (the near company listing, or the token pair and the share listings): resend with the chosen asset. With scope "condition" the symbol is read by a condition (another market's indicator, a ratio, a correlation), not the run's asset: never change asset. Write the chosen symbol in that condition. When one entry or exit condition holds it, the card has a locator {section, index} and each candidates[].condition is that whole condition with its symbol field rewritten: replace the condition at the locator and resend. On a rerun of a saved backtest (storedRun true) a condition card has no candidates: the saved run cannot be changed in place, so edit that condition in the strategy and run it as a new backtest.

---

[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)
