# Get an event study

Source: https://langbot.ai/docs/api/sim/get-study

`GET /v1/sim/events/{event_id}/study`

How each market's YES mid moved in the seconds and minutes after chosen words were said, with sample sizes and caveats.

**Auth.** An API token: `Authorization: Bearer lb_…` ([create one](https://langbot.ai/app/tokens)). Signed-in web sessions work too.

**Limits.** Counts against your plan's API requests (60, 600 or 3,000 a minute on Free, Builder and Standard). Does not count as a Sim run.

## Parameters

### Path parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `event_id` | string | yes | A replayable event (`ev_…`). |

### Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `words` | string | no | Comma-separated words or phrases; default every phrase heard. |
| `tickers` | string | no | Comma-separated tickers; default every ticker with books. |
| `horizons` | string | no | Comma-separated horizons in seconds. Default `5,30,300`. |
| `clock` | string | no | `emitted` (when the data was available, default) or `spoken`. |
| `require_counts` | boolean | no | Only hits Langbot read as counting under the rules. Default `false`. |

## Request

**curl**

```bash
curl "https://api.langbot.ai/v1/sim/events/ev_kxearningsmentiongs_26oct13/study?words=private%20credit&horizons=5,30,300" \
  -H "Authorization: Bearer $LANGBOT_API_TOKEN"
```

**Python**

```python
import os

import httpx

r = httpx.get(
    "https://api.langbot.ai/v1/sim/events/ev_kxearningsmentiongs_26oct13/study?words=private%20credit&horizons=5,30,300",
    headers={"Authorization": f"Bearer {os.environ['LANGBOT_API_TOKEN']}"},
)
print(r.json())
```

**TypeScript**

```ts
const res = await fetch("https://api.langbot.ai/v1/sim/events/ev_kxearningsmentiongs_26oct13/study?words=private%20credit&horizons=5,30,300", {
  headers: { Authorization: `Bearer ${process.env.LANGBOT_API_TOKEN}` },
});
console.log(await res.json());
```

## Response

`200 OK`

```json
{
  "v": 1,
  "clock": "emitted",
  "horizons_ms": [5000, 30000, 300000],
  "triggers": 3,
  "results": [
    {
      "word": "private credit",
      "ticker": "KXEARNINGSMENTIONGS-26OCT13-PRIV",
      "triggers": 3,
      "priced": 3,
      "horizons": [ { "horizon_ms": 30000, "n": 3, "mean_c": 4.0, "median_c": 3.5, "up": 1.0, "down": 0.0, "flat": 0.0 } ]
    }
  ],
  "caveats": ["n < 10 at the middle horizon"]
}
```

Price moves in cents. A measurement of the record, not a signal; with few triggers it says little.

## Errors

| Status | `code` | When |
|---|---|---|
| 401 | `auth_required` | No token was sent. |
| 401 | `token_invalid` | The token was not recognised (mistyped, revoked or expired). |
| 422 | `validation_error` | A parameter failed validation; `detail[].loc` names it. |
| 429 | `rate_limited` | Over your request budget; wait `Retry-After` seconds. |

Every error body is `{"detail": …, "code": "…"}`; branch on `code`. All codes: [Errors](https://langbot.ai/docs/api#errors).
