aid: betfair url: https://raw.githubusercontent.com/api-evangelist/betfair/refs/heads/main/apis.yml name: Betfair kind: company description: 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. image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg tags: - Betting Exchange - Sports Betting - Wagering - Trading - Market Data - JSON-RPC - Streaming created: '2026-07-03' modified: '2026-07-03' specificationVersion: '0.19' apis: - aid: betfair:betfair-betting-api name: Betfair Betting API tags: - Betting - Markets - Orders - Prices image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg humanURL: https://developer.betfair.com/en/get-started/ baseURL: https://api.betfair.com/exchange/betting properties: - url: https://developer.betfair.com/exchange-api/ type: Documentation - url: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Betting+API type: APIReference - url: openapi/betfair-openapi.yml type: OpenAPI - url: collections/betfair.postman_collection.json type: PostmanCollection - url: collections/betfair.opencollection.json type: OpenCollection description: The core exchange API (SportsAPING). Navigate markets (listEventTypes, listCompetitions, listEvents, listMarketCatalogue), read live prices and depth (listMarketBook, listRunnerBook), and place, cancel, replace, and update bets (placeOrders, cancelOrders, replaceOrders, updateOrders) plus read current and cleared orders. Available as JSON-RPC (/betting/json-rpc/v1) and per-operation REST (/betting/rest/v1.0/). - aid: betfair:betfair-accounts-api name: Betfair Accounts API tags: - Accounts - Funds - Statement image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg humanURL: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Accounts+API baseURL: https://api.betfair.com/exchange/account properties: - url: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Accounts+API type: APIReference - url: openapi/betfair-openapi.yml type: OpenAPI - url: collections/betfair.postman_collection.json type: PostmanCollection - url: collections/betfair.opencollection.json type: OpenCollection description: Account-level operations (AccountAPING) - retrieve account funds and details (getAccountFunds, getAccountDetails), read the account statement (getAccountStatement), list currency rates, and manage developer application keys and application subscription tokens. JSON-RPC (/account/json-rpc/v1) and REST (/account/rest/v1.0/). - aid: betfair:betfair-heartbeat-api name: Betfair Heartbeat API tags: - Heartbeat - Risk - Dead Mans Switch image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg humanURL: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Heartbeat+API baseURL: https://api.betfair.com/exchange/heartbeat properties: - url: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Heartbeat+API type: APIReference - url: openapi/betfair-openapi.yml type: OpenAPI - url: collections/betfair.postman_collection.json type: PostmanCollection - url: collections/betfair.opencollection.json type: OpenCollection description: 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 client's unmatched bets, protecting an automated trader against a crashed or disconnected process. JSON-RPC (/heartbeat/json-rpc/v1) and REST (/heartbeat/rest/v1.0/). - aid: betfair:betfair-exchange-stream-api name: Betfair Exchange Stream API tags: - Streaming - Real Time - Market Data - TCP image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg humanURL: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Exchange+Stream+API baseURL: tcp+ssl://stream-api.betfair.com:443 properties: - url: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Exchange+Stream+API type: Documentation - url: https://github.com/betfair/stream-api-sample-code type: SourceCode - url: asyncapi/betfair-asyncapi.yml type: AsyncAPI description: 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 JSON message per line) - NOT WebSocket; attempted WebSocket connections are refused. Clients authenticate then send marketSubscription / orderSubscription requests and receive market change (mcm) and order change (ocm) messages plus connection, status, and heartbeat frames. - aid: betfair:betfair-historic-data-api name: Betfair Historic Data API tags: - Historical Data - Downloads - Market Data image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg humanURL: https://historicdata.betfair.com/ baseURL: https://historicdata.betfair.com/api properties: - url: https://developer.betfair.com/historical-data-services-api/ type: Documentation - url: https://historicdata.betfair.com/Betfair-Historical-Data-Feed-Specification.pdf type: Specification - url: openapi/betfair-openapi.yml type: OpenAPI description: Programmatic access to purchased historical exchange market data. REST POST operations (GetMyData, GetCollectionOptions, GetAdvBasketDataSize, DownloadListOfFiles, DownloadFile) authenticated with the same session token (ssoid). Data packages must first be purchased via historicdata.betfair.com. - aid: betfair:betfair-vendor-api name: Betfair Vendor API tags: - Vendor - Affiliate - OAuth2 - Web Apps image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/apis-json-logo.jpg humanURL: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Web+Vendor+Facility baseURL: https://identitysso.betfair.com properties: - url: https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Web+Vendor+Facility type: Documentation description: 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 access and refresh tokens and act on a Betfair customer's behalf, with the vendor able to charge subscriptions via application subscription tokens. common: - type: DomainSecurity url: security/betfair-domain-security.yml - type: Authentication url: authentication/betfair-authentication.yml - type: LinkedIn url: https://www.linkedin.com/company/betfair - type: Website url: https://www.betfair.com - type: Documentation url: https://developer.betfair.com/ - type: Plans url: plans/betfair-plans-pricing.yml - type: RateLimits url: rate-limits/betfair-rate-limits.yml - type: FinOps url: finops/betfair-finops.yml maintainers: - FN: Kin Lane email: kin@apievangelist.com