---
title: "Run a multi asset portfolio backtest: BILLS ONE CREDIT PER ASSET"
method: POST
path: "/v1/portfolio/execute"
---

# Run a multi asset portfolio backtest: BILLS ONE CREDIT PER ASSET

`POST /v1/portfolio/execute`

## Request

- Base URL: `https://app.texttoquant.com/api`
- URL: `https://app.texttoquant.com/api/v1/portfolio/execute`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Async: returns a jobId to poll at GET /v1/portfolio/execute/{jobId}. All or nothing, if the account cannot cover every asset the run is refused, not partially executed. Send Idempotency-Key to make a retry safe.

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `assets` object[], required
  - `initialCapital` number
  - `settings` object
  - `advanced` object

## Response `200`

Success

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

## Other responses

- `202`: Accepted — poll jobId
- `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.
- `402`: insufficient_credits
- `429`: rate_limited

---

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