APIDegradationMonitor
Watches every external API surface Polytraders depends on (CLOB v2 REST, CLOB WebSocket, Polymarket metadata REST, Ethereum RPC, builder fee oracle) a
What it does
Watches every external API surface Polytraders depends on (CLOB v2 REST, CLOB WebSocket, Polymarket metadata REST, Ethereum RPC, builder fee oracle) and publishes a per-surface health envelope (latency p50/p99, error rate, last_success_ts_ms). Risk and Strategy bots consume this envelope to decide whether to operate normally, degrade, or pause.
Pipeline placement
Applies to: Continuous
Why it matters
| If this fails | Consequence |
|---|---|
| Cascading failures from a single dead dependency | Without an explicit health signal, every bot infers liveness from its own latest call — producing inconsistent retreat behaviour across the system. |
| Silent degradations | An API can stay up but slow to 30-second responses; bots without an explicit threshold keep blocking on it instead of failing fast. |
| Postmortem confusion | Without a health timeline, postmortems cannot answer 'what was the actual external latency at 14:23?'. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| CLOB REST + WebSocket | Polymarket | required | Probe latency and error rates. |
| Polymarket metadata REST | Polymarket | required | Health probe. |
| Ethereum RPC | RPC provider | required | Latency + block-tip lag probe. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Real outbound traffic latency samples | Every bot | required | Passive observation in addition to active probes. |
Authority
What this bot is permitted to do
State
Readiness
Spec ready
Status
planned
Class
Governance Service
Default mode
shadow
Developer owner
Governance pod
Capital impact
Indirect
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| GOV_API_OK | P3 | Gov Api Ok | See decision output and developer log for context. |
| GOV_API_DEGRADED | P3 | Gov Api Degraded | See decision output and developer log for context. |
| GOV_API_DOWN | P3 | Gov Api Down | See decision output and developer log for context. |
| GOV_API_UNKNOWN | P3 | Gov Api Unknown | See decision output and developer log for context. |
Related bots in Governance & Ops
Used by
Reverse index — strategies that currently reference gov.api_degradation_monitor. If you change this bot's authority or reason codes, these strategies must re-pass shadow.
| Strategy | State | Activity |
|---|---|---|
| BTC weekly — close-aware quotes | demo-wired | last triggered 38m ago |
| Fed Rates — surprise drift | frozen | last triggered 45m ago |
Showing 2 of 2 · demo-wired ≠ production-live
Why this matters
Governance & Ops bots does NOT propose, approve, or block trades; only observes and reports. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →