# Alerts `GET` `https://api.unusualwhales.com/api/alerts` Returns all the alerts that have been triggered for the user. Time filtering is available using the `newer_than` and `older_than` parameters: - The maximum lookback period is 14 days - If no time range is specified, defaults to the last 14 days - If only one time parameter is provided, the other is automatically calculated to maintain the 14-day limit - If both parameters are provided but exceed 14 days, the range is adjusted to 14 days from the `older_than` timestamp The alerts are the same alerts as the user created on [https://unusualwhales.com/custom-alerts](https://unusualwhales.com/custom-alerts) ## Authentication ``` Authorization: Bearer YOUR_API_KEY ``` ## Query Parameters | Name | Type | Required | Description | |------|------|----------|-------------| | `limit` | Default 50, Max 500 Min 1 | No | How many items to return. Default: 50. Max: 500. Min: 1. | | `intraday_only` | | No | Boolean flag whether to return only intraday alerts. | | `config_ids[]` | Configration IDs | No | A list of alert ids to filter by. | | `ticker_symbols` | Ticker | No | A comma separated list of tickers. To exclude certain tickers prefix the first ticker with a `-`. | | `noti_types[]` | Noti Types | No | A list of notification types. | | `newer_than` | string | No | Filter alerts created after this timestamp. When used alone, the time range is limited to 14 days forward from this timestamp. The format can either be a timestamp in unix seconds or milliseconds or a string in ISO format. | | `older_than` | string | No | Filter alerts created before this timestamp. When used alone, the time range is limited to 14 days backward from this timestamp. The format can either be a timestamp in unix seconds or milliseconds or a string in ISO format | ## Response (200) | Field | Type | Description | |-------|------|-------------| | `created_at` | The creation timestamp | | | `id` | The alert id | | | `meta` | The raw data of the alert | The data of the alert. There is no fixed schema as the data depends on the alert type. | | `name` | The name of the alert | | | `noti_type` | The type of the alert | | | `symbol` | The stock ticker or option contract of the alert | Depending on the type of the alert this is either a stock ticker or an option contract. | | `tape_time` | Alert Tape Time | The alerts tape time. | | `user_noti_config_id` | The alert id | | ## Example ### curl ```bash curl -X GET "https://api.unusualwhales.com/api/alerts" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Accept: application/json" ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("api.unusualwhales.com") headers = {"Authorization": "Bearer YOUR_API_KEY", "Accept": "application/json"} conn.request("GET", "/api/alerts", headers=headers) response = conn.getresponse() print(response.read().decode("utf-8")) ``` ## Response Example ```json { "data": [ { "created_at": "2024-12-11T14:00:00Z", "id": "fdc2cf91-d387-480f-a79e-28026447a6f5", "meta": { "alert_type": "PayDate", "date": "2024-11-21", "div_yield": "0.0503", "dividend": "0.1275", "frequency": "Quarterly", "payment_date": "2024-12-11", "prev_dividend": "0.125" }, "name": "S&P 500 Dividends", "noti_type": "dividends", "symbol": "AMCR", "symbol_type": "stock", "tape_time": "2024-12-11T14:00:00Z", "user_noti_config_id": "cb70c287-f10a-4e63-98ad-571b7dafc8e4" }, { "created_at": "2024-12-11T14:00:01Z", "id": "46a5cf8d-6b41-4a92-926d-80e21b729222", "meta": { "avg_vol_30": "431912.809523809524", "curr": "14.55", "curr_vol": 364977, "prev": "22.88", "reason": "", "sector": "Healthcare", "state": "trading" }, "name": "Trading halts", "noti_type": "trading_state", "symbol": "ANAB", "symbol_type": "stock", "tape_time": "2024-12-11T14:00:00Z", "user_noti_config_id": "5e476026-d01e-423b-9635-7ead39301665" } ] } ```