Platform
Utility endpoints for server time, health checks, platform configuration, and browsing markets and events. No authentication required unless noted.
Server Time
GET /v1/time
Returns the server's current Unix timestamp. Use this to synchronize your clock for HMAC signature generation.
Response
{
"time": 1709136000
}
Health Check
GET /health
Returns the platform health status. Note: this endpoint is at the root path, not under /v1.
Response
{
"status": "ok"
}
Readiness Check
GET /ready
Returns readiness status including database and cache connectivity. Returns 503 if the database or cache is unreachable.
Response
{
"status": "ready"
}
Polygon Health
GET /health/polygon
Returns Polygon chain connectivity status.
Response
{
"status": "connected"
}
Platform Config
GET /v1/platform/config
Returns platform configuration including contract addresses and chain ID.
Response
{
"chain_id": 137,
"exchange_address": "0x...",
"market_factory_address": "0x...",
"usdc_address": "0x...",
"ctf_address": "0x..."
}
Sports Taxonomy
GET /v1/sports/taxonomy
Returns the sports taxonomy tree (leagues, teams, categories).
Response
{
"sports": [
{
"name": "Basketball",
"leagues": [
{
"name": "NBA",
"teams": ["Lakers", "Celtics"]
}
]
}
]
}
On-Chain Probabilities
GET /v1/onchain/market-probabilities
Returns current market probabilities derived from on-chain order book data.
Response
{
"probabilities": {
"market-id-1": [0.52, 0.48],
"market-id-2": [0.70, 0.30]
}
}
List Markets
GET /v1/markets
Returns all active markets on the platform.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status |
category | string | Filter by category |
search | string | Full-text search |
limit | int | Max results (default 20, max 100) |
offset | int | Pagination offset |
Response
{
"markets": [
{
"id": "market-id-1",
"event_slug": "us-election-2024",
"title": "Will candidate X win?",
"status": "active",
"outcomes": ["Yes", "No"],
"created_at": "2024-01-15T00:00:00Z"
}
]
}
Get Market
GET /v1/markets/:id
Returns details for a single market.
Response
{
"id": "market-id-1",
"event_slug": "us-election-2024",
"title": "Will candidate X win?",
"status": "active",
"outcomes": ["Yes", "No"],
"tick_size": "0.01",
"min_order_size": "100000",
"created_at": "2024-01-15T00:00:00Z"
}
Market Metadata
GET /v1/markets/metadata
Returns market metadata including categories and counts.
Response
{
"categories": ["Sports", "Politics", "Crypto"],
"total_markets": 150,
"active_markets": 42
}
Price History
GET /v1/markets/:id/history
Returns price history time series for a market.
Response
{
"market_id": "market-id-1",
"history": [
{"timestamp": "2024-01-15T00:00:00Z", "price": 0.50},
{"timestamp": "2024-01-16T00:00:00Z", "price": 0.52}
]
}
Market Trades
GET /v1/markets/:id/trades
Returns recent trades for a specific market.
Response
{
"trades": [
{
"id": "trade-id-1",
"price": "0.52",
"amount": "1000000",
"side": "BUY",
"timestamp": "2024-01-15T12:00:00Z"
}
]
}
Deploy Market
POST /v1/markets/:id/deploy
Scope: trade:orders
Request on-chain deployment for a market. Triggers operator gas spend.
Response
{
"status": "deploying",
"market_id": "market-id-1"
}
List Tokens
GET /v1/tokens
Returns all active outcome tokens on the platform.
Response
{
"tokens": [
{
"mint": "0x...",
"market_id": "market-id-1",
"outcome_index": 0,
"name": "Yes",
"active": true
}
]
}
Get Token
GET /v1/tokens/:mint
Returns details for a specific outcome token by mint address.
Response
{
"mint": "0x...",
"market_id": "market-id-1",
"outcome_index": 0,
"name": "Yes",
"active": true
}
List Events
GET /v1/events
Returns all events on the platform. Events group related markets together.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status |
category | string | Filter by category |
search | string | Full-text search |
limit | int | Max results (default 20, max 100) |
offset | int | Pagination offset |
Response
{
"events": [
{
"slug": "us-election-2024",
"title": "2024 US Presidential Election",
"status": "active",
"market_count": 5,
"created_at": "2024-01-10T00:00:00Z"
}
]
}
Browse Events
GET /v1/events/browse
Browse events with filtering and sorting. The primary endpoint for the event listing page.
Get Event
GET /v1/events/:slug
Returns details for a single event, including its markets.
Response
{
"slug": "us-election-2024",
"title": "2024 US Presidential Election",
"status": "active",
"markets": [
{
"id": "market-id-1",
"title": "Will candidate X win?",
"status": "active",
"outcomes": ["Yes", "No"]
}
],
"created_at": "2024-01-10T00:00:00Z"
}
Get Event View
GET /v1/events/:slug/view
Returns a rich event view including markets, metadata, and live scores (for sports events).