For Agents
Subscribe to live market and order updates from the Betfair Exchange over a streaming socket. Single request envelope dispatches authentication, market, and order subscriptions.
Get started with Betfair Exchange Streaming API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"subscribe to betfair exchange market updates"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Betfair Exchange Streaming API API.
Authenticate a streaming session against the Betfair Exchange using a session token and app key
Subscribe to live market change updates for selected market ids
Subscribe to order change updates scoped to a customer account
Send heartbeats to keep the streaming socket alive
GET STARTED
Use for: I need to subscribe to live odds for a horse race, Stream order updates for my Betfair account, Authenticate a Betfair streaming session, Send a heartbeat on the streaming connection
Not supported: Does not handle bet placement, account funding, or REST-style market browsing — use for live streaming market and order updates from the Betfair Exchange only.
The Betfair Exchange Streaming API provides a long-lived SSL socket connection delivering CRLF-delimited JSON messages for live market and order updates from the Betfair Exchange. It is used by trading bots, odds aggregators, and risk systems to receive low-latency price and order book changes without polling. The OpenAPI spec models the request and response message envelopes — authentication, market subscription, order subscription, and heartbeat operations are dispatched through a single /request entry point discriminated by an op field.
Receive change message snapshots and incremental deltas over a single TCP connection
Patterns agents use Betfair Exchange Streaming API API for, with concrete tasks.
★ Low-Latency Odds Feed
Power a trading dashboard with live Betfair Exchange prices by subscribing to market change messages over the streaming socket. The single /request endpoint accepts an authentication op followed by a marketSubscription op listing market ids of interest, and the server pushes snapshots and deltas back as CRLF-delimited JSON. Building a stable client with reconnect and resubscribe logic is typically 2 to 3 days of work.
POST /request with op=authentication and the session token, then POST /request with op=marketSubscription and the target market ids, and parse incoming change messages
Real-Time Order Monitoring
Monitor placed orders on the Betfair Exchange without polling the REST betting API by subscribing to order change messages. The orderSubscription op streams matched, unmatched, and cancelled state transitions for the authenticated account. A risk system can react in under a second with this feed where REST polling would lag by several seconds.
POST /request with op=authentication, then POST /request with op=orderSubscription and emit each order change message to a downstream risk topic
Connection Health Heartbeats
Keep a long-lived Betfair streaming connection alive and detect disconnects quickly by exchanging heartbeat messages. The heartbeat op is sent at a configurable interval and the server replies with the current connection clock, allowing the client to trigger a reconnect if responses lapse. Heartbeat handling is a small but essential part of any production integration.
POST /request with op=heartbeat every 5 seconds and trigger a full reconnect if no heartbeat response arrives within 10 seconds
AI Agent for Live Markets
An AI agent uses Jentic to discover the streaming subscription operation and start a market feed without learning the protocol details by hand. The agent calls /request with the appropriate op envelope to authenticate and subscribe, and Jentic stores the Betfair app key and session token securely. Through Jentic, an agent can be streaming market data within an hour of starting integration work.
Search Jentic for 'subscribe to betfair markets' and execute the returned /request operation with op=marketSubscription to start a feed for the target event
1 endpoints — the betfair exchange streaming api provides a long-lived ssl socket connection delivering crlf-delimited json messages for live market and order updates from the betfair exchange.
METHOD
PATH
DESCRIPTION
/request
Single dispatch endpoint for authentication, marketSubscription, orderSubscription, and heartbeat operations discriminated by the op field
/request
Single dispatch endpoint for authentication, marketSubscription, orderSubscription, and heartbeat operations discriminated by the op field
Three things that make agents converge on Jentic-routed access.
Credential isolation
Betfair app keys and session tokens are stored encrypted in the Jentic vault. Agents receive scoped execution rights — the credentials are injected into the in-protocol authentication message at execution time and never appear in the agent's context window.
Intent-based discovery
Agents search Jentic by intent such as 'subscribe to betfair markets' and Jentic returns the /request operation with the message envelope schema, removing the need to learn the streaming protocol from the GitHub sample code.
Time to first call
Direct Betfair streaming integration: 2 to 5 days to handle TLS socket setup, authentication, subscription, heartbeat, and reconnect. Through Jentic: under 1 hour — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
BetsAPI
Aggregated odds and event data across multiple bookmakers via REST
Use BetsAPI when an agent needs cross-bookmaker odds without holding a Betfair session; use the Betfair Streaming API when sub-second latency on the Betfair Exchange specifically is required.
The Odds API
Polled odds aggregation across global sportsbooks
Choose The Odds API for simple polled snapshots across many books; choose Betfair Streaming for live exchange order book deltas.
BetsAPI Events
Pair sports event metadata with live Betfair Exchange prices
Use BetsAPI to enrich event and team metadata; pair with Betfair Streaming for live exchange price action on those events.
Specific to using Betfair Exchange Streaming API API through Jentic.
What authentication does the Betfair Exchange Streaming API use?
The streaming API authenticates via an in-protocol authentication message that carries a Betfair session token and an application key. The OpenAPI spec does not declare a securityScheme because credentials are sent in the body of the first /request message rather than as HTTP headers. When called via Jentic, both values are stored encrypted in the Jentic vault and injected into the auth message at execution time.
How many endpoints does the Betfair Streaming API have?
The streaming API exposes a single HTTP-style endpoint, POST /request, which carries every protocol operation. Different operations such as authentication, marketSubscription, orderSubscription, and heartbeat are selected via the op discriminator in the request body.
Can I receive live order updates without polling?
Yes. Send /request with op=orderSubscription after authentication and the server will push order change messages for matched, unmatched, and cancelled state transitions over the open socket. This is significantly faster than polling the REST listCurrentOrders operation on the betting API.
How do I start a Betfair market stream through Jentic?
Run pip install jentic and search for 'subscribe to betfair market'. Jentic returns the /request operation, the agent loads the message schema, and executes first with op=authentication and then with op=marketSubscription specifying market ids. Subsequent change messages arrive on the same connection.
What rate limits apply to the streaming API?
The streaming socket itself does not impose a per-message rate limit, but Betfair caps the number of concurrent streaming connections per app key and the breadth of market subscriptions. Consult the Betfair developer programme for the limits applicable to your app key tier before scaling fan-out.
Can I connect to the streaming API over plain HTTP?
No. While the spec lists a stream-api.betfair.com URL on port 443, production traffic must run over the SSL socket connection — the protocol is CRLF-delimited JSON over TLS, not an HTTP REST exchange. Treat the OpenAPI spec as a model of the message envelopes rather than as a conventional REST contract.