{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://firmtape.com/contracts/public/events/alerts/level_near.schema.json",
 "title": "level_near",
 "description": "Sent when the price comes within your chosen number of points of the flip, the call wall or the put wall, once per approach.",
 "allOf": [
  {
   "$ref": "envelope.schema.json"
  }
 ],
 "properties": {
  "type": {
   "const": "level_near",
   "description": "`level_near`."
  },
  "direction": {
   "enum": [
    "above",
    "below"
   ],
   "description": "The side of the level the price is on."
  },
  "threshold_points": {
   "type": "number",
   "description": "The size you picked."
  }
 },
 "x-when": [
  "It re-arms only after the price has been more than twice that distance away.",
  "Not sent at the session's first reading when the price is already that close: being near is not an approach.",
  "The distance has held for twenty seconds."
 ],
 "x-features": [
  "level-alerts",
  "webhooks"
 ],
 "examples": [
  {
   "version": 1,
   "id": "evt_3f9a0c6e21d4b7a8e5f10c2d",
   "type": "level_near",
   "symbol": "SPX",
   "price": 6745.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": "call_wall",
    "value": 6750
   },
   "direction": "below",
   "threshold_points": 5,
   "text": "SPX came within 5.00 of the call wall 6,750.00"
  }
 ],
 "x-source": "alerts",
 "x-product": "live",
 "x-plan": "live",
 "x-version": 1,
 "x-since": "2026-10-11",
 "x-switch-on": "Account, Level alerts: a webhook address, and the event on the watchlist.",
 "required": [
  "threshold_points"
 ]
}