Skip to main content

1 Introduction

This section describes the API that you, as a bookmaker, implement so that MollyBet can connect to you, read your odds, and place bets with you.

Note the direction of travel. The rest of this site documents the MollyBet API, which your systems call in order to trade on the MollyBet platform. The API described here is the mirror image: it runs on your infrastructure, and MollyBet is the client. Everything below is a specification of what we expect your server to return, not of anything we host.

It is deliberately small. There are eight HTTP endpoints and one optional WebSocket stream. Your two core responsibilities are to publish odds and to accept or reject bets. Settlement is optional; that's a facility MollyBet can provide on your behalf if you do not want to implement it.

1.1 What you need to build

EndpointPurposeRequired
GET /accountReport account status and currency.Yes
GET /eventsPublish events, markets and prices.Yes
POST /betsAccept or reject a bet placement.Yes
GET /bets/{bet_id}Report the state of a single bet.Yes — settlement fields optional
GET /bets/List bets over a date range, for recovery and settlement checks.Yes — settlement fields optional
GET /keep_aliveConfirm the API is responsive.Yes
GET /balanceReport the account balance.Yes
GET /price_and_stakeServe prices & liquidity for one selection on demand.Only if your odds move faster than we poll /events
GET /ws/offersPush price and liquidity updates in real time.Optional

1.2 Where to start

Read Data Flow first — it explains the order in which we call you and why. Then work through the endpoint reference.

Two concepts underpin everything else and are worth understanding before you write any code:

  • Selection ID — the string that uniquely identifies a selection and ties your offers to the bets we place on them.
  • Bet Types — the encoding that tells us which market an offer belongs to.