> For the complete documentation index, see [llms.txt](https://ocx.gitbook.io/ocx-doc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ocx.gitbook.io/ocx-doc/ocx/readme.md).

# README

Welcome to the OCX documentation.

OCX is a unified derivatives exchange for on-chain traders. One USDC collateral pool, one login, and four trading products — spot, perpetuals, quarterly futures, and European options — all under a single cross-margin system.

## What makes OCX different

* **Futures-anchored perpetuals.** OCX perpetual indices are derived from the futures curve, not from spot. This aligns perp pricing with institutional forward curves and removes the basis drift common to spot-anchored perps.
* **Cross-margin by default.** Your USDC collateralises every product. Spot, perp, future, and option positions net against one another across the same underlying, with correlation credits between related underlyings.
* **Institutional-grade risk.** A SPAN-style risk engine with 16 scenarios per underlying, proper Black-76 greeks for options, and pre-computed risk arrays that refresh every five seconds for sub-millisecond order checks.
* **On-chain custody, off-chain speed.** USDC custody lives in a vault on Base. Matching and position keeping happen off-chain, with withdrawals settled back on-chain via an automated keeper.
* **Programmable trading.** Every user can mint scoped API keys (read or trade), optionally restricted to specific IPs, with a tamper-evident audit trail.

## How to use this documentation

* New to OCX? Start with the **Product** section to learn what OCX offers and how its pricing and margin model works.
* Ready to trade? Follow **Getting Started** to connect your wallet, deposit USDC, and place your first order.
* Building a bot or integrating programmatically? Jump to **Authentication** and the **API Reference**.

## Base URLs

| Environment          | Base URL                     |
| -------------------- | ---------------------------- |
| Production REST API  | `https://api.ocx.global`     |
| Production WebSocket | `wss://api.ocx.global`       |
| Market data / charts | `https://perpapi.ocx.global` |

All endpoints documented in the API Reference are relative to `https://api.ocx.global` unless stated otherwise.

## Support

* Product updates and status are published in the **Changelog**.
* For integration questions, reach out to the team through your usual channel.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ocx.gitbook.io/ocx-doc/ocx/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
