# Betfair Exchange Stream API

**Canonical:** https://apis.io/apis/betfair/betfair-exchange-stream-api/  
**Provider:** Betfair — https://apis.io/providers/betfair/  
**Base URL:** tcp+ssl://stream-api.betfair.com:443  
**Documentation:** https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Exchange+Stream+API

Betfair Exchange Stream API is one of 7 APIs that [Betfair](https://apis.io/providers/betfair/) publishes on the [APIs.io](https://apis.io/) network, described by an AsyncAPI event-driven specification. Tagged areas include Streaming, Real-Time, Market Data, and TCP. The published artifact set on APIs.io includes API documentation and an AsyncAPI specification.

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.

## Machine-readable artifacts (4)

- **Documentation** — https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Exchange+Stream+API
- **SourceCode** — https://github.com/betfair/stream-api-sample-code
- **AsyncAPI** — https://raw.githubusercontent.com/api-evangelist/betfair/refs/heads/main/asyncapi/betfair-asyncapi.yml
- **APIsJSON** — https://raw.githubusercontent.com/api-evangelist/betfair/refs/heads/main/apis.yml

## Other Betfair APIs (6)

- [Betfair Vendor API](https://apis.io/apis/betfair/betfair-vendor-api/)
- [Betfair Accounts API](https://apis.io/apis/betfair/betfair-accounts-api/)
- [Betfair Betting API](https://apis.io/apis/betfair/betfair-betting-api/)
- [Betfair Heartbeat API](https://apis.io/apis/betfair/betfair-heartbeat-api/)
- [Betfair Historic Data API](https://apis.io/apis/betfair/betfair-historic-data-api/)
- [Betfair Identity API](https://apis.io/apis/betfair/betfair-identity-api/)

## Tags

Streaming, Real-Time, Market Data, TCP

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/betfair/betfair-exchange-stream-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/betfair/.
