Oracle Prediction Market API
Developer documentation for integrating with the Oracle prediction market platform.
Contents
- REST API Reference - Full endpoint documentation
- WebSocket Guide - Real-time market data feeds
- Builder Integration - Third-party frontend integration via signing server
- Deposits & Withdrawals - Funding flow for Solana and Fogo chains
- Liquidity Provision - Per-market LP vault system
Quick Start
Base URLs:
- Gateway (REST): https://oracle-gateway-{project}.run.app
- WebSocket: wss://oracle-ws-{project}.run.app/v1/ws
- Signer (builders): https://oracle-signer-{project}.run.app
- Deposit Service: https://oracle-deposit-{project}.run.app
- Swagger: {gateway_url}/swagger-ui/
Key Concepts: - Prices are in basis points (1-9999). 5000 = $0.50, 7500 = $0.75. - Market IDs are hex-encoded 32-byte SHA-256 hashes. - User addresses are Base58-encoded Ed25519 public keys. - Balances are in micro-USDC (6 decimals). 1,000,000 = $1.00.
Example: Place an order
curl -X POST ${GATEWAY}/v1/orders \
-H "Content-Type: application/json" \
-d '{
"market_id": "a1b2c3...",
"user": "4xR2kF7b...",
"side": "buy",
"outcome": "yes",
"price": 6500,
"size": 100,
"order_type": "gtc",
"signature": "deadbeef...",
"nonce": 1
}'