Authentication

Most API endpoints are public and don't require authentication. When bearer token auth is enabled on the server, write endpoints (order submission, cancellation) require an API key.

Public Endpoints

All GET endpoints are public and do not require authentication, including:

  • /api/v1/markets

  • /api/v1/orderbook/{marketId}

  • /api/v1/trades/{marketId}

  • /api/v1/stats/{marketId}

  • /api/v1/platform/stats

  • /api/v1/quick-markets/{asset}

  • /api/v1/resolution/{marketId}

  • /api/v1/stream (WebSocket)

Bearer Token Authentication

When enabled, write endpoints require an Authorization header with a signed bearer token.

Token Format

Tokens use Ed25519 signatures and have the form:

The payload is a JSON object:

Field
Type
Description

kid

string

API key ID (matches your registered key)

ts

int64

Unix timestamp when token was created

n

string

Random 32-character hex nonce (replay prevention)

Tokens are valid for 5 minutes from the ts timestamp.

circle-info

Ensure your system clock is accurate when generating tokens. Tokens older than 5 minutes will be rejected.

Making Authenticated Requests

Include the token in the Authorization header:

Registering an API Key

Register for API credentials by proving wallet ownership with an Ethereum signature.

POST to:

This endpoint does not require bearer authentication — it uses wallet signature verification instead.

1

Request: Register API Key

Request body (JSON):

Field
Type
Required
Description

address

address

Yes

Your Ethereum wallet address

signature

string

Yes

Signature of the message below

name

string

No

Friendly name for the key

The message to sign:

Sign this message using a standard Ethereum personal sign (eth_sign or personal_sign).

2

Response: API Key Created

Successful response example:

Field
Type
Description

success

bool

Whether registration succeeded

api_key_id

string

Your key ID (used in kid field of tokens)

api_private_key

string

Ed25519 private key hex (save this — shown only once)

message

string

Status message

3

Generating Tokens (Client-side)

Use your api_key_id and api_private_key to generate bearer tokens.

Python example:

Use the generated token in the Authorization header when calling write endpoints.

Error Responses

Last updated