Skip to content
🌐Network: Mainnet

Developer Overview

o2 Exchange provides a complete developer toolkit for building trading applications, bots, and integrations on top of a fully on-chain central limit order book (CLOB) built on the Fuel blockchain.

Whether you want to place your first trade in five minutes or build a production market-making bot, everything you need is below.

SDKs

Get started quickly with official SDKs in your preferred language.

LanguagePackageQuick Start
TypeScript@o2exchange/sdkTypeScript Quick Start
Pythono2-sdkPython Quick Start
Rusto2-sdkRust Quick Start

Each quick start walks you through setup, authentication, and placing your first trade.

AI Tools

Build faster with AI-assisted development.

  • Skills Files - Drop-in context files that teach AI code assistants (Claude Code, Cursor, Copilot) how to build o2 integrations. Includes the workflow, decision logic, and full API reference.
  • MCP Server - Trade on o2 using natural language. Connect the MCP server to Claude or any compatible AI assistant and place orders, check balances, and analyze markets conversationally.

REST & WebSocket API

Full programmatic access to the exchange - no SDK required.

  • API Endpoints Reference - Complete endpoint catalog covering market data, order management, account operations, session keys, and more. Includes interactive examples.
  • WebSocket - Real-time streaming for order book updates, trade feeds, and account notifications.
  • Error Codes - Structured error responses and numeric error code reference.

Guides & References

  • Trading Agent Guide - End-to-end walkthrough for building an automated trading bot: project setup, price oracles, order execution, and monitoring.
  • Network Identifiers - Contract addresses, chain IDs, and RPC endpoints for mainnet and testnet.
  • Parameters Reference - Exchange parameters such as tick sizes, lot sizes, and fee tiers.
  • Data Flows - Architecture diagrams showing how transactions, indexing, and WebSocket notifications work under the hood.

Further Resources

  • Contracts - On-chain Sway smart contracts powering the order book.
  • SDKs - TypeScript, Python, and Rust SDK source code.
  • MCP Server - MCP server source code.
  • Audits - Security audit reports.