{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://firmtape.com/contracts/public/events/alerts/price_alert.schema.json",
 "title": "price_alert",
 "description": "Sent when the price crosses or touches a price line you set on the chart.",
 "allOf": [
  {
   "$ref": "envelope.schema.json"
  }
 ],
 "properties": {
  "type": {
   "const": "price_alert",
   "description": "`price_alert`."
  },
  "direction": {
   "enum": [
    "above",
    "below"
   ],
   "description": "Which way the price crossed."
  },
  "alert": {
   "type": "object",
   "description": "The line that fired."
  },
  "phase": {
   "enum": [
    "premarket"
   ],
   "description": "`premarket` when it fired before the bell; absent in the session."
  }
 },
 "x-when": [
  "At the first reading that shows the cross: no hold, you asked for this price.",
  "A line in `once` mode goes after it fires; in `repeat` mode it re-arms once the price has been away.",
  "In the session, and also in the premarket (from 04:00 ET to the open on a trading day) on the premarket's minute prices; such an event carries `phase: \"premarket\"` and a null `price`. A `once` line that fired in the premarket does not fire again at the open."
 ],
 "x-features": [
  "alert-lines",
  "webhooks"
 ],
 "examples": [
  {
   "version": 1,
   "id": "evt_3f9a0c6e21d4b7a8e5f10c2d",
   "type": "price_alert",
   "symbol": "SPX",
   "price": 6800.25,
   "book": "volume",
   "ts": "2026-10-09T14:32:05-04:00",
   "day": "2026-10-09",
   "levels": {
    "flip": 6715.5,
    "call_wall": 6750,
    "put_wall": 6700,
    "put_support": 6700
   },
   "level": {
    "kind": "price",
    "value": 6800
   },
   "direction": "above",
   "text": "SPX crossed above 6,800.00, your price alert",
   "alert": {
    "id": "al_0a1b2c3d4e5f",
    "kind": "price",
    "level": null,
    "price": 6800,
    "mode": "once"
   }
  }
 ],
 "x-source": "alerts",
 "x-product": "live",
 "x-plan": "live",
 "x-version": 1,
 "x-since": "2026-10-11",
 "x-switch-on": "Set the line on the chart or a ladder row; a webhook address on Account, Level alerts.",
 "required": [
  "alert"
 ]
}