Betfair
Betfair operates the world's largest online betting exchange, where customers back and lay outcomes against each other rather than against a bookmaker. The Betfair Exchange API (API-NG) gives automated clients programmatic access to the exchange - navigating markets, retrieving live prices, placing and managing bets, and reading account state. It is exposed as lightweight JSON-RPC and REST operations over HTTPS under https://api.betfair.com/exchange (the Betting, Accounts, and Heartbeat APIs), with a separate real-time Exchange Stream API delivered over a raw SSL/TCP socket (CRLF-delimited JSON, not WebSocket) for low-latency market and order updates. A Historic Data API and a licensed Vendor (affiliate) API round out the platform. Auth combines an Application Key with a session token (ssoid) obtained from Betfair's identity SSO login.
APIs
Betfair Betting API
The core exchange API (SportsAPING). Navigate markets (listEventTypes, listCompetitions, listEvents, listMarketCatalogue), read live prices and depth (listMarketBook, listRunner...
Betfair Accounts API
Account-level operations (AccountAPING) - retrieve account funds and details (getAccountFunds, getAccountDetails), read the account statement (getAccountStatement), list currenc...
Betfair Heartbeat API
A "dead man's switch" (HeartbeatAPING) - the client calls heartbeat on an interval (10-300s preference); if Betfair stops receiving heartbeats it will automatically cancel the c...
Betfair Exchange Stream API
Low-latency, subscription-based push of market and order changes over a persistent raw SSL/TCP socket to stream-api.betfair.com:443. The protocol is CRLF-delimited JSON (one JSO...
Betfair Historic Data API
Programmatic access to purchased historical exchange market data. REST POST operations (GetMyData, GetCollectionOptions, GetAdvBasketDataSize, DownloadListOfFiles, DownloadFile)...
Betfair Vendor API
The Web Vendor Facility for licensed software vendors building web-based betting applications. Uses an OAuth2-style authorization flow so a vendor's web application can obtain a...
Collections
Pricing Plans
Rate Limits
FinOps
Betfair Finops
FINOPSEvent Specifications
Betfair Exchange Stream API (SSL/TCP)
AsyncAPI 2.6 description of the Betfair **Exchange Stream API** - Betfair's low-latency, subscription-based push channel for market and order changes. IMPORTANT TRANSPORT NOTE: ...
ASYNCAPI