> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Set a program for a symbol

> **Required scope:** write

**Required scope:** `write`

### Request body

`SetProgramRequest`

**program** `ProgramRequest` *required*

**symbol\_id** `integer (int64)` *required*

Symbol ID

### Response

`ProgramResponse`

**depth** `integer` *required*

Program depth

**program** `string` *required*

Program representation (simplified)

**symbol\_id** `integer (int64)` *required*

Symbol ID

### Status codes

| Code | Meaning |
| - | - |
| `200` | Program set |
| `400` | Invalid request |
| `401` | Unauthorized — missing or invalid credentials |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

```bash cURL theme={null}
curl --request POST \
  --url 'https://api.nsr.stateset.com/api/v1/nsr/programs' \
  --header "X-API-Key: $STATESET_NSR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "program": {
    "index": 1,
    "type": "var"
  },
  "symbol_id": 1001
}'
```

```json 200 theme={null}
{
  "depth": 1,
  "program": "string",
  "symbol_id": 1001
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.