API Reference
Build on OddsForge. Access real-time prediction market data, prices, events, and trading activity through our REST API.
âšī¸
Base URL:
All endpoints return JSON. No API key required for read-only endpoints.
https://oddsforge.org/apiAll endpoints return JSON. No API key required for read-only endpoints.
Quick Start
Fetch all active markets with a single request:
curl https://oddsforge.org/api/markets?status=active
Endpoints
đ Markets
Browse, search, and filter prediction markets. Get real-time prices and market details.
GET /api/markets ¡ GET /api/markets/:id ¡ GET /api/markets/trending
đ
Events
Multi-outcome events that group related markets together.
GET /api/events ¡ GET /api/events/:slugOrId
đą Trading
Retrieve trade history and estimate trade outcomes before placing orders.
GET /api/trades ¡ POST /api/pool/estimate
đŧ Portfolio
Check positions, trade history, and portfolio statistics for any wallet.
GET /api/portfolio/:wallet ¡ GET /api/portfolio/:wallet/stats
đ¤ Users
User profiles, leaderboard rankings, and trader statistics.
GET /api/users/:wallet ¡ GET /api/users/leaderboard
đ Search
Full-text search across all markets and events.
GET /api/search?q=
đ Place Trade
Submit trades via API with HMAC authentication. Build bots and automated strategies.
POST /api/pool/trade ¡ POST /api/pool/estimate
đ° Balance & Funds
Check balances, deposit USDC, and withdraw funds. Full ledger history.
GET /api/pool/balance/:wallet ¡ POST /api/pool/deposit ¡ POST /api/pool/withdraw
Rate Limits
The API is rate-limited to 200 requests per minute per IP address. If you exceed this limit, you will receive a 429 Too Many Requests response. See Rate Limits for details.
Response Format
All successful responses follow this structure:
{
"success": true,
"data": [ ... ] // Array or object depending on endpoint
"total": 263, // Total count (for paginated endpoints)
"page": 1, // Current page
"limit": 20 // Items per page
}
Error responses:
{
"success": false,
"error": "Market not found"
}
Pagination
List endpoints support pagination via query parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-indexed) |
limit | integer | 20 | Items per page (max 100) |
đĄ
Need help? Join our Discord for API support and community discussions.
OddsForge