> ## Documentation Index
> Fetch the complete documentation index at: https://docs.totalis.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# API overview

> The Totalis REST, SSE, and WebSocket API: base URL, authentication, response envelope, pagination, units, errors, and rate limits.

The Totalis API is REST over HTTPS with JSON bodies, in `snake_case`. It adds Server-Sent Events
(SSE) for live quote pricing and a [WebSocket](/solana/guides/websocket) for post-trade events.

## Base URL

```
https://api.totalis.trade
```

## Try it without a key

Market data is public:

```bash theme={null}
curl "https://api.totalis.trade/markets?limit=3"
```

## Authentication

Send your API key in the `X-API-Key` header on every authenticated request:

```
X-API-Key: <your-api-key>
```

The web dashboard authenticates with Privy instead, sending `Authorization: Bearer <jwt>`. Either
scheme works on any authenticated endpoint. Minting a new API key (`POST /v1/api-keys`) requires a
Privy JWT or a key with the `keys:manage` scope.

Every key is scoped. The scope catalog is on [Authentication](/solana/authentication#scopes).

## Response envelope

Successful responses wrap the resource in `data`:

```json theme={null}
{ "data": { "...": "resource" } }
```

List endpoints add cursor-based pagination in `meta`:

```json theme={null}
{
  "data": { "rfqs": [] },
  "meta": { "cursor": "opaque-string-or-null", "has_more": false }
}
```

To page, pass the previous response's `meta.cursor` as `?cursor=`. Cursors are opaque, so do not
parse or build them.

## Units

<Note>
  Any field whose name ends in `_micro` is an **integer of microUSDC**, where `1000000` equals 1.00
  USDC. Every other money field is a **decimal USDC number**. Both conventions appear in the same
  payload on the cashout surface.
</Note>

Market prices are decimal probabilities from 0 to 1 on every venue. The full unit table is in the
[Glossary](/solana/glossary#units).

## Errors

Every error, on every endpoint, has the same shape:

```json theme={null}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Human-readable description.",
    "details": {}
  }
}
```

Branch on `error.code`, never on `error.message`. Codes, rejection reasons, and retry guidance are
on [Errors](/solana/errors).

## Rate limits

Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`. The
per-minute limits are on [Limits and fees](/solana/limits-and-fees#rate-limits).

## Endpoint groups

<CardGroup cols={2}>
  <Card title="Markets" icon="store" href="/solana/api-reference/markets/list">
    Browse prediction markets across Kalshi and Polymarket. Public.
  </Card>

  <Card title="Quote service" icon="bolt" href="/solana/api-reference/quote-service/create">
    Open a quote request, stream live pricing, and commit the best quote.
  </Card>

  <Card title="Parlays" icon="layer-group" href="/solana/api-reference/parlays/list">
    List your parlays and read settlement detail.
  </Card>

  <Card title="Funds and vault" icon="wallet" href="/solana/api-reference/funds/get-vault">
    Balances, portfolio, P\&L, and withdrawals.
  </Card>

  <Card title="Webhooks" icon="bell" href="/solana/api-reference/webhooks/get-config">
    Configure signed event delivery.
  </Card>

  <Card title="Market maker" icon="chart-line" href="/solana/api-reference/quote-service-mm/stream">
    Stream quote requests, submit quotes, and confirm trades.
  </Card>

  <Card title="Errors" icon="triangle-exclamation" href="/solana/errors">
    Every code and rejection reason, and which to retry.
  </Card>

  <Card title="Changelog" icon="clock-rotate-left" href="/solana/changelog">
    Endpoints added, retired, and renamed.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.