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.
Batches & Markets
What is there to bet on, and who is already betting. Two endpoints, two answers.
List Batches
GET /vision/batches
Returns all active batches with live player counts and TVL. Ordered by batch ID descending, capped at 100. The arena, enumerated.
curl https://generalmarket.io/api/vision/batches
import requests
response = requests.get("https://generalmarket.io/api/vision/batches")
data = response.json()
for batch in data["batches"]:
print(f"Batch {batch['id']}: {batch['player_count']} players, TVL: {batch['tvl']}")
const res = await fetch("https://generalmarket.io/api/vision/batches");
const { batches } = await res.json();
for (const batch of batches) {
console.log(`Batch ${batch.id}: ${batch.player_count} players, TVL: ${batch.tvl}`);
}
{
"batches": [
{
"id": 1,
"creator": "0xAbC123...def",
"market_ids": ["BTC-USD", "ETH-USD", "SOL-USD"],
"market_count": 3,
"tick_duration": 3600,
"player_count": 12,
"tvl": "5400000000000000000",
"paused": false
},
{
"id": 2,
"creator": "0x789Abc...012",
"market_ids": ["BTC-USD", "ETH-USD"],
"market_count": 2,
"tick_duration": 600,
"player_count": 5,
"tvl": "1200000000000000000",
"paused": false
}
]
}
Response Fields
| Field | Type | Description |
|---|
id | number | Unique batch identifier |
creator | string | Ethereum address of the batch creator |
market_ids | string[] | List of market identifiers included in the batch |
market_count | number | Number of markets in the batch |
tick_duration | number | Seconds between tick resolutions |
player_count | number | Current number of active players (from live in-memory state) |
tvl | string | Total value locked across all players, in wei |
paused | boolean | Whether the batch is currently paused by oracle consensus |
List Markets
GET /vision/markets
Returns the oracle-curated whitelist of supported markets. The menu of measurable things.
curl https://generalmarket.io/api/vision/markets
import requests
response = requests.get("https://generalmarket.io/api/vision/markets")
markets = response.json()["markets"]
for m in markets:
print(f"{m['symbol']}: {m['display_name']} ({m['market_id']})")
const res = await fetch("https://generalmarket.io/api/vision/markets");
const { markets } = await res.json();
markets.forEach((m: any) =>
console.log(`${m.symbol}: ${m.display_name} (${m.market_id})`)
);
{
"markets": [
{
"market_id": "BTC-USD",
"symbol": "BTC",
"display_name": "Bitcoin / USD"
},
{
"market_id": "ETH-USD",
"symbol": "ETH",
"display_name": "Ethereum / USD"
},
{
"market_id": "SOL-USD",
"symbol": "SOL",
"display_name": "Solana / USD"
}
]
}
Response Fields
| Field | Type | Description |
|---|
market_id | string | Unique market identifier (e.g., BTC-USD) |
symbol | string | Short ticker symbol (e.g., BTC) |
display_name | string | Human-readable market name (e.g., Bitcoin / USD) |