Documentation API Reference Tokenomics

API Reference

Build on OddsForge. Access real-time prediction market data, prices, events, and trading activity through our REST API.

â„šī¸
Base URL: https://oddsforge.org/api
All 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:

ParameterTypeDefaultDescription
pageinteger1Page number (1-indexed)
limitinteger20Items per page (max 100)
💡
Need help? Join our Discord for API support and community discussions.