Charts and History
InTots provides snapshot-based historical data for pools and markets. Use these endpoints to render price charts, track probability movements over time, and analyze market trends.
Pool Ratio Chartβ
Returns historical probability ratios for a pool's markets over a given time scale.
GET /api/v1/pools/{id}/ratio/chart
Path Parametersβ
| Parameter | Type | Description |
|---|---|---|
id | string | The pool ID. |
Query Parametersβ
| Parameter | Type | Description |
|---|---|---|
scale | string | Required. Time scale for data points. One of: 1h, 1d, 1w, 1m. |
Scale Referenceβ
| Scale | Meaning | Typical Use |
|---|---|---|
1h | 1-hour intervals | Intraday view of a single trading session. |
1d | 1-day intervals | Multi-day view for events lasting days to weeks. |
1w | 1-week intervals | Weekly trend for longer-running events. |
1m | 1-month intervals | High-level trend for events spanning months. |
Responseβ
Returns an array of time-series data points, each containing a timestamp and the ratio values for the pool's markets at that point in time.
[
{
"timestamp": "2026-03-15T10:00:00Z",
"ratios": {
"Yes": 6200,
"No": 3800
}
},
{
"timestamp": "2026-03-15T11:00:00Z",
"ratios": {
"Yes": 6450,
"No": 3550
}
}
]
Ratio values are on the 0--10000 scale, matching market prices. They always sum to 10000 across all outcomes in a pool.
Exampleβ
# Hourly ratio data for a pool
curl "https://api.intots.com/api/v1/pools/pool_xyz/ratio/chart?scale=1h"
# Daily ratio data
curl "https://api.intots.com/api/v1/pools/pool_xyz/ratio/chart?scale=1d"
Comprehensive Pool Chartsβ
Returns extended chart data for a pool, including volume and other aggregate metrics alongside price history.
GET /api/v1/pools/{id}/charts
Path Parametersβ
| Parameter | Type | Description |
|---|---|---|
id | string | The pool ID. |
Responseβ
Returns a richer dataset than the ratio endpoint, suitable for building detailed analytics dashboards. Includes price snapshots, volume bars, and trade counts per interval.
Market Price Chartβ
Returns historical price data for a single market (one outcome within a pool).
GET /api/v1/markets/{id}/chart
Path Parametersβ
| Parameter | Type | Description |
|---|---|---|
id | string | The market ID. |
Responseβ
[
{
"timestamp": "2026-03-15T10:00:00Z",
"price": 6200,
"volume": 350000
},
{
"timestamp": "2026-03-15T11:00:00Z",
"price": 6450,
"volume": 120000
}
]
| Field | Type | Description |
|---|---|---|
timestamp | string | ISO 8601 timestamp for the data point. |
price | integer | Market price at this snapshot (0--10000 scale). |
volume | integer | Trading volume during this interval, in cents. |
How Snapshots Workβ
InTots chart data is snapshot-based: the system periodically records the state of each pool and market at fixed intervals. This means:
- Data points are evenly spaced according to the selected
scale. - Each data point reflects the price/ratio at the moment the snapshot was taken, not an average over the interval.
- Volume figures represent the total trading activity between the current snapshot and the previous one.
- If no trades occurred during an interval, the snapshot still records the current price (which will match the previous snapshot).
Choosing the Right Endpointβ
| Use Case | Endpoint |
|---|---|
| Compare all outcomes in a pool over time | GET /pools/{id}/ratio/chart |
| Full analytics dashboard for a pool | GET /pools/{id}/charts |
| Price history for one specific outcome | GET /markets/{id}/chart |
| Real-time price updates (no polling) | WebSocket chart feed |
Combining with Real-Time Dataβ
For a seamless chart experience, load historical data from these endpoints on page load and then append live updates from the WebSocket event chart feed (/api/v1/ws/events/{event_id}/chart). This avoids polling and keeps your charts up to date in real time.
// 1. Load historical data
const history = await fetch('/api/v1/pools/pool_xyz/ratio/chart?scale=1h').then(r => r.json());
// 2. Connect to live updates
const ws = new WebSocket('wss://api.intots.com/api/v1/ws/events/evt_abc123/chart');
ws.onmessage = (event) => {
const update = JSON.parse(event.data);
if (update.type === 'chart_update') {
history.push(update);
renderChart(history);
}
};
Tipsβ
- Start with
1dscale for most event pages -- it provides a good balance of detail and coverage. - Use
1hfor active trading sessions where users want granular price movement. - Ratio values always sum to 10000 within a pool. If you display them as percentages, they will always add up to 100%.
- Volume is in cents. Divide by 100 for display in the base currency unit.