---
title: "Delete Backtest"
method: DELETE
path: "/v1/backtests/{run_id}"
---

# Delete Backtest

`DELETE /v1/backtests/{run_id}`

## Request

- Base URL: `https://api.quantradin.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.quantradin.com/v1/backtests/{run_id}`
- Auth: none declared

Delete ONE of the caller's own runs, and revoke any public share of it.

Owner-only, same session-wins-else-X-Vega-Key-else-pair resolution as the
poll/export/share routes; the shared guest key with no session is refused
(guest A must not delete guest B's run). A run you don't own answers the
SAME 404 "Backtest not found" as a run that never existed, and a second
delete is that same plain 404 — never a 500.

The share is revoked FIRST and in the same request (reusing
db.revoke_shares_for_run, the helper behind DELETE
/v1/backtests/{id}/share): a public link that outlived its run would 404 for
the reader while still looking like a live link to whoever holds it.
Returns ``{"deleted": run_id, "share_revoked": bool}``.

A DEPLOYED bot is unaffected — a grade attached to a deployment lives in
`deployment.backtest_result`, its own copy, so deleting the run never blanks
a bot's report card. No confirm flag: a run is a receipt of a computation,
not money history, and the member can always run it again.

## Path parameters

- `run_id` string, required

## Headers

- `x-vega-key` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

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