Bets
This bet uses Over 2.5 from the updated market while the match is still prematch. Use Edge REST to refresh prices. Use Edge gRPC to place the bet and check its status.
Refresh before placement
Section titled “Refresh before placement”Send POST /local/v1/refresh with Content-Type: application/json and the
market ID.
{ "marketIds": ["019a2b3c-3000-7000-8000-000000000001"]}Edge can serve fresh matching state it already holds. Otherwise it asks
FeedHub. The reply groups whole market snapshots by event. Each entry
includes eventId, status, event and markets. Before placing, check
that the status is Served, the event is present and isFinished is false,
its manifest includes the market and the refreshed snapshot still offers the
selection with isSuspended: false. A Served entry can describe a finished
event. Use the refreshed decimal value as the placement price and the
refreshed isLive as the placement phase.
Edge REST refresh response excerpt with the Over 2.5 selection at "1.95".
{ "events": [ { "eventId": "019a2b3c-2000-7000-8000-000000000001", "status": "Served", "event": { "eventId": "019a2b3c-2000-7000-8000-000000000001", "fetchedAt": "2026-10-22T17:58:00Z", "isLive": false, "isFinished": false, "manifest": [ { "marketId": "019a2b3c-3000-7000-8000-000000000001", "contentHash": "a9157e3d5f66c8b4" } ] }, "markets": [ { "snapshotKey": "61ae4ca0-0984-56f2-8942-ff6e152c0001", "fetchedAt": "2026-10-22T17:58:00Z", "contentHash": "a9157e3d5f66c8b4", "markets": [ { "marketId": "019a2b3c-3000-7000-8000-000000000001", "selections": [ [ { "selectionId": "019a2b3c-4000-7000-8000-000000000001", "value": "1.95", "isSuspended": false } ] ] } ] } ] } ], "unknownMarketIds": []}unknownMarketIds lists requested IDs for which Edge cannot serve an event
entry. A held event with an unanswered upstream request can return Unknown
with event: null and markets: []. Its heldFetchedAt, when present and
non-null, dates the held version. Keep the bet blocked if the refresh does
not confirm the selection can be offered.
Place one attempt
Section titled “Place one attempt”Generate and save a client_bet_key for the attempt before calling
PlaceBet. FeedHub scopes it to your client entry. Send the chosen market
and selection IDs, the refreshed price, your stake, the price-change
preference and the event phase.
gRPC PlaceBetRequest for the Over 2.5 selection.
client_bet_key: "example-over-2-5-001"market_id: "019a2b3c-3000-7000-8000-000000000001"selection_id: "019a2b3c-4000-7000-8000-000000000001"price: "1.95"stake: "10.00"accept_price_changes: falseis_live: falsegRPC PlaceBetReply when the bet is accepted. Save the returned bet_id with
the client key. A PLACE_BET_OUTCOME_PRICE_CHANGED reply can carry the
current price in current_price. An accepted reply leaves that field unset.
client_bet_key: "example-over-2-5-001"bet_id: "019a2b3c-5000-7000-8000-000000000001"outcome: PLACE_BET_OUTCOME_ACCEPTEDEdge forwards placement to FeedHub over RabbitMQ. These are the decoded
BetPlacementRequest and BetPlacementReply bodies for the same call and
reply. Edge adds requestedAt to the request. JSON uses null for the
unused optional reply fields.
{ "schemaVersion": 1, "clientBetKey": "example-over-2-5-001", "marketId": "019a2b3c-3000-7000-8000-000000000001", "selectionId": "019a2b3c-4000-7000-8000-000000000001", "price": "1.95", "stake": "10.00", "acceptPriceChanges": false, "isLive": false, "requestedAt": "2026-10-22T17:58:20Z"}{ "schemaVersion": 1, "clientBetKey": "example-over-2-5-001", "betId": "019a2b3c-5000-7000-8000-000000000001", "outcome": "Accepted", "currentPrice": null, "problem": null}Recover after a lost placement reply
Section titled “Recover after a lost placement reply”A transport timeout can happen after FeedHub has accepted the bet. Call
GetBets using the original client key even if you never received the bet
ID. Open, Settled and Expired identify an accepted bet and give you
its ID. NotPlaced carries the recorded placement outcome. If the attempt
is still Placing, check its status again. A NotFound entry means there
was no record for that lookup when FeedHub answered. If you retry placement
with the outcome still uncertain, send the same request with the same key.
gRPC GetBetsRequest by client key.
client_bet_keys: "example-over-2-5-001"gRPC GetBetsReply once the bet has been accepted and before it has settled.
bets { bet_id: "019a2b3c-5000-7000-8000-000000000001" client_bet_key: "example-over-2-5-001" state: BET_STATUS_STATE_OPEN}GetBets also accepts FeedHub IDs in bet_ids. It sends a broker
BetStatusRequest and maps the BetStatusReply back to gRPC.
Decoded RabbitMQ BetStatusRequest body for the lookup above.
{ "schemaVersion": 1, "betIds": [], "clientBetKeys": ["example-over-2-5-001"]}Decoded RabbitMQ BetStatusReply body while the bet is open.
{ "schemaVersion": 1, "bets": [ { "betId": "019a2b3c-5000-7000-8000-000000000001", "clientBetKey": "example-over-2-5-001", "state": "Open", "outcome": null, "currentPrice": null, "result": null, "settledAt": null } ]}An identical placement replay with a recorded key returns the recorded
outcome, or Failed while placement is still in progress. Changing the
market, selection, requested price or stake under a recorded key returns
Conflict. A deliberate new attempt, such as accepting a newly offered price
after a PriceChanged outcome, needs a new key. See
settlements for what GetBets returns after FeedHub
records the result.