# OCX > OCX — the on-chain exchange for perpetuals, options, futures and spot. Developer, market-maker and AI-agent documentation. ## Docs - [Building an agent](https://docs.ocx.global/ai-agents/building-an-agent.md): A concrete, end-to-end walkthrough for an autonomous OCX trading agent: authenticate with an API key, pull market data, size an order with preview, submit it, monitor fills over the stream, and enforce risk. - [AI agents on OCX](https://docs.ocx.global/ai-agents/overview.md): Build autonomous trading agents on the same public API a human trader uses — read market data, decide, place and cancel orders, and manage risk, all under a programmatic API key. - [Errors & rate limits](https://docs.ocx.global/api-reference/errors.md): HTTP status codes, error response shape, business rejections, and rate-limit headers - [API overview](https://docs.ocx.global/api-reference/overview.md): Base URL, authentication, request and response shapes, rate limits, and versioning for the OCX API - [REST API](https://docs.ocx.global/api-reference/rest.md): Market data, trading, account, and wallet endpoints with parameters, examples, and response fields - [Streaming](https://docs.ocx.global/api-reference/websockets.md): Live OCX data over Server-Sent Events — order books, the options board, your fills and positions, and portfolio balances - [Balances & transfers](https://docs.ocx.global/concepts/balances.md): How funds are organized into wallet, perps, options, and spot buckets on OCX, and how to deposit, transfer, and withdraw. - [Margin & liquidations](https://docs.ocx.global/concepts/margin.md): How portfolio margin works on OCX at a high level, what triggers a liquidation, and how the insurance fund backstops the system. - [Orders, fills & fees](https://docs.ocx.global/concepts/orders.md): Order types, time-in-force, the order lifecycle, how fills work, and the maker–taker fee model on OCX. - [Products](https://docs.ocx.global/concepts/products.md): The four products you can trade on OCX — perpetuals, dated futures, options, and spot — how each one works, and how instruments are named. - [Architecture](https://docs.ocx.global/get-started/architecture.md): A high-level view of how OCX is put together — the API gateway, matching engines, market-data pipeline, and public streams. - [Authentication](https://docs.ocx.global/get-started/authentication.md): Sign in with your wallet using SIWE to open a session, and provision scoped API keys for programmatic and market-maker access. - [Quickstart](https://docs.ocx.global/get-started/quickstart.md): Read public market data, sign in with your wallet, fund a venue, and place your first order — in minutes. - [Introduction](https://docs.ocx.global/index.md): OCX is an on-chain exchange for perpetuals, options, dated futures, and spot — with institutional-grade pricing and a single public API. - [Best practices](https://docs.ocx.global/market-makers/best-practices.md): Inventory and risk, the dead-man switch, reconnect and heartbeat handling for a resilient market-making bot - [Fill stream](https://docs.ocx.global/market-makers/fill-stream.md): React to executions and position changes in real time over SSE instead of polling - [Market making on OCX](https://docs.ocx.global/market-makers/overview.md): How to run a market-making account on OCX — authentication, the quoting model, and what you need to get started - [Quoting API](https://docs.ocx.global/market-makers/quoting.md): Post and refresh a multi-level ladder of two-sided quotes with one atomic bulk call, and pull it with cancel-all - [Futures](https://docs.ocx.global/methodology/futures.md): Dated contracts marked to fair value from spot/index plus cost of carry - [Market data](https://docs.ocx.global/methodology/market-data.md): How OCX sources real-time CME reference prices through CQG - [Options](https://docs.ocx.global/methodology/options.md): Black-76 pricing off an implied-volatility surface fitted to market quotes - [Methodology overview](https://docs.ocx.global/methodology/overview.md): How OCX sources market data and prices its listed products - [Perpetuals](https://docs.ocx.global/methodology/perpetuals.md): Index price, mark price, and the funding mechanism