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 eight 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

Every request needs an API key, sent as a bearer token in the Authorization header. Requests without one return 401 unauthenticated. To create an API key:
1

Open the Fairground app

Go to app.fairground.fi and connect your wallet.
2

Open API Keys

Open the More tab in the navigation, then select API Keys.
3

Generate a key

Create a key and store it somewhere safe. Treat it like a password.

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.

Errors

Errors follow the Connect error format:
The codes you’ll actually encounter across these endpoints are:
Last modified on October 19, 2026