Skip to main content

Base URL

All API requests should be made to:
https://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:
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: Use the next object returned in responses for efficient pagination through large datasets.
# First request
curl "https://poly-data.xyz/events?limit=50"

# Next page (using cursor from response)
curl "https://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 "https://poly-data.xyz/events?limit=50&offset=100"

Response Format

All responses are JSON. Successful responses return data directly, while 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 to improve performance:
EndpointCache TTL
Most endpoints2-5 seconds
/orderbooks/latest500ms

Endpoints Overview

Health Check

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