What is MM?
The Market Making (MM) engine is a high-frequency trading system that:- Receives live odds from bookmakers via OddsPapi v5 WebSocket
- Posts orders on prediction market exchanges at calculated prices
- Detects fills in real-time via exchange WebSockets
- Automatically hedges filled positions on bookmakers
- Tracks positions, exposure, and PnL through the full settlement lifecycle
How market making works
Order pricing
The engine converts bookmaker odds to exchange probability prices and posts orders accordingly. Price ticks and order sizing are configured per-tournament.Hedging
When an exchange order fills, the engine automatically hedges by placing a corresponding bet on the assigned bookmaker. The process handles concurrent fills safely and reposts filled amounts back on the exchange to maintain market presence.Base URL
/api/v1/.
Key concepts
Clients
Clients are trading entities configured with specific exchange accounts and bookmaker hedging targets.- Simple format:
"vertex"— client name IS the bookmaker - Compound format:
"demo:vertex"— client=demo, hedges on vertex
Exchanges
Target platforms where orders are placed:| Exchange | Auth method | Order type |
|---|---|---|
| Polymarket | Ethereum wallet signing | CLOB limit orders |
| Polymarket US | JWT + gRPC | gRPC order submission |
| Kalshi | RSA-PSS signing | REST limit orders |
| Novig.us | OAuth 2.0 | REST orders |
| SX.bet | API key + EIP712 | Signed orders |
| Betfair | SSL certificate | Exchange API |
| ProphetX | JWT | REST orders |
| Matchbook | Session token | REST orders |
| Smarkets | Session token | REST orders |
| 4casters | Token auth | Socket.IO |
| Predict.fun | JWT + EIP712 | Signed orders |
Order lifecycle
Match status
Settlement status
Tradeable outcomes
Default outcome IDs: 111, 112, 121, 122, 131, 132, 141, 142, 151, 152, 161, 162, 171, 172 These cover 1x2 markets, over/under, handicap, correct score, and both sides.Endpoints at a glance
Client API (X-API-Key auth)
| Category | Endpoints | Description |
|---|---|---|
| Identity | GET /api/v1/me | Get your client info |
| Orders | GET /api/v1/orders | View exchange orders (paginated, filterable) |
| Orders | GET /api/v1/orders/{id} | Get specific order |
| Orders | GET /api/v1/orders/open | List open orders for a fixture |
| Orders | GET /api/v1/orders/summary | Order statistics |
| Bets | GET /api/v1/bets | View hedge bets (paginated) |
| Bets | GET /api/v1/bets/{id} | Get specific bet |
| Bets | GET /api/v1/bets/summary | Bet statistics |
| Fixtures | GET /api/v1/fixtures | List fixtures with scores |
| Fixtures | GET /api/v1/fixtures/{id} | Get specific fixture |
| Positions | GET /api/v1/positions | Aggregated positions |
| Positions | GET /api/v1/positions/summary | Position summary |
| Accounts | GET /api/v1/accounts | List exchange accounts (no credentials) |
WebSocket
| Endpoint | Description |
|---|---|
WS /ws/subscribe | Real-time order, bet, account, score, and emergency updates |
Rate limits
- REST API: 100 requests/minute per client
- WebSocket: 5 concurrent connections per API key