Everything you need to build on Rain
Rain is the decentralized prediction markets protocol on Arbitrum One, where anyone can create and trade markets on any topic. These docs cover the TypeScript SDK, REST & WebSocket APIs, and the upcoming fully on-chain CLOB.
npm install rain-sdk-v2 viem0xfb223f077E22DD7CDccdd21f0700697016cbc139 ยท View on Arbiscan โ ยท Details โExplore the docs
Live on Arbitrum Sepolia
The RAIN CLOB matching engine is deployed & activated on Arbitrum Sepolia, verified on-chain. Inspect the contract on Arbiscan.
Getting Started
Install the SDK, pick an environment, and launch your first prediction market in 5 minutes.
SDK Reference
Every transaction builder, read method, REST endpoint, and WebSocket event in rain-sdk-v2.
Code Examples
Copy-paste TypeScript: create markets, trade, place limit orders, stream live prices.
CLOB โ Coming Soon
A fully on-chain central limit order book on an Arbitrum Orbit L3, with a Rust matching engine via Stylus.
Engine & Code
The real RAIN CLOB matching engine: Rust/Stylus source, the matching loop, the spec, and the engineering evidence it works.
Components Status
What's live, what's in development, and what's planned across the Rain builder stack.
Brand Assets
Official Rain logos, color palette, and usage guidelines for your integrations.
What is Rain?
Rain is a decentralized prediction markets protocol deployed on Arbitrum One. Markets ("pools") hold 2โ26 options, and each option has a Yes and a No side that traders can buy, sell, split, and merge. Markets trade through an AMM or an on-chain order book, settle via AI or manual resolution with an on-chain dispute and appeal flow, and pay out winners directly from the market contract.
๐ Permissionless markets
Anyone can create a market on any topic โ set the question, options, liquidity, and resolution method.
๐ AMM + Order Book
Two trading models per market: continuous AMM pricing, or a price-time priority on-chain order book.
โ๏ธ On-chain resolution
AI or manual resolvers close markets, with bonded disputes and appeals enforced by contracts.
โฝ Gasless UX ready
Built-in Account Abstraction support (RainAA) with Alchemy paymaster gas sponsorship.
The builder stack
| Component | What it gives you | Status |
|---|---|---|
| rain-sdk-v2 | TypeScript transaction builders, on-chain reads, REST + WebSocket clients | Live |
| Protocol contracts | Markets, AMM, order book, resolution & disputes on Arbitrum One | Live |
| REST API + WebSocket | Pools, positions, orders, price history, realtime events | Live |
| On-chain CLOB (Orbit L3) | Fully on-chain matching engine in Rust/Stylus, CEX-grade performance | In Development |
| CLOB matching engine | Rust reference engine + Stylus contract, proven byte-identical by differential tests โ live on Arbitrum Sepolia | Testnet Live |
See the full components status page for the complete roadmap.