Documentation Index
Fetch the complete documentation index at: https://docs.generalmarket.io/llms.txt
Use this file to discover all available pages before exploring further.
Vision API
The API is public. No authentication. No rate limiting. We trust you. This may be a mistake. Use it to list batches, submit bitmaps, query balances, backtest strategies, and read tick history. Everything the prediction market knows, it will tell you.Architecture
Vision API routes are split across two proxy targets depending on the type of data:Base URL
All Vision endpoints are served under:Authentication
None. The Vision API is public. Player identity is determined by Ethereum addresses passed as parameters. No keys, no tokens, no gatekeepers. The data belongs to everyone — the losses, unfortunately, are personal.Endpoints
| Method | Path | Description |
|---|---|---|
GET | /vision/batches | List all active batches |
GET | /vision/markets | List supported markets |
GET | /vision/batch/{id}/state | Full state for a single batch |
POST | /vision/bitmap | Submit a prediction bitmap (fan-out to all oracles) |
GET | /vision/balance/{batch_id}/{player} | Player balance with BLS proof |
GET | /vision/batch/{id}/history | Tick result history for a batch |
GET | /vision/reveal/{batch_id}/{tick_id} | Revealed bitmaps after tick closes |
POST | /vision/backtest | Backtest a bitmap strategy |
GET | /vision/leaderboard | Player rankings by PnL |
GET | /vision/snapshot | Market price snapshot for all or one source |
GET | /vision/snapshot/meta | Source health, asset counts, sync status |
Common Patterns
Wei-Encoded Values
All token amounts (balances, TVL, stake) are returned as string-encoded wei values to avoid floating-point precision loss. For L3 USDC (18 decimals), divide by1e18 to get the human-readable amount.
Error Responses
All endpoints return errors in a consistent format:| Code | Meaning |
|---|---|
200 | Success |
400 | Bad request (invalid parameters, malformed bitmap, etc.) |
403 | Forbidden (e.g., reveal window not yet expired) |
404 | Resource not found (batch or player does not exist) |
500 | Internal server error (database failure) |
502 | Upstream service (oracle or data-node) unavailable |
Addresses
Ethereum addresses in responses are formatted as checksummed hex strings with the0x prefix (e.g., 0xAbC123...def).
Rate Limits
There are currently no rate limits. Generosity, or negligence — the distinction matters less than you think.Quick Start
Fetch all active batches:- cURL
- Python
- TypeScript