Documentation is in progress. Every page in this section describes the current implementation and may change as PolyLab evolves.
Reference

Scanner Query and Filter Contract

In Progress Last updated 2026-03-10

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

ParamTypeMeaning
included_tagscomma-separated stringANY-match include filter
excluded_tagscomma-separated stringexclude-on-ANY filter
sort_bystringone of the supported sort keys
sort_dirstringasc or desc
limitintegerpage size
offsetintegerpagination offset
min_volumefloatminimum volume_usd
min_liquidityfloatminimum liquidity_usd
min_pricefloatminimum price
max_pricefloatmaximum price
max_spreadfloatmaximum spread fraction
min_aprfloatminimum APR as a fraction
min_hours_to_expireintegerlower expiry bound in hours
max_hours_to_expireintegerupper expiry bound in hours
include_expiredbooleaninclude expired rows when expiry filters are in play
searchstringtext search against question and outcome_name
min_profitableintegerminimum sampled profitable holders on this side
min_losing_oppositeintegerminimum 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_by is invalid, the backend falls back to volume_usd