API Documentation
A unified data delivery platform for sports odds, markets, settlements, and statistics.
Feedb2b provides two data access channels:
| Channel | Usage | Type |
|---|---|---|
| RabbitMQ stream | Live data streaming (events/markets/bets/statistics/settlements) | Push |
| REST API | Contextual queries, history lookups, event lists | Pull |
Clients typically consume live RabbitMQ queues continuously, while REST API is used for on-demand requests (markets, settlements, historical odds, event metadata, etc.).
Architecture Overview
Feedb2b receives data from multiple sports feed providers, normalizes and processes it, then delivers it to clients via two channels:
+-------------------+| Providers || (LSports, TXOdds) |+---------+---------+ | v+-------------------+| Feedb2b |+---------+---------+ | v+-------------------+| Unified Processor |+---------+---------+ | +-----------------> RabbitMQ Live Feed | (push, subscriptions) v REST API Contextual/History (pull, on-demand queries)RabbitMQ Integration
Each client receives two dedicated queues:
<clientId><clientId>-liveClients have read-only permissions β queues are pre-configured on the Feedb2b side.
JavaScript Connection Example
Below is a JavaScript example showing how a client can connect and consume messages:
const amqplib = require('amqplib');async function main() { const queue = '<client_id>'; const conn = await amqplib.connect( 'amqps://<username>:<password>@api.feedb2b.com:5671/customer' ); const channel = await conn.createChannel(); channel.consume(queue, (msg) => { if (msg) console.log('Received:', msg.content.toString()); });}main();Do not call assertQueue β clients do not have queue management privileges.
Retention
If a disconnection happens:
- RabbitMQ retains the last 100,000 messages in the queue.
- Once the client reconnects, these messages can be consumed to catch up.
Message Types
Clients receive four types of messages:
- Events
- Markets
- Settlements
- Statistics
- Heartbeat
Events Message
{ "id": 10101, "msgType": "event", "startDate": "2025-06-12T18:00:00.000Z", "lastUpdate": "2025-06-12T18:10:20.000Z", "status": 3, "league": { "id": 3012, "name": "Premier Cup" }, "team1": { "id": 5201, "name": "Red Falcons" }, "team2": { "id": 5202, "name": "Blue Titans" }, "location": { "id": 101, "name": "International Arena" }, "sport": { "id": 12, "name": "Football" }, "providers": [{ "id": 1, "name": "SportsFeedX" }]}Event Status
| ID | Meaning |
|---|---|
| 1 | Open |
| 2 | Canceled |
| 3 | Running |
| 4 | Finished |
| 5 | Suspended |
Feedb2b receives events from multiple providers, listed in the providers array.
Markets
Some providers have sub-providers. The subProvider field contains this information, using the same structure as provider.
Market Status
| ID | Meaning |
|---|---|
| 1 | Open |
| 2 | Settled |
| 3 | Suspended |
| 4 | Canceled |
Bet Status
| ID | Meaning |
|---|---|
| 1 | Open |
| 2 | Settled |
| 3 | Suspended |
Settlements
Settlement message format:
{ "id": 40012, "name": "Match Winner", "typeId": 176, "eventId": 10101, "provider": { "id": 1, "name": "SportsFeedX" }, "bets": [ { "id": "234963996", "line": "4.5", "name": "Under", "settlement": 3, "odds": 2.1739130434782608, "betId": "14285084477", "lastUpdate": "2026-02-19T10:19:56.822Z", "subProvider": { "id": 0, "name": "BaseOdd" } }, { "id": "234963996", "line": "4.5", "name": "Under", "settlement": 3, "odds": 2.1739130434782608, "betId": "14285084477", "lastUpdate": "2026-02-19T10:19:56.822Z", "subProvider": { "id": 0, "name": "BaseOdd" } } ]}Settlement messages are similar to bet messages but include an additional settlement field, which indicates the outcome using the following enum:
| Value | Meaning |
|---|---|
| 1 | Open |
| 2 | Canceled |
| 3 | Win |
| 4 | Loss |
| 5 | Draw |
| 6 | PartialWin |
| 7 | PartialLoss |
| 8 | Postponed |
| 9 | Refund |
Statistics
Statistics message format:
{ "id": 61, "msgType": "statistic", "lastUpdate": "2025-03-17T09:43:15.412Z", "eventId": 10101, "provider": { "id": 2, "name": "delasport" }, "incidents": [ { "id": "8", "name": "points", "periods": [ { "id": "106", "t1": "0", "t2": "0", "name": "5g" }, { "id": "105", "t1": "0", "t2": "0", "name": "4g" }, { "id": "102", "t1": "9", "t2": "11", "name": "1g" }, { "id": "103", "t1": "11", "t2": "6", "name": "2g" }, { "id": "952", "t1": "20", "t2": "17", "name": "first2games" }, { "id": "104", "t1": "11", "t2": "7", "name": "3g" }, { "id": "62", "t1": "31", "t2": "24", "name": "ft" } ] }, { "id": "19", "name": "games", "periods": [ { "id": "952", "t1": "1", "t2": "1", "name": "first2games" }, { "id": "62", "t1": "2", "t2": "1", "name": "ft" } ] } ]}Message IDs
- Message IDs are unique per message type.
- Two events cannot share the same
id. - However, an event and a bet (or settlement/statistic) may share the same
idbecause uniqueness is scoped to the type.
Heartbeat
Heartbeat message format:
{"msgType": "heartbeat","serverTimeStamp": 1779856676719,"status": [{ "provider": "Geniussports", "active": true }]}REST API Endpoints
Authentication
Before calling REST endpoints, request access_token:
POST https://auth.feedb2b.com/auth/login
Body
{ "email": "user@example.com", "password": "your_password"}Response
{ "access_token": "JWT_TOKEN_VALUE"}Use Authorization: Bearer <token> for all REST requests.
Get Snapshot
Snapshot can be used after reconnection to get full information about events and continue relying on the received live data.
It returns snapshot information for all entities: events, bets, statistics, and settlements.
One request can include up to 20 events.
To get a snapshot for a specific event or a list of events, use the following endpoint:
GET https://auth.feedb2b.com/contextual/api/events/snapshot
Request:
{ "eventIds": [2392618, 2231305, 2197533]}Response:
{ "id": 2392618, "startDate": "2026-06-10T08:54:00.000Z", "lastUpdate": "2026-06-10T09:45:23.668Z", "status": 4, "sport": { "id": 65, "name": "Beach Volleyball" }, "location": { "id": 250, "name": "Turkey" }, "league": { "id": 39673, "name": "Beach Pro Tour Challenge Alanya" }, "team1": { "id": 402071, "name": "Issa Batrane/Freddie Bialokoz" }, "team2": { "id": 466379, "name": "Drolsum Syver Klungsoyr/Tobias Kawika Kauffman Pedersen" }, "providers": [ { "id": 3, "name": "GeniusSports" } ], "markets": [ { "id": "1438327888", "name": "Match Winner", "specifier": "", "baseType": { "id": 7, "name": "1_x_2" }, "typeId": 570, "period": { "id": 39528, "name": "Full Time" }, "incidentType": { "id": 2, "name": "Yellow Card" }, "status": { "GeniusSports": 3 }, "eventId": 2392618, "sportId": 65, "leagueId": 39673, "lastUpdate": "2026-06-10T09:44:57.159Z", "provider": { "id": 3, "name": "GeniusSports" }, "bets": [ { "id": "42683631823", "name": "Away", "line": "", "odds": 1.62, "isLive": true, "status": 2, "subProvider": { "id": 0, "name": "BaseOdd" }, "lastUpdate": "2026-06-10T09:45:29.115Z" }, { "id": "42683631824", "name": "Home", "line": "", "odds": 2.6, "isLive": true, "status": 2, "subProvider": { "id": 0, "name": "BaseOdd" }, "lastUpdate": "2026-06-10T09:45:29.115Z" }, { "id": "42683631821", "name": "Away", "line": "", "odds": 1, "isLive": true, "status": 2, "subProvider": null, "lastUpdate": "2026-06-10T09:45:29.115Z" }, { "id": "42683631822", "name": "Home", "line": "", "odds": 1, "isLive": true, "status": 2, "subProvider": null, "lastUpdate": "2026-06-10T09:45:29.115Z" } ], "settlements": [ { "id": "422503812", "name": "Away", "line": "", "odds": 1, "settlement": 3, "betId": "42683631821", "lastUpdate": "2026-06-10T09:44:57.159Z", "subProvider": null }, { "id": "422503813", "name": "Home", "line": "", "odds": 1, "settlement": 4, "betId": "42683631822", "lastUpdate": "2026-06-10T09:44:57.159Z", "subProvider": null }, { "id": "422503814", "name": "Away", "line": "", "odds": 1.62, "settlement": 3, "betId": "42683631823", "lastUpdate": "2026-06-10T09:44:57.159Z", "subProvider": { "id": 0, "name": "BaseOdd" } }, { "id": "422503815", "name": "Home", "line": "", "odds": 2.6, "settlement": 4, "betId": "42683631824", "lastUpdate": "2026-06-10T09:44:57.159Z", "subProvider": { "id": 0, "name": "BaseOdd" } } ] } ], "statistics": [ { "id": 156017867, "eventId": 2392618, "leagueId": 39673, "sportId": 65, "matchTime": null, "lastUpdate": "2026-06-10T09:45:43.235Z", "currentPhase": { "id": 39930, "name": "Full Time" }, "provider": { "id": 3, "name": "GeniusSports" }, "incidents": [ { "id": 8202, "name": "Score", "periods": [ { "id": 39930, "t1": "1", "t2": "2", "name": "Full Time" } ] }, { "id": 8203, "name": "Point", "periods": [ { "id": 39930, "t1": "13", "t2": "15", "name": "Full Time" } ] } ] } ]}Get Bets
To get bets for the specific event, the following endpoint should be used:
GET https://auth.feedb2b.com/contextual/api/events/:eventId/bets?limit=:number
{ "markets": [ { "id": "12345", "name": "Correct Score", "specifier": "overs=5", "baseType": { "id": 7, "name": "correct_scpre" }, "type": "example", "typeId": 1001, "eventId": 9999, "sportId": 11, "leagueId": 200, "status": 3, "lastUpdate": "2026-01-01T10:00:00Z", "period": { "id": 2, "name": "Full Time" }, "incidentType": { "id": 2, "name": "Yellow Card" }, "provider": { "id": 1, "name": "ExampleProvider" }, "bets": [ { "id": "14296707980", "line": "24.5", "name": "Over", "status": 3, "odds": 1.408, "isLive": true, "lastUpdate": "2026-02-19T10:19:56.822Z", "subProvider": { "id": 101, "name": "Unibet" } }, { "id": "14296707980", "line": "24.5", "name": "Over", "status": 3, "odds": 1.408, "isLive": true, "lastUpdate": "2026-02-19T10:19:56.822Z", "subProvider": { "id": 101, "name": "Unibet" } } ] } ], "totalMarketsAmount": 1}Get Settlements
Returns settlements for the specified event.
GET https://auth.feedb2b.com/contextual/api/events/:eventId/settlements?limit=:number
Response
Get Events
Returns a list of events.
GET https://auth.feedb2b.com/contextual/api/events
| Name | Description |
|---|---|
sport | sport_id |
location | location_id |
provider | provider_id |
startDate | start date in YYYY-MM-DD |
endtDate | end date in YYYY-MM-DD |
status | event status |
page | page number |
pageSize | number of events per page |
utcOffsetMinutes | offset in minutes to use based on client timezone (timezone*60) |
eventId | ID for the specific event |
By default, it returns the 1000 events for the current date.
Example (single item from response array):
{ "id": 116892, "startDate": "2025-05-11T17:00:00.000Z", "lastUpdate": "2025-05-12T08:25:24.821Z", "status": 4, "league": { "id": 11047, "name": "Continental Champions League" }, "team1": { "id": 50731, "name": "Northside Warriors" }, "team2": { "id": 67900, "name": "Coastal Legends" }, "location": { "id": 1004, "name": "World" }, "sport": { "id": 5, "name": "Basketball" }, "providers": [{ "id": 3, "name": "genius-sports" }]}Get Statistics
Returns a list of events.
GET https://auth.feedb2b.com/contextual/api/events/:eventId/statistic
Get Event
Returns an event by Id.
GET https://auth.feedb2b.com/contextual/api/events/:eventId
Example:
{ "id": 116892, "startDate": "2025-05-11T17:00:00.000Z", "lastUpdate": "2025-05-12T08:25:24.821Z", "status": 4, "league": { "id": 11047, "name": "Continental Champions League" }, "team1": { "id": 50731, "name": "Northside Warriors" }, "team2": { "id": 67900, "name": "Coastal Legends" }, "location": { "id": 1004, "name": "World" }, "sport": { "id": 5, "name": "Basketball" }, "providers": [{ "id": 3, "name": "genius-sports" }]}Get Locations
To get the location, the following endpoint should be used:
GET https://auth.feedb2b.com/contextual/api/locations
Example Item
{ "id": 1, "name": "Afghanistan",}Get Sports
To get the events list by day, the following endpoint should be used:
GET https://auth.feedb2b.com/contextual/api/sports
Example Item
{ "id": 1, "name": "Rugby Union",}Get Market Types
Get the market types of the specified event:
GET https://auth.feedb2b.com/contextual/api/marketTypes/:sportId
Example Response
[ { "id": 1, "name": "Match Result", "type": "1_x_2", "order": 0, "participant": null, "period": { "id": 39528, "name": "Full Time" }, "incident_type": { "id": null, "name": null }, "providers": [ 1, 2, 3, 4, 5 ] }, { "id": 2141, "name": "Asian Handicap", "type": "2_way_handicap", "order": 4, "participant": null, "period": { "id": 39528, "name": "Full Time" }, "incident_type": { "id": null, "name": null }, "providers": [ 1, 2, 3, 4, 5 ] },The type field represents possible outcomes for the markets:
| Type | Possible bet names | Line |
|---|---|---|
1_2_no_&_1_x_2 | Away and Away | - |
1_x_2_&_1_x_2 | Away and Away | |
1_n_2 | Home | Optional: number for Race to markets |
1_x | Home | - |
x_2 | Draw | - |
1_x_2_&_yes_no | Away and No | - |
1_x_2_&_over_under | Home and Over | Over/Under number |
1_x_2_yes_no | Home Yes | - |
2_way_handicap | Home | Handicap number |
3_way_handicap | Home | Handicap number |
yes_no_&_over_under | Yes and Under | Over/Under number |
clean_sheet | Away No | - |
colors | Brown | - |
correct_score |
| - |
double_chance | Draw or Away | - |
double_chance_&_yes_no | Draw or Away and No | - |
exact_number |
| - |
periods | 1st Half | - |
1_x_2/1_x_2 | Away/Away | - |
miss_score | Miss | - |
odd_even | Odd | - |
team_odd_even | Away Odd | - |
over_under | Over | Over/Under number |
double_chance_&_over_under | Draw or Away and Under | Over/Under number |
over_under_exactly | Over | Over/Under number |
player_name_over_under |
| Over/Under number |
player_name | {Player Name} | - |
player_name_exact_number |
|
|
scoring_method | Any Other | Optional: Point/Goal number |
set_by_set | Away-Away | - |
time_to_score | No Goal | |
victory_method | Away Extra Time | - |
yes_no | Yes | Optional: number |
yes_no/yes_no | Yes/No | - |
player_name_yes_no | {Player Name} - Yes/No | - |
two_player_name_yes_no | {Player Name} - Yes/No | |
bts | Only Home | |
1_2 | Home | - |
winning_margin | Home by X | - |
1_2_no | Home | - |
1_x_2 | Home | - |
1_x_2_or_over_under | Home or Over | Over/Under number |
1_x_2_or_yes_no | Home or Yes | - |
player_name_odd_even |
| - |
1_2_yes_no | Home Yes | - |
1_2_over_under | Home Over | Over/Under number |
drive_outcome | Any Other Result | |
Field Goal Attempt | ||
Offensive Touchdown | ||
Punt | - |
Get Periods
Returns periods by sports
GET https://auth.feedb2b.com/contextual/api/period/?sportId=:sportId
Example Response
{ "id": 35927, "name": "First Half", "sport": { "id": 8, "name": "Baseball" } }Get Bet History
Returns historical odds for all bets of a particular event.
GET https://auth.feedb2b.com/mapping/api/bet/history/:eventId
Example Response
[{ "marketTypeId": 1, "leagueId": 1612, "sportId": 62, "bets": [{ "betId": 424456, "marketId": 75752, "name": "Draw", "history": [{ "createdAt": "2025-10-01T09:58:57.136Z", "isLive": true, "lastUpdate": "2025-09-30T20:50:39.213Z", "line": "", "marketStatus": 1, "odd": "7.87", "providerId": 2, "subProviderId": -1, "startDate": "2025-09-30T18:45:00.000Z" }] }, { "betId": 441925, "marketId": 75752, "name": "Home", "history": [{ "createdAt": "2025-10-01T09:59:53.962Z", "isLive": true, "lastUpdate": "2025-09-30T20:50:39.213Z", "line": "", "marketStatus": 1, "odd": "1.00", "providerId": 2, "subProviderId": -1, "startDate": "2025-09-30T18:45:00.000Z" }] }]}, { "marketTypeId": 244, "leagueId": 1612, "sportId": 62, "bets": [{ "betId": 359606, "marketId": 66351, "name": "Away", "history": [{ "createdAt": "2025-10-01T09:56:40.817Z", "isLive": true, "lastUpdate": "2025-09-30T20:10:33.311Z", "line": "", "marketStatus": 1, "odd": "1.73", "providerId": 2, "subProviderId": -1, "startDate": "2025-09-30T18:45:00.000Z" }, { "createdAt": "2025-10-01T09:58:47.872Z", "isLive": true, "lastUpdate": "2025-09-30T20:50:39.794Z", "line": "", "marketStatus": 1, "odd": "7.18", "providerId": 2, "subProviderId": -1, "startDate": "2025-09-30T18:45:00.000Z", } ] }]}]Booking
To receive data for specific sports/leagues/events, the client has to book them.
Get Booked Events
Retrieves an explicit roster of active bookings matching the provided filtration query parameters.
- HTTP Method:
GET - Path:
/booking/api/booked-events - Example Request URL:
{{authUrl}}/booking/api/booked-events?utcOffsetMinutes=240&startDate=2026-06-05&sport=62&provider=3
Example Response
[ { "eventId": 2367110, "sportId": 62, "locationId": 244, "status": 1, "startDate": "2026-06-05T07:00:00.000Z", "providers": [ { "providerId": 3, "errorMessage": null } ] }]Get Booked Sports
Retrieves an explicit list of sports that are currently booked, along with an array of their active provider IDs.
- HTTP Method:
GET - Path:
/booking/api/booked-sports
Example Response
[ { "sportId": 62, "providers": [2, 4, 3] }, { "sportId": 0, "providers": [3] }, { "sportId": 67, "providers": [2, 4, 3] }]Get Booked Leagues
Retrieves an explicit list of leagues that are currently booked, along with an array of their active provider IDs.
- HTTP Method:
GET - Path:
/booking/api/booked-leagues
Example Response
[ { "leagueId": 36791, "providers": [3] }]Bulk Book Entities
Creates active bookings for a collection of sports, leagues, and individual events mapped to their respective providers.
- HTTP Method:
POST - Path:
/booking/api
Request Body Schema (BookingDto)
The request body is an object map where each key is a providerId string/number.
sports(number[], optional): Array of Sport IDs to book.leagues(number[], optional): Array of League IDs to book.events(number[], optional): Array of Event IDs to book.
Example Request
{ "2": { "events": [343901] }, "4": { "sports": [10, 11], "leagues": [22] }}Bulk Unbook Entities
Removes active bookings for sports, leagues, and individual events mapped across different provider IDs in a single operation.
- HTTP Method:
PATCH - Path:
/booking/api/unbook
Request Body Schema (BookingDto)
The request body uses the exact same key-value dictionary structure where each dynamic root key represents a providerId.
sports(number[], optional): Array of Sport IDs to unbook.leagues(number[], optional): Array of League IDs to unbook.events(number[], optional): Array of Event IDs to unbook.
Example Request
{ "2": { "events": [343901] }, "4": { "sports": [10, 11], "leagues": [22] }}Best Practices
- RabbitMQ
- Keep consumers running continuously.
- Use message IDs and timestamps (
lastUpdate) for deduplication logic.
- REST API
- Use it to fetch context, listings, and historical data.
- Combine with live stream: use REST for initial snapshot + RabbitMQ for updates.
- Performance
- Cache static data (sports, locations, market types).
- Avoid requesting the same context too frequently.