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

# API Overview

> Public backend API conventions and authentication.

The public API is served by the United Market backend.

Use this API for market data, trading, order status, authentication, user profiles, comments, leaderboards, and real-time subscriptions.

Only the public backend integration surface is documented here.

<Note>
  United Market is now live on BNB Smart Chain mainnet. We just launched — start trading on-chain prediction markets today.
</Note>

## Calling Endpoints

Use HTTPS in the playground and browser clients. The HTTP endpoints redirect to HTTPS, which can make requests appear to fail from hosted docs.

Some user-specific actions require SIWE authentication and a bearer token. Trading actions require EIP-712 order signatures.

| Auth         | Header                                   | Used For                                                            |
| ------------ | ---------------------------------------- | ------------------------------------------------------------------- |
| Bearer token | `Authorization: Bearer <token>`          | User-specific actions such as profile updates and posting comments. |
| Signed order | EIP-712 `signature` in the order payload | Trading actions. Backend auth does not replace order signing.       |

Open any endpoint page in this section to use the interactive playground.

## Endpoint Groups

| Group     | Endpoints                                                                 |
| --------- | ------------------------------------------------------------------------- |
| Markets   | Market discovery, market detail, orderbook, ticker, price history, trades |
| Fees      | Effective per-market trading fee rate                                     |
| Orders    | Submit signed orders, cancel orders, list orders, get order detail        |
| Balances  | Available collateral after open-order locks                               |
| Auth      | SIWE nonce, verify, refresh                                               |
| Discovery | Tags and market groups                                                    |
| Social    | Comments and comment counts                                               |
| Users     | Public profiles and search                                                |
| PnL       | Leaderboard, historical PnL, current PnL                                  |
| Referral  | Referral code, attribution, and reward summary                            |

## Common Conventions

* Amounts are usually returned as raw token units. Collateral uses the collateral token decimals.
* Order identifiers are `orderHash` values derived from the signed EIP-712 order.
* Public orders use the zero address as `taker`.
* Market rooms and real-time events are keyed by `conditionId`.
* Trading fees are quoted in basis points. Read a market's effective rate from `GET /markets/{id}/fee` and sign it as the order's `feeRateBps`. See [Fees & Referrals](/fees).
