Skip to main content

Overview

We’ve built the Fairground API to support your backend data needs. Use it to look up markets and prices, and track a wallet’s orders, positions, and trade history.

Services

Endpoints are grouped into seven services, listed in the sidebar under their own sections:

Making requests

Every endpoint, including reads, is a POST request with a JSON body, following the ConnectRPC convention:

Base URL

Authentication

Authentication will be introduced in future API versions.

Example

Response
Each endpoint page documents its own request fields, response fields, and one populated example, use those, not this generic one, for the exact shape of a specific call.

Common patterns

A few conventions repeat across most endpoints:
Most endpoints that take a market accept either form:
GetHistoricalPrices is the one exception. It only supports the marketId form. Check the endpoint’s own description on its specific behavior.
Wallet address fields are matched case-insensitively and trimmed of surrounding whitespace server-side.
Endpoints that paginate use limit/offset. Defaults and caps vary per endpoint, check each endpoint’s description.

Streaming endpoints

The streaming endpoints are ConnectRPC server-streaming methods. The server keeps the connection open and pushes a new message on a fixed interval instead of returning a single response.
This reference’s “Try it” panel sends a single request/response and can’t exercise a real stream. Use a Connect-capable client (the SDKs, or connect-web/connect-go directly) to consume these endpoints. Each streaming endpoint’s page still documents the request/response shape and one example of a single streamed message.

Errors

Errors follow the Connect error format:
The codes you’ll actually encounter across these endpoints are: