> ## 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 API — base URL, authentication, response envelope, pagination, and errors.

The Totalis API is REST over HTTPS with JSON bodies. It adds Server-Sent Events (SSE) for live quote pricing and a [WebSocket](/guides/websocket) for post-trade events, all in `snake_case`. Not sure which channel fits your integration? Start with [Real time & data channels](/guides/realtime-and-data).

## Base URL

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

## Authentication

Send your API key in the `X-API-Key` header on every 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. The exception is minting a new API key (`POST /v1/api-keys`), which requires a Privy JWT or a key with the `keys:manage` scope. Each key is scoped — see [Authentication](/guides/authentication) for the catalog.

## 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 — don't parse or build them yourself.

## Errors

Errors use a consistent envelope:

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

`error.code` is one of: `VALIDATION_ERROR`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `CONFLICT`, `RATE_LIMITED`, `PAYLOAD_TOO_LARGE`, `INTERNAL_ERROR`, `SERVICE_UNAVAILABLE`. On a `429`, `error.retry_after` gives the seconds to wait before retrying.

## Rate limits

100 requests/minute unauthenticated, 300/minute authenticated. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset`.

## Endpoint groups

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

  <Card title="Quote service" icon="bolt" href="/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="/api-reference/parlays/list">
    List your parlays and read settlement detail.
  </Card>

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

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

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