watchers

WATCHER: get a signed callback when a US stock crosses a...

WATCHER: get a signed callback when a US stock crosses a price you set. Arm once, pay once (no account, no API key) — we poll the quote during US market hours and POST your custom payload to callbackUrl the moment the condition is met. conditionType: 'above' / 'below' (threshold = a USD price) or 'pct_up' / 'pct_down' (threshold = a percent move vs the prior close). Fires once per crossing into the condition; bounded by a maxFires / expiry budget. Real-time IEX-tier quote via Finnhub. Deliveries are EIP-191-signed (verify offline) and retried with exponential backoff; missed pushes are recoverable via watchers.status. Returns a watcherId.

post/api/watchers/stock-price

Request

  • Base URL: https://2s.io
  • URL: https://2s.io/api/watchers/stock-price
  • Auth: API key in header PAYMENT-SIGNATURE

Request body

tickerstring required

US-listed ticker to watch, e.g. AAPL.

conditionType'above' | 'below' | 'pct_up' | 'pct_down' required

above/below = threshold is a USD price; pct_up/pct_down = threshold is a percent move vs the prior close.

thresholdnumber required

The trigger level. A USD price for above/below (e.g. 200), or a percent for pct_up/pct_down (e.g. 5 = ±5%).

callbackUrlstring uri required

Where we POST the event. Any http(s) URL; the JSON body is signed (verify with X-2s-Signature). e.g. https://your-agent.app/hooks/price

payloadobject

Arbitrary JSON echoed back verbatim in every callback so you can route/identify the event. e.g. {"agentId":"a1"}

expiresInSecondsinteger

How long the watch stays active, in seconds. Default 2592000 (30 days), max 7776000 (90 days).

maxFiresinteger

Stop after this many callbacks (default 1 — a one-shot alert). Each fire is a fresh crossing into the condition.

labelstring

Optional free-text tag to recognize this watcher later.

Response

(unresolved $ref)

Changes

No recorded changes to this operation across all 1 revision of this API.