# POST /v2/tickers/{ticker}/subscribe

**Subscribe to a ticker**

Subscribes a single ticker. `condition` is a WHERE-clause fragment evaluated when this ticker is matched — you do not need to add `ticker = '…'` yourself; the endpoint scopes the predicate to the path ticker automatically. Plan-gated by webhook tier; counts against your account-wide webhook cap. Returns the same shape as `GET /v2/webhooks/{id}`.

## Plan access

- **Plan access.** Included on every plan.
- **Cadence.** Hobby 5m · Pro 1m · Scale 1m · Enterprise 1m.
- **Capacity.** Unlimited on every paid plan.

## Body parameters

| Name | In | Type | Required | Description |
|------|----|----|----------|-------------|
| `ticker` | path | string | yes | Ticker symbol (case-insensitive). Example: `NVDA`. |
| `condition` | body | string | yes | WHERE-clause fragment using signal/column names from the schema. Example: `rsi_oversold AND high_volume_alert`. |
| `target_url` | body | string | no | https:// URL to POST when the condition fires. Omit for in-app delivery (visible in the dashboard). |
| `cadence` | body | string | no | How often to evaluate. Allowed: `1m`, `5m`, `15m`, `hourly`, `nyse_open`. Defaults to your plan max. Enum: `1m`, `5m`, `15m`, `hourly`, `nyse_open`. |
| `name` | body | string | no | Human-readable label (up to 80 chars). Defaults to `<TICKER>: <condition>`. |

## Status codes

- **200** — Webhook subscription created.
- **400** — `bad_request` — missing `condition`, invalid ticker, malformed `target_url`, or `cadence` faster than plan allows.
- **403** — `webhook_tier_required`, `webhook_limit_reached`, or `cadence_above_plan_max`.
- **404** — `not_found` — ticker is not tracked.

## Sample response

```json
{
  "id": "wh_smRsF3-z36o",
  "name": "NVDA: rsi_oversold AND high_volume_alert",
  "q": "ticker = 'NVDA' AND (rsi_oversold AND high_volume_alert)",
  "cadence": "5m",
  "target_url": "https://example.com/hook",
  "delivery": "webhook",
  "status": "pending_verification",
  "subscription_origin": { "type": "ticker", "ref": "NVDA", "condition": "rsi_oversold AND high_volume_alert" },
  "signing_secret": "whsec_…",
  "created_at": 1737580800
}
```

## Examples

### Subscribe NVDA on RSI + volume

Request:

```shell
curl -X POST "https://api.tickerbot.io/v2/tickers/NVDA/subscribe" \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"condition":"rsi_oversold AND high_volume_alert","target_url":"https://example.com/hook","cadence":"5m"}'
```

Response (`200`):

```json
{
  "id": "wh_smRsF3-z36o",
  "name": "NVDA: rsi_oversold AND high_volume_alert",
  "q": "ticker = 'NVDA' AND (rsi_oversold AND high_volume_alert)",
  "cadence": "5m",
  "target_url": "https://example.com/hook",
  "delivery": "webhook",
  "status": "pending_verification",
  "subscription_origin": { "type": "ticker", "ref": "NVDA", "condition": "rsi_oversold AND high_volume_alert" },
  "signing_secret": "whsec_…",
  "created_at": 1737580800
}
```

---

Interactive sandbox + parameter editor: https://tickerbot.io/docs/endpoints/tickers/subscribe
