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 viemExplore the docs
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.
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 |
See the full components status page for the complete roadmap.