Settlements
FeedHub settles the accepted Over 2.5 bet as Win. The
placement, status lookup and result delivery all refer to FeedHub bet ID
019a2b3c-5000-7000-8000-000000000001 and client key example-over-2-5-001.
An event finishing or being withdrawn changes the feed view. Settlement
comes from the bet’s own result.
Read placement, status and result
Section titled “Read placement, status and result”| Concept | gRPC | Canonical RabbitMQ |
|---|---|---|
| Placement outcome | PlaceBetReply.outcome is PLACE_BET_OUTCOME_ACCEPTED |
BetPlacementReply.outcome is Accepted |
| Bet state | GetBetsReply.bets[].state moves from BET_STATUS_STATE_OPEN to BET_STATUS_STATE_SETTLED |
BetStatusReply.bets[].state moves from Open to Settled |
| Settlement result | SETTLEMENT_RESULT_WIN in BetStatus.result or SettledBet.result |
Win in BetStatusEntry.result or BetResult.result |
A status entry carries a placement outcome when its state is NotPlaced.
An accepted bet can be Open while FeedHub is still checking for a result,
or Expired when it has stopped checking without a result. A Settled entry
contains result and settledAt (settled_at in gRPC) for the recorded
settlement.
gRPC GetBetsReply when FeedHub has recorded the win at
2026-10-22T19:55:00.35Z.
bets { bet_id: "019a2b3c-5000-7000-8000-000000000001" client_bet_key: "example-over-2-5-001" state: BET_STATUS_STATE_SETTLED result: SETTLEMENT_RESULT_WIN settled_at { seconds: 1792698900 nanos: 350000000 }}Apply and confirm the result stream
Section titled “Apply and confirm the result stream”Call ReadBetResults on Edge gRPC. Each BetResultDelivery wraps the
SettledBet plus an opaque delivery_id for this delivery. Edge receives
the corresponding canonical BetResult from the client entry’s RabbitMQ
results queue.
Decoded RabbitMQ BetResult body as received by Edge.
{ "schemaVersion": 1, "betId": "019a2b3c-5000-7000-8000-000000000001", "clientBetKey": "example-over-2-5-001", "result": "Win", "settledAt": "2026-10-22T19:55:00.35Z"}gRPC BetResultDelivery for the same result.
delivery_id: "YmQ3OWI5ODFjMmMzNDUyNjhiYTI3Y2Y2N2U1NDBhODB8MQ"result { bet_id: "019a2b3c-5000-7000-8000-000000000001" client_bet_key: "example-over-2-5-001" result: SETTLEMENT_RESULT_WIN settled_at { seconds: 1792698900 nanos: 350000000 }}Results have at-least-once delivery. An unconfirmed result can return after a
stream ends or Edge restarts. Redelivery uses the same bet_id with a new
delivery_id.
- Use
bet_idas the deduplication key. Record the result and commit its application with the record that marks it applied. - Confirm the current delivery after your durable write succeeds. If the bet result was applied on an earlier delivery, skip the duplicate write and confirm the current delivery.
- Pass the opaque
delivery_idtoConfirmBetResulton the same gRPC channel asReadBetResultswhile its stream is open. The confirmation must reach the Edge replica holding the delivery. That replica acknowledges the corresponding RabbitMQ delivery on its broker channel.
gRPC ConfirmBetResultRequest for the delivery shown above.
delivery_id: "YmQ3OWI5ODFjMmMzNDUyNjhiYTI3Y2Y2N2U1NDBhODB8MQ"If you missed a result or confirmed it before retaining it, use GetBets
with the bet ID or client key to recover the recorded settlement.