/algo-trading-skills:broker-status-page-monitoring-integrationfrom algo-trading-skills
Polls Atlassian Statuspage v2 feeds to classify whether a broker outage or application bug caused order/feed failures. Returns verdicts requiring fresh positive evidence to avoid costly misdiagnosis during incidents.
Ships in algo-trading-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Invoke this skill when an order submission fails, a WebSocket drops, or a REST call times out, and the on-call question is is this the broker or is it us? Answering it by hand costs minutes at exactly the wrong moment. This skill polls the broker's public Statuspage v2 feed, scopes the reading to the components your order flow actually uses, and returns a classification an incident pipeline can route on.
The two wrong answers are expensive in opposite directions, and the whole design follows from that asymmetry:
So each confident verdict requires positive evidence. EXTERNAL_BROKER_OUTAGE
requires fresh evidence of impairment; INTERNAL_APPLICATION_BUG requires fresh
evidence of health. Everything else — no reading, a stale reading, an unreachable
feed, an unrecognised value, or a merely degraded page — returns UNKNOWN_FAILURE,
which routes a human to the incident instead of resolving it automatically in either
direction.
OPERATIONAL means
"nothing has been published", never "nothing is wrong". Pair it with a first-party
signal — reject rates, heartbeat latency, disconnect counts — and treat this as the
corroborating input, not the trigger.kill-switch-and-drawdown-circuit-breakers, and route around the broker with
broker-failover-secondary-account-routing.broker-api-deprecation-notice-monitoring.status object means healthy.order-placement-idempotency, and this skill's verdict must never be used to
justify a blind resubmission./api/v2/summary.json, e.g. https://status.alpaca.markets/api/v2/summary.json.
These are public and unauthenticated; private and trial pages require an API key in
an Authorization header.components[].name. Without these the monitor can only reason over the blended
page-wide indicator, which is both too noisy (an unrelated minor incident) and too
quiet (a dead trading component under a green page).Ingest summary.json. GET the full summary URL. The response carries page,
status, components, incidents and scheduled_maintenances. Treat a non-200,
a transport exception, or a payload without a status object as no evidence —
never as an all-clear.
Map status.indicator, and refuse to guess. none → OPERATIONAL, minor →
DEGRADED, major/critical → MAJOR_OUTAGE, maintenance → MAINTENANCE. Anything
else maps to UNKNOWN. Do not default unrecognised strings to the worst case: a
typo or a future enum value would then trigger an automatic trading halt and an
automatic ticket suppression off a string nobody validated.
Scope to the components you depend on. Match your declared component names
against components[].name and reduce their statuses to the worst one
(partial_outage counts as an outage; a missing or unrecognised status counts as
UNKNOWN, never as operational). This component-scoped state overrides the page
indicator when it is known — it is what catches a dead order-routing component
under a green page, and what stops an incident on a component you never call from
silencing your bug tickets. If a declared name matches nothing, alert on it: the
broker renamed a component and your scoping is now silently off.
Check freshness before classifying. A reading older than the configured bound
(default 300s) is not evidence. Measure age from your own fetch clock — not from
page.updated_at, which is a last-changed timestamp: both feeds verified for this
skill carried a healthy page.updated_at several hours old.
Classify, in this order.
| Evidence | Verdict |
|---|---|
| No reading, or older than the freshness bound | UNKNOWN_FAILURE |
| A declared dependency component is impaired | EXTERNAL_BROKER_OUTAGE |
| Page impaired, but every dependency reads operational | UNKNOWN_FAILURE |
| Page impaired, no dependency evidence | EXTERNAL_BROKER_OUTAGE |
| Anything merely degraded, or unrecognised | UNKNOWN_FAILURE |
| Page operational | INTERNAL_APPLICATION_BUG |
Route the verdict. EXTERNAL_BROKER_OUTAGE suppresses the code-bug escalation
and trips the circuit breaker. INTERNAL_APPLICATION_BUG pages the owning engineer.
UNKNOWN_FAILURE pages a human and suppresses nothing — it is the correct answer
far more often than a two-way classifier admits.
Full procedure, decision-table rationale and the EMS/alerting contract: see
references/workflows.md. Endpoint evidence, schema and verified vendor claims: seereferences/standards.md. Printable pre-flight checklist: seeassets/checklist.md.
minor indicator. minor is the page-wide roll-up
of any small published incident — a degraded docs site, a slow web dashboard. It is
consistent with both a broker fault and your own bug, so it justifies neither verdict.
Suppressing on minor means a real bug in your order construction goes unexamined
for as long as an unrelated incident stays open.Cache-Control: max-age=10, public, s-maxage=10, stale-while-revalidate=20, stale-if-error=3600. That stale-if-error=3600 means that when Statuspage's own
origin fails, the edge may keep serving the last good body — a green "All Systems
Operational" — for up to an hour.page.updated_at as a freshness check. It records when the page last
changed, not when it was last confirmed. A healthy page that has not changed in
days carries a days-old timestamp; treating that as staleness turns every quiet
period into an alert. Measure age from your own fetch instead.status.indicator is a blend
across every component on the page. Alpaca publishes 112 components in 11 groups,
Coinbase 172 in 7 — an outage confined to "Broker API (Sandbox)" while you trade live
is invisible in your decision if you only scope to the components you use, and an
outage confined to your component can sit under a page-wide none."group": true) appear in the
same components array as their children and carry a rolled-up status, so a single
failing child reports as two impaired components unless groups are separated out.status as operational. A status field that is
absent, null or an unrecognised string is unreadable, not healthy. Folding it into an
all-clear is how a schema change becomes a silent mis-diagnosis.max-age=10 means a
refetch inside 10 seconds returns the identical cached body. Sub-cache polling buys no
freshness. (The separate, token-authenticated Manage API is limited — 60 req/min
per page, 1 req/s per token, 429 plus Retry-After — but that is not the API you
poll here.)python -m unittest discover -s skills/broker-status-page-monitoring-integration/scriptsUNKNOWN_FAILURE with platform_state UNKNOWN — never
INTERNAL_APPLICATION_BUG and never OPERATIONAL. This is the highest-value single
assertion in the suite.minor indicator yields UNKNOWN_FAILURE, not EXTERNAL_BROKER_OUTAGE.status.indicator yields UNKNOWN, not MAJOR_OUTAGE.major_outage under a page indicator of none
still yields EXTERNAL_BROKER_OUTAGE.critical page with all declared dependencies operational yields
UNKNOWN_FAILURE rather than suppressing the ticket.UNKNOWN_FAILURE when the refetch also fails.status key is absent does not count toward an all-clear.unmatched_dependencies as an empty list.broker-failover-secondary-account-routingkill-switch-and-drawdown-circuit-breakersbroker-api-deprecation-notice-monitoringcircuit-breaker-for-downstream-service-callsstructured-logging-for-post-incident-forensicsorder-placement-idempotencyvendor-outage-fallback-data-source-hierarchyWhat SKILL.md sets; muted values are Claude Code's defaults
36 skills in this plugin
/alpaca-paper-live-key-separationUse when a bot connects to the Alpaca Trading API and must never cross paper keys with the live endpoint; pins the base URL per environment, checks the key prefix, probes /v2/account and requires an explicit ALLOW_LIVE_TRADING flag./api-key-least-privilege-audit-toolUse before deploying a live bot, to audit existing broker API keys for scopes they do not need. Flags withdrawal, transfer and admin rights that turn a leaked execution key into theft./broker-account-margin-call-handlingUse when a bot trades a Reg T, portfolio or futures margin account and must act before the broker liquidates: tiered maintenance-margin warnings cross-checked against broker excess liquidity, initial-margin order gating and liquidity-aware de-leveraging./broker-agnostic-adapter-interfaceUse when strategy code must run across several brokers and should not import kiteconnect, alpaca-py or ibapi directly; defines an adapter contract with Decimal prices, typed exceptions and normalised order status across venues./broker-api-changelog-diffing-toolUse before upgrading a broker SDK or OpenAPI spec, to diff two schema snapshots for removed endpoints, newly required parameters, enum mutations and type changes so CI fails before the change reaches an order path./broker-api-deprecation-notice-monitoringUse when a long-running bot calls REST endpoints a broker may retire; parses RFC 8594 Sunset and RFC 9745 Deprecation headers plus changelog feeds into one dated migration deadline with an escalation tier.npx claudepluginhub himanshuj16/algo-trading-skills --plugin algo-trading-broker-integrationOther plugins' skills for the same job