# STATE Docs > STATE is a real-world event-driven exchange protocol on Solana — a new category of event-based token market. Real-world events become on-chain tokens with bonding curves. AI agents can discover events, launch tokens, buy and sell — all via REST API. ## Get Started - [What is STATE](https://docs.instate.cc/get-started/what-is-state): STATE is a new category of exchange — event-based token markets on Solana. The ARK2 pipeline ingests news, scores real-world events, generates tickers and market metadata. Each event becomes a tradeable token on a bonding curve. Token lifecycle resolves when the real-world event occurs. - [Quick Start](https://docs.instate.cc/get-started/quick-start): From connection to live trade in seconds. No wallet required for read endpoints. Create wallet → sign in → buy → sell. - [Rate Limits](https://docs.instate.cc/get-started/rate-limits): Default rate limits, burst allowances, and how to request higher limits. ## API — Authentication - [Create a STATE Wallet](https://docs.instate.cc/api/create-wallet): POST /api/wallet/create — one call returns publicKey + privateKey (base58). STATE-managed keypair, ready to trade instantly. - [Sign In with STATE Wallet](https://docs.instate.cc/api/sign-in): Three calls — GET nonce, sign message, POST signature → JWT (7-day). Full access to every trade, launch, and market. - [Create a Solana Wallet](https://docs.instate.cc/api/create-keypair): Generate a standard Solana keypair with @solana/web3.js. Save secret key. Connect to STATE. - [Sign In with Solana Wallet](https://docs.instate.cc/api/solana-sign-in): Load keypair, sign SIWS challenge, POST signature → JWT. Auto-registered on first login. ## API — Launch Flow - [Launch Flow Overview](https://docs.instate.cc/api/launch-overview): Six API calls. One live token. From zero to bonding curve in under 30 seconds. Authenticate → discover events → get quote → pay 0.02 SOL fee → launch → poll for mint address. ## Developer Tools - [STATE Cursor Plugin](https://docs.instate.cc/developer-tools/cursor-plugin): All-in-one Cursor plugin with subagents, skills, rules, and MCP servers. - [MCP Server](https://docs.instate.cc/developer-tools/connect-sdk-mcp): Give AI agents direct access to STATE market operations and bonding curve data. - [Bonding Curve Mechanics](https://docs.instate.cc/developer-tools/bonding-curve): Capital-formation curve — how token prices are derived on-chain. - [Market Resolution](https://docs.instate.cc/developer-tools/market-resolution): How event markets resolve and how to integrate resolution events into your application. - [Debug Endpoints](https://docs.instate.cc/developer-tools/debug-endpoints): Internal REST endpoints to trigger price broadcasts and inspect pipeline state. ## Key API Endpoints Base URL: https://api.instate.cc | Method | Path | Auth | Description | |--------|------|------|-------------| | POST | /api/wallet/create | None | Create STATE wallet — returns publicKey + privateKey | | GET | /api/auth/nonce | None | Get nonce for SIWS signing | | POST | /api/auth/verify | None | Verify signed message → JWT | | POST | /api/auth/solana/verify | None | Verify Solana SIWS → JWT | | GET | /api/ready-events | None | List READY event markets ranked by score | | GET | /api/stream | None | SSE stream — live catalog + launched events | | POST | /api/agent/launch/quote | JWT | Quote a launch — returns fee amount | | POST | /api/agent/launch | JWT | Launch a token — returns launch_id | | GET | /api/agent/launch/:id | JWT | Poll launch status — returns mintAddress when done | | POST | /api/curve/buy | JWT | Buy tokens on bonding curve | | POST | /api/curve/sell | JWT | Sell tokens on bonding curve | ## SSE Stream Connect to https://api.instate.cc/api/stream for a real-time feed of prediction markets. On connect: replays last 200 catalog events (READY + LAUNCHED markets), then streams live events. Event types: - `catalog` — new READY market available (title, ticker, question, proposedResolveBy, evidenceUrls, thumbnailUrl, mintAddress null) - `launched` — market launched onto bonding curve (eventId, mintAddress, launchedAt) - `stream_ready` — replay complete, now in live mode - `: heartbeat` — keep-alive every 25s Example: ``` curl -N https://api.instate.cc/api/stream ``` ## Launch Flow (6 steps) 1. **Authenticate** — POST /api/auth/verify with signed nonce → JWT 2. **Discover** — GET /api/ready-events?limit=10 → pick highest-score event 3. **Quote** — POST /api/agent/launch/quote {eventId} → fee = 0.02 SOL, feeRecipient address 4. **Pay fee** — send 0.02 SOL on-chain to feeRecipient, capture txSignature 5. **Launch** — POST /api/agent/launch {eventId, feeSignature} → launch_id 6. **Poll** — GET /api/agent/launch/:id every 2s until status=LAUNCHED → mintAddress ## Optional: Full content https://docs.instate.cc/llms-full.txt