GET /markets
List markets (paginated). Pulls from the Goldsky subgraph; falls back to direct chain reads ifGOLDSKY_GRAPHQL_URL is unset.
| Query | Type | Default |
|---|---|---|
page | int | 0 |
pageSize | int | 24 |
GET /markets/top
Top markets by total volume. Subgraph-only.| Query | Type | Default |
|---|---|---|
limit | int | 10 |
GET /markets/:address
Fetch a single market with all enrichments —postMetadata (X post details cached locally) and proposalDetails (AI draft persisted by /posts/evaluate).
Market shape. Selected fields:
| Field | Type | Source |
|---|---|---|
address | 0x… | on-chain |
question | string | on-chain |
description | string | API SQLite (proposal cache) |
resolutionCriteria | string | API SQLite |
judgeStorageRoot | 0x… | on-chain — points to sealed prompt on 0G Storage |
yesPool / noPool / totalVolume | string (wei) | subgraph or on-chain |
status | 0=Open, 1=Resolving, 2=Resolved, 3=Voided | on-chain |
outcome | 0=Unresolved, 1=Yes, 2=No, 3=Invalid | on-chain |
postMetadata | object | API SQLite (RapidAPI cache) |
proposalDetails | object | API SQLite |
GET /markets/:address/holders
Top YES/NO holders by total stake. Subgraph-only; capped at 100 rows.GET /markets/:address/trades
Recent trades for one market.| Query | Type | Default |
|---|---|---|
limit | int | 50 |

