Bifrost Public API — Betting Service (Swagger)
Source:
https://preprod-bifrost-betting-api.bifrost.bet/swagger-ui/index.htmlFetched: 2026-02-16 OpenAPI: 3.0.1
Base URL: https://preprod-bifrost-betting-api.bifrost.bet
Auth: API Key via Authorization header (ApiToken scheme)
Raw OpenAPI specs saved alongside this file:
betting-api-v1.json— Betting endpointsrecovery-api-v1.json— Data recovery endpoints
1. Betting API v1 (bet-controller)
POST /api/v1/bets/place — Place a bet
Request: PlaceBetRequest
| Field | Type | Required | Notes |
|---|---|---|---|
sportId | string | no | |
marketId | string | yes | Pattern: \d+\.\d+(_\d+)? (Betfair-style) |
runnerId | int64 | yes | Selection/runner ID |
priceIndex | int32 | no | |
size | number | yes | Min 0.01 — the exchange stake |
memberSize | number | yes | Min 0.01 — the member's stake |
odds | number | yes | Min 0.01 |
line | int32 | no | For handicap/line markets |
side | enum | yes | BACK or LAY |
memberCode | string | yes | Identifies the member/operator |
currency | string | no | |
ipAddress | string | yes | Client IP |
requestId | string | no | Idempotency key |
Response: PlaceBetResponse
| Field | Type | Notes |
|---|---|---|
id | int64 | Bet ID |
requestId | string | Echo of request ID |
memberCode | string | |
status | enum | See statuses below |
side | enum | BACK / LAY |
size | number | Matched size |
odds | number | Matched odds |
line | int32 | |
version | int64 | Bet version for optimistic locking |
POST /api/v1/bets/cancel — Cancel a bet
Request: CancelBetRequest
| Field | Type | Required | Notes |
|---|---|---|---|
marketId | string | yes | Pattern: \d+\.\d+(_\d+)? |
betId | int64 | yes |
Response: CancelBetResponse
| Field | Type |
|---|---|
id | int64 |
status | enum |
version | int64 |
POST /api/v1/bets/outcomes — Get bet outcomes
Request: BetOutcomeRequest
| Field | Type | Notes |
|---|---|---|
marketIds | string[] | Filter by market IDs |
pageSize | int32 | Pagination |
pageNumber | int32 | Pagination |
Response: BetOutcomeResponse
| Field | Type |
|---|---|
content | object[] |
totalPages | int32 |
POST /api/v1/bets/multibet/requestprice — Request multibet prices
Request: MultiBetPriceRequest
| Field | Type | Required | Notes |
|---|---|---|---|
requestId | string | no | |
multibetLegs | Leg[] | yes | Min 2, max 20 legs |
Response: MultiBetPriceResponse
| Field | Type |
|---|---|
requestId | string |
legs | Leg[] |
success | boolean |
POST /api/v1/bets/multibet/place — Place multibets
Request: MultiBetPlaceRequest
| Field | Type | Required | Notes |
|---|---|---|---|
stake | number | yes | |
currency | string | no | |
memberCode | string | yes | |
account | string | yes | |
ip | string | yes | Client IP |
stakeFactor | number | yes | |
multiBetLegs | Leg[] | yes | Min 2, max 20 |
positionTake | number | no | |
fixedPendingUntil | datetime | no | |
turnoverRebatePercentage | number | no | |
requestId | string | yes | |
placedDate | int64 | no | Epoch timestamp |
Response: MultiBetPlaceResponse
Mirrors request fields plus:
multiBetPrice(number)requestedTime(datetime)placedTime(datetime)
2. Shared Schemas
Bet Statuses (enum)
FAILED | PLACED | PENDING | VOIDED | CANCEL_PENDING | CANCELLED |
PARTIALLY_MATCHED | UNMATCHED | LAPSED | MULTIBET_PRICE_REQUESTED | MULTIBET_PRICE_FILLED
Bet Side (enum)
BACK | LAY
Leg (multibet leg)
| Field | Type | Required | Notes |
|---|---|---|---|
marketId | string | yes | Pattern: \d+\.\d+(_\d+)? |
eventId | string | yes | |
selectionId | string | yes | |
side | enum | yes | BACK / LAY |
3. Recovery API v1 (data-recovery-controller)
All recovery endpoints are async — they return a requestId and results are delivered via callback/websocket.
Common Response: RecoveryDataApiResponse
| Field | Type |
|---|---|
requestId | string |
error | string |
POST /api/v1/recovery/bets
Recover bets by marketIds (string[]), betIds (int64[]), or betRequestIds (string[]).
POST /api/v1/recovery/bet_outcomes
Recover bet outcomes. Same filters as /recovery/bets.
POST /api/v1/recovery/markets
| Field | Type | Notes |
|---|---|---|
eventIds | string[] (unique) | |
marketIds | string[] (unique) | |
includeMarketBook | boolean | Include price/depth data |
includeMarketCatalogue | boolean | Include market metadata |
includeMarketResult | boolean | Include settlement results |
POST /api/v1/recovery/events
| Field | Type | Notes |
|---|---|---|
sportId | string | |
categoryIds | string[] (unique) | |
eventIds | string[] (unique) | |
fromStartTime | int64 | Epoch ms |
POST /api/v1/recovery/categories
| Field | Type |
|---|---|
sportId | string |
categoryIds | string[] (unique) |
POST /api/v1/recovery/multibets
| Field | Type |
|---|---|
marketIds | string[] (unique) |
betIds | int64[] (unique) |
betRequestIds | string[] (unique) |
eventId | string |
POST /api/v1/recovery/multibet_outcomes
Same filters as /recovery/multibets.
4. Key Observations for Hannibal Integration
- Market IDs use Betfair format (
\d+\.\d+(_\d+)?) — e.g.,1.253279756. This is the same format Hannibal already uses internally. - Supports both BACK and LAY — unlike Pinnacle (back-only), Bifrost is a full exchange.
memberCodeidentifies us (the operator) — this is our account identifier with Bifrost.sizevsmemberSize—size= exchange stake,memberSize= what the member commits. This distinction may relate to position-taking or margin.- Bet cancellation is supported — by
marketId+betId. - Multibet/accumulator support — 2-20 legs, with a two-step flow: request price then place.
- Recovery API is async — returns
requestId, actual data delivered separately (likely via WebSocket or callback). versionfield on responses enables optimistic concurrency control.priceIndexon PlaceBet — may relate to depth ladder position (which price level to take).linefield — int32, used for handicap/totals markets.