flag-checkeredGetting Started

Choose your integration path:

codeEVM Integration Guidechevron-right
circle-info

Start here if you're building on EVM chains. Covers environment setup, contract connections, and basic operations like opening positions and managing collateral.

codeWASM Integration Guidechevron-right
circle-info

For WASM-based chains and clients. Learn integration patterns with language-specific examples and deployment guidance.

Sai Core

Comprehensive documentation of the Sai smart contracts, modules, and architecture.

Core Modules

Perp Contractchevron-right
circle-info

Main perpetual futures contract handling position management, collateral, and settlement.

Perp: Borrowing Modulechevron-right
circle-info

Borrowed funds management, interest rates, and liquidation mechanics.

Perp: Price Impact Modulechevron-right
circle-info

How large trades affect pricing, slippage calculation, and execution costs.

Reference

Perp: State Variableschevron-right
circle-info

Complete reference of all smart contract state variables and their purposes.

Contract Addresses Referencechevron-right
circle-info

Mainnet and testnet deployment addresses for all Sai contracts.

WASM & EVM Integrationchevron-right
circle-info

Platform-specific details for direct smart contract integration.

Sai Keeper

Query and subscribe to real-time data from the Sai protocol. Perfect for dashboards, bots, and analytics tools.

Getting Started

Core Conceptschevron-right
circle-info

Understand indexing, subscriptions, and how Keeper structures protocol data.

Client Setupchevron-right
circle-info

Get your GraphQL client configured and authenticated in minutes.

API Reference

Perp APIchevron-right
circle-info

Query positions, orders, trades, and perpetual-specific data.

Liquidity Provider (LP) APIchevron-right
circle-info

Access liquidity pool data, provider positions, and performance metrics.

Oracle APIchevron-right
circle-info

Get price feeds and oracle data used throughout the protocol.

Fees APIchevron-right
circle-info

Query fee structures, accruals, and historical fee data.

Examples

Examples: Querieschevron-right
circle-info

Copy-paste ready GraphQL queries for common use cases.

Examples: Subscriptionschevron-right
circle-info

See how to subscribe to real-time updates and build event-driven applications.

Advanced

Filters & Paginationchevron-right
circle-info

Master filtering, sorting, and pagination for efficient large-scale data retrieval.

Last updated