Skip to main content

Base URL

All API requests should be made to:
http://api.poly-data.xyz

Authentication

The poly-data API is currently open access — no authentication required.

Rate Limits

To ensure fair usage, the API enforces rate limits per IP address:
ScopeLimitWindow
Global (all endpoints)60 requests1 minute
Orderbooks endpoints30 requests1 minute
Rate limit headers are included in every response:
HeaderDescription
RateLimit-LimitMaximum requests allowed
RateLimit-RemainingRequests remaining in current window
RateLimit-ResetUnix timestamp when the limit resets
When you exceed the rate limit, you’ll receive a 429 Too Many Requests response.

Pagination

The API supports two pagination methods on most list endpoints. Use the next object returned in responses for efficient pagination through large datasets. Each endpoint uses different cursor fields depending on its sort order.
# First request
curl "http://api.poly-data.xyz/events?limit=50"

# Next page (using cursor values from response)
curl "http://api.poly-data.xyz/events?limit=50&cursor_end_date=1735689600000&cursor_id=12345"

Offset-based

Traditional offset pagination is available but less efficient for large datasets:
curl "http://api.poly-data.xyz/events?limit=50&offset=100"
Cursor-based and offset-based pagination are mutually exclusive. If offset is provided, cursor parameters are ignored.

Response Format

All responses are JSON. Successful list responses include the data array and pagination info. Errors follow this format:
{
  "error": "Error message description"
}

HTTP Status Codes

Status CodeDescription
200Success
400Bad request (missing or invalid parameters)
404Resource not found
429Rate limit exceeded
500Internal server error

Caching

Responses are cached briefly server-side to improve performance:
EndpointCache TTL
List and search endpoints2 seconds
Single resource endpoints5 seconds
/orderbooks/latest500ms

Endpoints Overview

Events

Search and list prediction market events.

Markets

Get market details and token information.

Orderbooks

Access historical orderbook snapshots.

Statistics

Database size and system statistics.

Health Check

Verify the API is operational:
curl "http://api.poly-data.xyz/health"
Response:
{
  "status": "ok",
  "time": "2026-01-23T12:00:00.000Z"
}