# Test an options structure over the archive

> Price an SPX 0DTE structure of up to four legs at an entry minute over the archived sessions on real quotes and settlement. 10 credits, refunded on failure; answers 202 with a job to poll.

Source: https://firmtape.com/docs/developers/lab/options-run

Price an SPX 0DTE structure of up to four legs at an entry minute over the archived sessions on real quotes and settlement. 10 credits, refunded on failure; answers 202 with a job to poll.

`POST /api/struct/run`

Plan LAB · Key scope lab · Limit 10 credits a run · Version 1.0.0 · Since 2026-08-31

**This endpoint serves:** [LIVE: The archive run](https://firmtape.com/docs/live#archive-run), [LIVE: The structure tester](https://firmtape.com/docs/live#structure-tester). **Plan:** [LAB](https://firmtape.com/features/lab). LAB credits: developing an idea is free, a backtest or an optimize pass is one credit, the desk is free once an idea is tested. LIVE includes 5 credits a month.

## Body

| Field | Meaning | Unit |
| --- | --- | --- |
| `spec` (object) |  |  |
| `spec.legs` (array) | One to four SPX 0DTE legs, as the terminal's OPTIONS pane builds them |  |
| `spec.entry` (string) | Entry time, HH:MM ET |  |

## Response

`{ job }`: poll `GET /api/struct/job`.

| Field | Meaning | Unit |
| --- | --- | --- |
| `job` (string) | The job id. |  |

## Errors

| Status | Code | What to do |
| --- | --- | --- |
| 400 |  | A parameter is wrong. |
| 401 |  | No key, or an unknown or revoked one. Send a `lab` key. |
| 402 |  | No credits. Buy credits on the LAB page. |

## Request

```sh
curl -X POST \
  -H "Authorization: Bearer $FIRMTAPE_LAB_KEY" \
  "https://firmtape.com/api/struct/run"
```

```python
import os, requests

H = {"Authorization": f"Bearer {os.environ['FIRMTAPE_LAB_KEY']}"}
r = requests.post("https://firmtape.com/api/struct/run", headers=H)
print(r.status_code, r.text[:500])
```

```js
const r = await fetch("https://firmtape.com/api/struct/run", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.FIRMTAPE_LAB_KEY}` },
});
console.log(r.status, await r.text());
```

## Changes

- 2026-08-31: Added.
