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

# Overview

> Trading perpetuals on Rails

Rails Perpetuals lets you trade **perpetuals** on major crypto markets, with
leverage and cross or isolated margin.

## Key Capabilities

* **No expiry, with funding.** Positions are held indefinitely; periodic funding payments
  keep the contract price aligned with the underlying. See
  [Funding](/latest/perps/formulas/funding).
* **Leverage and margin modes.** Trade with up to 5x leverage in either cross or isolated
  margin, configured per market. See [Risk Management](/latest/perps/guides/risk-management).
* **A single order book per market.** Each market (e.g. `BTC-USDT`) has one order book you
  can stream and maintain locally. See [Order Book](/latest/perps/guides/order-book).
* **REST and WebSocket.** Place and manage orders and stream live market data over both
  interfaces. See the [WebSocket overview](/latest/perps/websocket-api/overview).

## Core Concepts

| Concept     | Description                                                                            |
| ----------- | -------------------------------------------------------------------------------------- |
| Market      | A perpetual market, identified by a symbol such as `BTC-USDT`.                         |
| Index price | The reference price of the underlying, aggregated from external sources.               |
| Mark price  | The price used for margin, PnL, and liquidation calculations.                          |
| Funding     | Periodic payments exchanged between longs and shorts to anchor the price to the index. |
| Margin mode | `C` (cross) or `I` (isolated), set per market.                                         |
| Leverage    | A multiplier from `1` to `5`, set per market.                                          |
| Liquidation | Closing of a position when its margin falls below the maintenance requirement.         |

## How to Get Started

<Steps>
  <Step title="Set up your account">
    Complete [Get Set Up with Rails](/latest/get-set-up-with-rails) — registering,
    funding, and creating API keys.
  </Step>

  <Step title="Connect">
    Authorize your requests with an access token (see
    [API Authorization](/latest/authorization)) and open a
    [WebSocket](/latest/perps/websocket-api/overview) connection.
  </Step>

  <Step title="Explore market data">
    Read [Market Data](/latest/perps/guides/market-data) and maintain a local
    [Order Book](/latest/perps/guides/order-book) from snapshots and delta updates.
  </Step>

  <Step title="Trade">
    Place, modify, and cancel orders via the
    [Order Creation Stream](/latest/perps/websocket-api/order-creation-stream/overview),
    then track positions and balances from your account streams.
  </Step>
</Steps>
