Bifrost (BFST) — Cricket API Integration
What is Bifrost?
Bifrost is a B2B aggregator API for cricket betting. It routes to both upstream exchanges and bookmakers through a unified API. The API supports:
- Exchange markets — back+lay, partial matching, order book (fields like
sizeMatched,sizeRemaining,averageOddslabeled "Applicable for Exchange markets" in docs) - Bookmaker markets — back only, fixed odds with liability limits (
maxStake,maxMarket)
Forsyt's scope: Bookmaker markets only. We are integrating Bifrost's bookmaker markets for cricket. Exchange market integration may follow later.
API Architecture
- Data delivery: RabbitMQ queues (Protocol Buffers) — push-based, version-deduplicated
- Bet placement: REST
POST /api/v1/bets/place— returns PENDING, result via queue - Bet status: RabbitMQ
bets.snapshot.queue— push-based - Settlement: RabbitMQ
bets.outcomes.queue— push-based
Directory Structure
bifrost/
├── README.md ← You are here
├── BIFROST_PAL_INTEGRATION_PLAN.md ← PAL + points system integration plan
└── api/ ← Bifrost API reference (from official PDF)
├── sports-identifiers.md ← Sport ID mapping (Cricket = 2)
├── outbound-category.md ← Category queue + model + proto
├── outbound-event.md ← Event queue, EventMapping, Competitor/Team
├── outbound-market-catalogue.md ← MarketCatalogue, RunnerCatalogue, MarketMetadata
├── outbound-market-book.md ← MarketBook, Runner, RunnerPriceLadder, RunnerPriceSize
├── betting-api-rest.md ← REST POST /api/v1/bets/place
├── betting-queues.md ← RabbitMQ Bets + BetOutcomes queues
└── betting-data-structures.md ← BetSnapshot, BetOutcomeSnapshot + protos