Alerts
Create a new price alert (tier-quota + daily-cap gated)
Create a new alert. Two gates fire before the INSERT:
- Tier-quota gate (§3): if the user has hit ALERT_TIER_QUOTAS[ tier] active alerts, raise TierGateException with requiredTier= next-tier-up. The custom 402 handler in routes/api_errors.py produces the structured payload the frontend tier-gate.js already understands.
- Daily-create cap (§8 audit-fix #4): if the user has already created DAILY_CREATE_CAP_PER_USER (=50) alerts in the last 24h, raise 429. Defeats the POST/DELETE churn vector that would otherwise let a free-tier user operate an effectively- unlimited rolling pool.
Body shape (JSON): { "ticker": "AAPL", # required "condition_type": "price_above", # required "threshold": 250.00, # required for price/pct/volume types "note": "buy zone for value", # optional "expires_at": "2026-06-30T00:00:00Z" # optional }
PR1 ships only price_above and price_below. Other condition types are reserved for PR2; the route accepts them through the schema but the cron won't evaluate them yet.
post/api/alerts
Request
- Base URL: https://www.oxfordledge.com (the document declares no server; this is the origin it was published from)
- URL: https://www.oxfordledge.com/api/alerts
- Auth: none declared
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.