OpportunityQueue
Maintain a ranked queue of the best candidate markets per registered strategy type by combining MarketQualityRanker scores, EventCalendarMapper proxim
What it does
Maintain a ranked queue of the best candidate markets per registered strategy type by combining MarketQualityRanker scores, EventCalendarMapper proximity signals, and per-strategy fit-scores into a single ordered list that strategies consume without re-running discovery.
Pipeline placement
Applies to: All markets that have passed quality scoring
Why it matters
| If this fails | Consequence |
|---|---|
| Strategies independently re-rank markets | Each strategy duplicates discovery logic, wasting compute and producing inconsistent rankings across the system. |
| Existing positions not suppressed | A strategy may generate a new intent on a market where the user already has an open position, causing unintended double-up exposure. |
Inputs
Polymarket inputs
| Input | Source | Required | Use |
|---|---|---|---|
| Top-of-book size and current spread | CLOB + ws_market | required | Refresh queue entries with current execution cost estimates. |
Internal inputs
| Input | Source | Required | Use |
|---|---|---|---|
| MarketQualityRanker ObservationReports | disc.marketqualityranker | required | Base quality score for each queue entry. |
| EventCalendarMapper ObservationReports | disc.eventcalendarmapper | optional | Boost ranking for markets near a calendar event. |
| Open positions per market (double-up suppression) | exec.position_tracker | optional | Suppress markets where the user already has an open position if suppress_existing_position=true. |
| KillSwitch active flag | risk.kill_switch | required | Freeze queue and suppress emissions when KillSwitch is active. |
Authority
What this bot is permitted to do
State
Readiness
Spec started
Status
planned
Class
Signal Service
Default mode
shadow_only
Developer owner
Polytraders core — Intelligence pod
Capital impact
Indirect
Reason codes emitted
| Code | Severity | Meaning | Action |
|---|---|---|---|
| STALE_QUEUE | WARN | MarketQualityRanker reports are older than 2× refresh_interval_s; queue frozen. | Freeze queue; emit STALE_QUEUE warning; notify downstream strategies. |
| QUEUE_TOO_SHALLOW | WARN | Active queue depth has dropped below the warning threshold. | Log warning; relax strategy_filters if configured to do so. |
| KILL_SWITCH_ACTIVE | HARD_REJECT | KillSwitch is active; queue frozen and emissions suppressed. | Return immediately without emitting any reports. |
| PARAMETER_CHANGE_REQUIRES_APPROVAL | HARD_REJECT | queue_depth or refresh_interval_s below locked hard minimum. | Reject config change; do not apply. |
Related bots in Market Discovery
Used by
Reverse index — strategies that currently reference disc.opportunityqueue. 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 9m ago |
Showing 1 of 1 · demo-wired ≠ production-live
Why this matters
Market Discovery bots does NOT propose or execute trades; only scores and ranks. Understanding the authority boundary prevents misuse and makes promotion-gate reviews faster and more reliable. View raw spec JSON →