Yes — REST API Available
OddsForge provides a public REST API that gives you programmatic access to market data, events, trades, portfolios, and more. Whether you're building a trading bot, analyzing market data, or integrating OddsForge into your own application, the API has you covered.
https://oddsforge.org/apiAll endpoints return JSON responses. No API key is required for public read endpoints.
Key Endpoints
Here's an overview of the main API endpoints:
GET /api/markets
Returns a list of all prediction markets, including their titles, descriptions, current prices, categories, and resolution status. You can filter by status (active, resolved, upcoming) and category.
GET /api/markets/:id
Returns detailed information about a specific market, including the full description, current outcome prices, total volume, liquidity, and resolution details if the market is settled.
GET /api/events
Returns event groupings — markets that are related to the same real-world event. Events can contain multiple binary markets (e.g., an election event might include one market per candidate).
GET /api/trades
Returns recent trade activity across all markets. Each trade record includes the market ID, outcome, direction (buy/sell), amount, price, and timestamp. Useful for building price charts and monitoring market activity.
GET /api/portfolio/:address
Returns the portfolio of a specific wallet address — their current share holdings across all markets, trade history, and realized/unrealized profit and loss.
GET /api/search?q=query
Full-text search across markets and events. Returns matching markets ranked by relevance.
Example Request
Fetching all active markets is as simple as:
curl https://oddsforge.org/api/markets
Example response (abbreviated):
{
"markets": [
{
"id": 1,
"title": "Will BNB reach $1,000 by Dec 2026?",
"yes_price": 0.35,
"no_price": 0.65,
"volume": 125000,
"status": "active",
"end_date": "2026-12-31"
}
]
}
Use Cases
The OddsForge API enables a wide range of applications:
- Automated trading: Build bots that monitor market prices and execute trades based on your strategy. Combine the API data with on-chain smart contract interactions for fully automated trading.
- Data analysis: Pull historical trade and price data for research, backtesting strategies, or studying prediction market accuracy.
- Dashboards & visualizations: Create custom dashboards that display real-time market probabilities, volume trends, and portfolio performance.
- Integrations: Embed OddsForge market data into other applications — news sites, research tools, social media bots, or notification systems.
- Academic research: Prediction market data is valuable for studying information aggregation, crowd forecasting, and behavioral economics.
Rate Limits & Best Practices
To ensure fair access and platform stability, the API enforces rate limits:
- Public endpoints: 60 requests per minute per IP address.
- Burst allowance: Short bursts above the rate limit are tolerated, but sustained high-frequency requests will be throttled.
Follow these best practices when using the API:
- Cache responses where possible. Market data doesn't change every second — polling every 10–30 seconds is usually sufficient.
- Use specific endpoints rather than fetching all data and filtering client-side. For example, use
/api/markets/:idinstead of fetching the full market list. - Handle errors gracefully. The API returns standard HTTP status codes (200, 400, 404, 429, 500). Implement retry logic with exponential backoff for temporary failures.
- Respect rate limits. If you receive a 429 (Too Many Requests) response, back off and reduce your request frequency.
OddsForge Help Center