API Reference
Complete reference for the Intotes REST API and WebSocket endpoints.
Base URLβ
https://intotes.com/api/v1/
All endpoints are relative to this base URL.
Authenticationβ
Intotes uses JWT tokens delivered as HTTP-only cookies:
access_tokenβ Short-lived (20 min), required for authenticated endpointsrefresh_tokenβ Long-lived (72 hours), used to obtain new access tokens
After signing in, cookies are set automatically. For programmatic access, include cookies in requests or use the Authorization header:
Authorization: Bearer <access_token>
Auth Levelsβ
| Level | Description |
|---|---|
| None | Public endpoint, no authentication needed |
| Optional | Works with or without auth (may return different data) |
| Required | Must be authenticated |
| Creator | Must have is_creator role |
| StatsViewer | Must have is_stats_viewer role |
Request Formatβ
- Content-Type:
application/jsonfor all POST/PUT/PATCH requests - Maximum body size: 1 MB
- Timestamps: RFC3339 format (
2024-01-15T10:30:00Z) - Money: All amounts in cents (kopecks for RUB). See Money Format
Response Formatβ
Success Responseβ
Most endpoints return the resource directly:
{
"id": 42,
"name": "Example Event",
"status": "started"
}
Paginated endpoints return:
{
"events": [],
"next_cursor": "abc123",
"has_more": true
}
Error Responseβ
All errors follow a consistent format:
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable description"
}
}
See Error Handling for the complete error code reference.
Rate Limitingβ
All endpoints are rate-limited per IP address. Response headers:
| Header | Description |
|---|---|
X-RateLimit-Limit | Max requests per window |
X-RateLimit-Remaining | Requests remaining |
X-RateLimit-Reset | Window reset time (Unix timestamp) |
See Rate Limiting for details.
Endpoint Groupsβ
| Group | Prefix | Description |
|---|---|---|
| Authentication | /auth/ | Sign up, sign in, OAuth, token refresh |
| Users | /users/ | Profile, avatar, PnL |
| Referrals | /users/me/referral/ | Referral program |
| Watchlist | /users/me/watchlist/ | Saved events |
| Events | /events/ | Event CRUD, search, feed |
| Pools | /pools/ | Pool details, charts |
| Markets | /markets/ | Market details, orderbook |
| Trading | /market/orders/ | Orderbook orders, positions |
| LMSR/AMM | /lmsr/ | AMM trades and preview |
| P2P Exchange | /p2p/ | Ads, orders, chat |
| Notifications | /notifications/ | Read/unread management |
| Comments | /comments/ | Event comments |
| Chat | /chat/ | Support chat |
| WebSocket | /ws/ | Real-time feeds |
| Assets | /assets/ | Crypto prices, FX rates |
| Health | /health | Health checks |