Skip to content

gRPC API reference

Edge 1.1.0 serves feedhub.edge.v1.FeedEdge. The C# namespace is FeedHub.Edge.V1. Use the released proto for field numbers, types and optionality. Versioned feed_edge.proto · SHA-256 manifest

Proto SHA-256 · 56a997f2627c4e8e85aca09118f8bda594cf36da01ca7fea1e7955d581ba9b3e

RPC Request Response Response mode
Subscribe SubscribeRequest FeedEvent Server stream
GetStatus GetStatusRequest EdgeStatus Unary
PlaceBet PlaceBetRequest PlaceBetReply Unary
ReadBetResults ReadBetResultsRequest BetResultDelivery Server stream
ConfirmBetResult ConfirmBetResultRequest ConfirmBetResultReply Unary
GetBets GetBetsRequest GetBetsReply Unary

UUIDs travel as strings. Timestamps are google.protobuf.Timestamp in UTC. Prices, stakes and other decimal values travel as decimal strings. Preserve scalar presence for fields marked optional in the proto.

rpc Subscribe(SubscribeRequest) returns (stream FeedEvent);

SubscribeRequest has repeated sport_ids and tournament_ids, a phase, and an opaque resume_token. An empty sport and tournament filter includes all events Edge receives. If both ID lists are populated, an event matching either list qualifies. PHASE_ANY includes live and prematch, and PHASE_LIVE or PHASE_PREMATCH selects one phase. Canonical IDs

Each FeedEvent has one body member and can carry a resume token. The stream starts with status. A fresh subscription then sends a snapshot between SnapshotBegin and SnapshotEnd, followed by changes. If Edge can resume from the submitted token, it sends changes since that token. Apply messages in stream order. Snapshot and reconnect example

Body Message Meaning
status StatusChanged Current EdgeStatus.
snapshot_begin SnapshotBegin Start staging a fresh snapshot for this filter.
snapshot_end SnapshotEnd Reconcile the completed snapshot and save its resume token with the applied state.
event EventChanged Event ID, source timestamp, live and finished flags, optional EventContent and an informational market manifest. Events
market MarketChanged Markets for one event and snapshot key, with tournament, optional group, content hash and source timestamp. Markets carry SelectionRow and Selection messages. Markets and selections
market_removed MarketRemoved Remove a market by its ID.
event_withdrawn EventWithdrawn Suspend the event and its markets.
event_unsubscribed EventUnsubscribed Drop an event that left this filter and remove its markets from the subscription view.

Invalid filter syntax returns INVALID_ARGUMENT. A sport outside the client entry’s configured scope returns FAILED_PRECONDITION. Reconnect after a delay on UNAVAILABLE, INTERNAL, unexpected CANCELLED or normal closure. Keep the same filter when reusing a token.

rpc GetStatus(GetStatusRequest) returns (EdgeStatus);

Send an empty GetStatusRequest. EdgeStatus reports state, reason, since, edge_version, wire_versions, last_fetched_at and optional lag_seconds. It is also the payload in StatusChanged. GetStatus answers during initial load. Suspend every market while the status is degraded, and treat unknown states as degraded. Edge status and readiness

rpc PlaceBet(PlaceBetRequest) returns (PlaceBetReply);

PlaceBetRequest carries client_bet_key, market_id, selection_id, price, stake, accept_price_changes and is_live. Refresh the selection first and persist the client key for the attempt. PlaceBetReply carries the same client key, optional bet_id, outcome, optional current_price and optional problem. Placement and outcomes

INVALID_ARGUMENT means Edge rejected the request before sending it. A timeout, cancelled call or lost reply can leave the outcome uncertain. Query GetBets by the same client key.

rpc ReadBetResults(ReadBetResultsRequest) returns (stream BetResultDelivery);

Send an empty ReadBetResultsRequest. Each BetResultDelivery contains an opaque delivery_id and a SettledBet with bet_id, client_bet_key, result and settled_at. Delivery is at least once. Run one reader per client entry, apply the settlement durably by bet_id, then confirm the delivery. Settlements

rpc ConfirmBetResult(ConfirmBetResultRequest) returns (ConfirmBetResultReply);

ConfirmBetResultRequest carries the current delivery_id. Success returns an empty ConfirmBetResultReply. Confirm from the same channel while the result stream is open so the confirmation reaches the originating replica. NOT_FOUND means that replica has no unconfirmed delivery under that ID. An unconfirmed result can return on a subsequent stream with a new delivery ID. Apply and confirm a result

rpc GetBets(GetBetsRequest) returns (GetBetsReply);

GetBetsRequest accepts bet_ids, client_bet_keys or both, with 1 to 100 entries in total. GetBetsReply.bets contains one BetStatus per input, FeedHub IDs first and client keys second. BetStatus reports state and carries bet_id, client_bet_key, placement outcome and current_price, or settlement result and settled_at where applicable. Bet lookup · Settlement states