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

# API Reference

> Complete REST API documentation for Limitless Exchange

## Base URL

```
https://api.limitless.exchange
```

Interactive API explorer (Scalar): [https://api.limitless.exchange/api-v1](https://api.limitless.exchange/api-v1)

<Note>
  Building on the API? Join the [Limitless Builders Chat](https://t.me/LimitlessBuildersChat) on Telegram for API/SDK updates, help, and to connect with other builders.
</Note>

## Authentication

Most endpoints require authentication via **scoped API tokens** with HMAC-SHA256 request signing:

| Method                      | Headers                                            | Use case                                                      |
| --------------------------- | -------------------------------------------------- | ------------------------------------------------------------- |
| **Scoped API Token (HMAC)** | `lmts-api-key`, `lmts-timestamp`, `lmts-signature` | All integrations — traders, bots, partners, delegated signing |

<Note>
  Public endpoints like market browsing and orderbook data do **not** require authentication. All authenticated requests use [scoped API tokens with HMAC signing](/developers/authentication) (legacy static API-key headers are deprecated and no longer issued).
</Note>

See the [Authentication guide](/developers/authentication) for HMAC signing details, or the [Programmatic API guide](/developers/programmatic-api) for the full partner integration workflow.

## Endpoint Groups

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/api-reference/api-tokens/derive-token">
    Derive and manage scoped API tokens for authentication.
  </Card>

  <Card title="API Tokens" icon="shield-halved" href="/api-reference/api-tokens/derive-token">
    Scoped API token management for partner integrations — derive, list, and revoke HMAC-authenticated tokens.
  </Card>

  <Card title="Markets" icon="chart-line" href="/api-reference/markets/browse-active">
    Browse active markets, search, get details and feed events.
  </Card>

  <Card title="Trading" icon="arrow-right-arrow-left" href="/api-reference/trading/create-order">
    Create and cancel orders, batch order status, orderbook, historical prices, and user orders.
  </Card>

  <Card title="System" icon="circle-info" href="/api-reference/system/maintenance-status">
    Check public maintenance status and temporary trading restrictions.
  </Card>

  <Card title="Partner Accounts" icon="users" href="/api-reference/partner-accounts/create-partner-account">
    Create and manage sub-accounts for partner integrations.
  </Card>

  <Card title="Portfolio" icon="wallet" href="/api-reference/portfolio/positions">
    Positions, trades, PnL chart, history, points, and allowance.
  </Card>

  <Card title="Public Portfolio" icon="globe" href="/api-reference/public-portfolio/positions">
    Public user positions, traded volume, and PnL data.
  </Card>
</CardGroup>

## Key Concepts

| Concept              | Description                                                                                                                                                                                            |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Venue system**     | Each CLOB market has a venue with `exchange` and `adapter` addresses. Fetch via `GET /markets/:slug`. See [Venue System](/developers/venue-system).                                                    |
| **EIP-712 signing**  | Orders are signed using the venue's `exchange` address as `verifyingContract`. See [EIP-712 Signing](/developers/eip712-signing).                                                                      |
| **Order types**      | **GTC** (Good Till Cancelled) stays on the orderbook. **FOK** (Fill or Kill) executes immediately or cancels.                                                                                          |
| **Token IDs**        | Each market returns YES and NO token IDs in `tokens` (`tokens.yes` / `tokens.no`). Use these as `tokenId` in orders.                                                                                   |
| **USDC decimals**    | USDC on Base has 6 decimals. Amounts are scaled by 1e6.                                                                                                                                                |
| **Receive window**   | Optional `timestamp` + `recvWindow` on `POST /orders` reject stale signed orders with HTTP `425`. Opt-in (default disabled). See [Receive Window](/api-reference/trading/create-order#receive-window). |
| **Maintenance mode** | Trading can be temporarily restricted during maintenance. Check [`GET /maintenance/status`](/api-reference/system/maintenance-status) and handle `503` responses from trading endpoints.               |

## WebSocket API

For real-time orderbook and position updates, see the [WebSocket Events](/developers/websocket-events) reference.

**URL:** `wss://ws.limitless.exchange` | **Namespace:** `/markets`

## Rate Limits

Contact [help@limitless.network](mailto:help@limitless.network) for current rate limit details.
