Skip to main content
Every Fairground API request needs an API key, sent as a bearer token in the Authorization header. Requests without a valid key return 401 unauthenticated.

Create an API key

1

Open the API Keys page

Go to app.fairground.fi/421614/api-keys and connect your wallet.
2

Create a key

Create a new API key and give it a label, such as the name of the bot or tool that will use it, so you can tell your keys apart later.
3

Copy and store it

Copy the key right away and store it somewhere safe, such as a password manager or an environment variable. Treat it like a password.
Never commit an API key to source control or share it in chat. If a key is exposed, regenerate it on the API Keys page.

Manage your keys

The API Keys page lists your keys by label. Each wallet can have up to 3 active keys. From there you can:
  • Regenerate a key to rotate it. You get a new key with the same label, and the old key stops working immediately. Update anything that uses the key with the new value.
  • Delete a key you no longer use. It stops working immediately.

Use your key in requests

Send the key in the Authorization header with the Bearer prefix:
cURL
Reading the key from an environment variable keeps it out of your code and your shell history.

Use your key in the API playground

Every endpoint page in the API reference has a Try it button that sends a live request from your browser.
1

Open an endpoint and click Try it

Open any endpoint page, for example GetMarkets, and click Try it.
2

Paste your key into the Authorization field

Under Authorization, paste your API key into the field next to Bearer. Enter only the key: the playground adds the Bearer prefix for you.
3

Send the request

Fill in any request fields you need, then click Send.
The playground keeps your key filled in as you move between endpoint pages in the same browser, so you only need to enter it once. Because it stays in your browser, avoid using the playground with your key on a shared computer.

Troubleshooting

Last modified on October 26, 2026