Catalog and market refresh
The client publishes catalog requests to feedhub-catalog-<instance> and refresh requests to feedhub-refresh-<instance>, with routing key "". FeedHub replies over Direct Reply-To. Use the stamped AMQP properties shown there, including your authenticated user-id and request expiry. Every request and reply on this page uses schemaVersion: 1.
Reply handling
Section titled “Reply handling”Every reply has required fields schemaVersion (integer) and outcome (open enum string), and an optional code (string). An operation’s page, record or response object is present for Ok. A failed operation has no result object.
| Outcome | Meaning and code |
|---|---|
Ok |
Valid result, including an empty page. No failure code. |
InvalidRequest |
Correct the request before retrying. See the operation for code values. |
NotFound |
Reference by ID returned not-found. |
Unavailable |
internal-error for an answer failure, reply-too-large for a serialized payload exceeding the configured service limit (8 MiB by default), or catalog-unavailable for a refresh catalog lookup timeout. Reduce page size or split a refresh batch when the reply is too large. |
Unrecognized |
The outcome is unsupported. Treat the operation as unsuccessful. |
FeedHub drops requests with no envelope response address and faults versions above 1 after binding a request of a known type. Match replies by the envelope request ID and concrete reply URN and expect version 1. Malformed or unrelated deliveries cannot complete a pending read. A typed fault or reaching the deadline without a usable answer leaves the read unavailable. Retrying a read uses a fresh request ID and the same operation inputs, apart from adjustments such as a smaller page size.
Active-event pages
Section titled “Active-event pages”Use request URN urn:message:FeedHub.Contracts:ActiveEventPageRequest, reply URN urn:message:FeedHub.Contracts:ActiveEventPageReply and fault URN urn:message:MassTransit:Fault[[FeedHub.Contracts:ActiveEventPageRequest]].
Request field in addition to schemaVersion |
Type and behavior |
|---|---|
sportIds |
Optional UUID array. Omit, use null, or supply an empty array for all sports. Otherwise restrict to the listed sport IDs. |
isLive |
Optional boolean. true selects live and false selects prematch. Omit or use null for both phases. |
limit |
Optional integer. Range 1–250. Omit or use null for the default of 250. |
cursor |
Optional opaque string. Omit or use null for the first page. |
On success, page.items is an array of objects with an event field containing an event snapshot. The page contains active, unfinished events eligible for publication in the requested scopes. Clients obtain market snapshot bodies from delivery and resync. The active-event cursor advances by event ID. Pass page.nextCursor back as cursor while keeping the same filters. A null or omitted nextCursor ends the list. Check the cursor even if a page is empty and follow every page before comparing full membership. A malformed cursor, a filter mismatch, or a publication generation change can return invalid-cursor. Restart at the first page if the generation changes. An out-of-range limit returns invalid-limit. The shared query defines invalid-sport-id and invalid-is-live, but incompatible JSON filter types can fail binding before a business reply is possible.
Example publication to feedhub-catalog-sandbox using the Direct Reply-To property frame.
{ "requestId": "01967fb0-0a00-7000-8000-000000000101", "responseAddress": "rabbitmq://broker.feedhub.example:5671/amq.rabbitmq.reply-to", "messageType": ["urn:message:FeedHub.Contracts:ActiveEventPageRequest"], "message": { "schemaVersion": 1, "sportIds": ["01967fb0-0a00-7000-8000-000000000001"], "isLive": false, "limit": 100 }}Example business failure reply to that request. FeedHub replies using the Basic Properties content type and default exchange routing in Direct Reply-To.
{ "requestId": "01967fb0-0a00-7000-8000-000000000101", "messageType": ["urn:message:FeedHub.Contracts:ActiveEventPageReply"], "message": { "schemaVersion": 1, "outcome": "Unavailable", "code": "reply-too-large" }}Reference pages and by-ID lookups
Section titled “Reference pages and by-ID lookups”The concrete type in the envelope selects the record family. All five page requests use schemaVersion and these optional fields.
| Page request field | Type and behavior |
|---|---|
updatedSince |
UTC timestamp. Include records with updatedAt greater than or equal to this instant. Omit or send null for a full listing. |
cursor |
Opaque string from the prior reply’s page.nextCursor. Omit or use null for the first page. |
limit |
Integer 1–1000. Omit or use null for the default of 500. |
The successful reply has page.items (array of the selected record type) and optional page.nextCursor (string). Pages progress by updatedAt and then ID. FeedHub holds back very recent changes from reference lists for a configurable safety lag, 30 seconds by default. For incremental reads, use the last successfully applied reference watermark and allow for repeated records at that timestamp. Keep the updatedSince filter fixed across pages and follow the cursor until absent or null. A malformed cursor or reuse for a different record type or timestamp returns invalid-cursor. An out-of-range limit returns invalid-limit. The shared query defines invalid-updated-since. A timestamp with incompatible JSON can fail binding before a business reply is possible.
All five by-ID requests carry schemaVersion and id (UUID), with no page options. The successful reply has record (object of the selected type). An absent record is NotFound with code not-found. Reference rows use canonical IDs consistently across snapshots and catalog lookups.
Reference page message types
Section titled “Reference page message types”| Record | Request URN | Reply URN |
|---|---|---|
| Sport | urn:message:FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Sport]] |
urn:message:FeedHub.Contracts:ReferencePageReply[[FeedHub.Contracts:Sport]] |
| Country | urn:message:FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Country]] |
urn:message:FeedHub.Contracts:ReferencePageReply[[FeedHub.Contracts:Country]] |
| Tournament | urn:message:FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Tournament]] |
urn:message:FeedHub.Contracts:ReferencePageReply[[FeedHub.Contracts:Tournament]] |
| Team | urn:message:FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Team]] |
urn:message:FeedHub.Contracts:ReferencePageReply[[FeedHub.Contracts:Team]] |
| MarketType | urn:message:FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:MarketType]] |
urn:message:FeedHub.Contracts:ReferencePageReply[[FeedHub.Contracts:MarketType]] |
Fault URNs for these requests are
urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Sport]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Country]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Tournament]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:Team]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferencePageRequest[[FeedHub.Contracts:MarketType]]]]
Reference by ID message types
Section titled “Reference by ID message types”| Record | Request URN | Reply URN |
|---|---|---|
| Sport | urn:message:FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Sport]] |
urn:message:FeedHub.Contracts:ReferenceByIdReply[[FeedHub.Contracts:Sport]] |
| Country | urn:message:FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Country]] |
urn:message:FeedHub.Contracts:ReferenceByIdReply[[FeedHub.Contracts:Country]] |
| Tournament | urn:message:FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Tournament]] |
urn:message:FeedHub.Contracts:ReferenceByIdReply[[FeedHub.Contracts:Tournament]] |
| Team | urn:message:FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Team]] |
urn:message:FeedHub.Contracts:ReferenceByIdReply[[FeedHub.Contracts:Team]] |
| MarketType | urn:message:FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:MarketType]] |
urn:message:FeedHub.Contracts:ReferenceByIdReply[[FeedHub.Contracts:MarketType]] |
Fault URNs for these requests are
urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Sport]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Country]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Tournament]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Team]]]]urn:message:MassTransit:Fault[[FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:MarketType]]]]
Reference record fields
Section titled “Reference record fields”All reference records have id (UUID), name (string) and updatedAt (UTC timestamp).
| Record | Additional fields |
|---|---|
Sport |
key (string) |
Country |
key (string) |
Tournament |
sportId (UUID), optional countryId (UUID) |
Team |
Optional iconUrl (string) |
MarketType |
key (string), sportNames (array of objects with sportId UUID and name string). The array can be empty. |
Example lookup using the Direct Reply-To property frame on feedhub-catalog-sandbox.
{ "requestId": "01967fb0-0a00-7000-8000-000000000102", "responseAddress": "rabbitmq://broker.feedhub.example:5671/amq.rabbitmq.reply-to", "messageType": ["urn:message:FeedHub.Contracts:ReferenceByIdRequest[[FeedHub.Contracts:Sport]]"], "message": { "schemaVersion": 1, "id": "01967fb0-0a00-7000-8000-000000000001" }}{ "requestId": "01967fb0-0a00-7000-8000-000000000102", "messageType": ["urn:message:FeedHub.Contracts:ReferenceByIdReply[[FeedHub.Contracts:Sport]]"], "message": { "schemaVersion": 1, "outcome": "Ok", "record": { "id": "01967fb0-0a00-7000-8000-000000000001", "name": "Football", "key": "football", "updatedAt": "2026-11-30T10:00:00Z" } }}Publication membership
Section titled “Publication membership”Uses the active-event request, reply and fault URNs and the same exchange and AMQP properties as active-event pages. Set JSON envelope header feedhub-publication-check-event-ids to a string of comma-separated canonical UUIDs, or the literal - for a generation-only check. Send up to 100 non-empty UUIDs per call, each in hyphenated form, with no added spacing. Send distinct IDs so that each requested ID can be matched to one returned row. Supply limit: 1 as in the example. In check mode, FeedHub answers from publication membership and ignores the page filters and cursor. Invalid values that reach the check return InvalidRequest with code invalid-publication-check.
{ "requestId": "01967fb0-0a00-7000-8000-000000000103", "responseAddress": "rabbitmq://broker.feedhub.example:5671/amq.rabbitmq.reply-to", "messageType": ["urn:message:FeedHub.Contracts:ActiveEventPageRequest"], "headers": { "feedhub-publication-check-event-ids": "01967fb0-0a00-7000-8000-000000000002" }, "message": { "schemaVersion": 1, "limit": 1 }}An Ok membership reply contains an empty page. Read membership from these envelope headers.
| Reply header | Wire value |
|---|---|
feedhub-publication-generation |
Opaque generation string. Empty or absent indicates unmanaged publication. |
feedhub-publication-checked-events |
A string containing a JSON array, sent for a managed generation. Each element uses EventId (UUID), Scope (routing-key string or null), Visible (boolean), WithdrawnAt (UTC timestamp or null), and Known (boolean, defaults to true if omitted). |
A present managed row with Known: false means the catalog has no copy for that ID. A known hidden row has Visible: false, a null Scope, and can carry WithdrawnAt. Only visible rows in a client subscription can admit a candidate snapshot. Reject a candidate at or before an applicable withdrawal timestamp. A missing or malformed row in a managed response leaves the check incomplete. Confirm exactly the requested IDs, including an empty array for a generation-only check. A missing or unavailable reply cannot establish visibility.
{ "requestId": "01967fb0-0a00-7000-8000-000000000103", "messageType": ["urn:message:FeedHub.Contracts:ActiveEventPageReply"], "headers": { "feedhub-publication-generation": "generation-example", "feedhub-publication-checked-events": "[{\"EventId\":\"01967fb0-0a00-7000-8000-000000000002\",\"Scope\":\"01967fb0-0a00-7000-8000-000000000001.prematch\",\"Visible\":true,\"WithdrawnAt\":null,\"Known\":true}]" }, "message": { "schemaVersion": 1, "outcome": "Ok", "page": { "items": [] } }}Pre-bet markets refresh
Section titled “Pre-bet markets refresh”Publish urn:message:FeedHub.Contracts:PreBetRefreshRequest to feedhub-refresh-<instance>. Expect urn:message:FeedHub.Contracts:PreBetRefreshReply or urn:message:MassTransit:Fault[[FeedHub.Contracts:PreBetRefreshRequest]] over Direct Reply-To. The request has schemaVersion and marketIds (array of 1–100 UUIDs). The limit counts entries as sent. FeedHub deduplicates IDs for processing. Invalid array size or null yields InvalidRequest with invalid-market-ids.
On Ok, the reply’s response object contains events (array of refreshed event records) and unknownMarketIds (UUID array for IDs with no eligible owner). Each event record has eventId (UUID), status (open enum), optional event (event snapshot), and markets (array of market snapshots). FeedHub can include an envelope header feedhub-publication-market-owners, a string holding a JSON object that maps requested market UUIDs to event UUIDs. It can identify the owner even when the event’s served market array is empty. A missing header gives no ownership data.
| Event status | Handling |
|---|---|
Served |
Apply the event, then its market snapshots, under the feed freshness rules. FeedHub returns full market snapshots, which can include sibling markets. Check supported snapshot versions and subscription scope. In managed publication, confirm current eligibility before exposing results. If an event loses eligibility after the reply, use the ownership header to identify its requested markets even when the event reply has no market bodies. Inspect the requested market and selection before using the result. |
Unknown |
No usable refresh for that event. A timeout, unanswered resync or fault during an upstream refresh can also produce this status. Preserve held state under the ordinary freshness and visibility rules and treat the requested prices as unconfirmed. |
Failed |
FeedHub could not complete the refresh for that event. Leave held state as it is and do not interpret it as fresh. |
Unrecognized |
Treat as no usable refresh and preserve held state. |
An unknown market ID alone does not withdraw a market from held state. Use newer snapshots, policy membership or an authoritative index to determine withdrawals. A non-Ok reply or an unsupported schema leaves the refresh unconfirmed. A refresh does not place a bet or reserve a price.
Example request to feedhub-refresh-sandbox, with the Direct Reply-To properties.
{ "requestId": "01967fb0-0a00-7000-8000-000000000104", "responseAddress": "rabbitmq://broker.feedhub.example:5671/amq.rabbitmq.reply-to", "messageType": ["urn:message:FeedHub.Contracts:PreBetRefreshRequest"], "message": { "schemaVersion": 1, "marketIds": ["01967fb0-0a00-7000-8000-000000000003"] }}{ "requestId": "01967fb0-0a00-7000-8000-000000000104", "messageType": ["urn:message:FeedHub.Contracts:PreBetRefreshReply"], "headers": { "feedhub-publication-market-owners": "{\"01967fb0-0a00-7000-8000-000000000003\":\"01967fb0-0a00-7000-8000-000000000002\"}" }, "message": { "schemaVersion": 1, "outcome": "Ok", "response": { "events": [ { "eventId": "01967fb0-0a00-7000-8000-000000000002", "status": "Unknown", "markets": [] } ], "unknownMarketIds": [] } }}