Reference
Scanner Query and Filter Contract
Public reference for the query parameters accepted by `GET /api/markets` and how the current backend interprets them.
Current Implementation
This page is intentionally explicit and implementation-first. If the product or upstream APIs change, the current behavior described here can change with them.
Endpoint
GET /api/markets
Query parameters
| Param | Type | Meaning |
|---|---|---|
included_tags | comma-separated string | ANY-match include filter |
excluded_tags | comma-separated string | exclude-on-ANY filter |
sort_by | string | one of the supported sort keys |
sort_dir | string | asc or desc |
limit | integer | page size |
offset | integer | pagination offset |
min_volume | float | minimum volume_usd |
min_liquidity | float | minimum liquidity_usd |
min_price | float | minimum price |
max_price | float | maximum price |
max_spread | float | maximum spread fraction |
min_apr | float | minimum APR as a fraction |
min_hours_to_expire | integer | lower expiry bound in hours |
max_hours_to_expire | integer | upper expiry bound in hours |
include_expired | boolean | include expired rows when expiry filters are in play |
search | string | text search against question and outcome_name |
min_profitable | integer | minimum sampled profitable holders on this side |
min_losing_opposite | integer | minimum sampled losing holders on the opposite side |
Supported sort keys
| Key |
|---|
volume_usd |
liquidity_usd |
end_date |
price |
spread |
apr |
question |
yes_profitable_count |
yes_losing_count |
yes_total |
no_profitable_count |
no_losing_count |
no_total |
Removed or non-public controls
smart_money_win_rate is not part of the current public scanner query contract, even though a background table still stores that metric internally.
Notes
- the frontend adds a cache-buster
_t=<timestamp> - tag params are sent as comma-separated strings for proxy safety
- if
sort_byis invalid, the backend falls back tovolume_usd