Skip to main content

2.0 General

Contents:

Communication with MollyBet API servers happens over two distinct channels:

  1. Synchronous request-response HTTPS calls, for one-off operations such as opening betslips, placing orders, and checking the status of bookie accounts.

    These are performed by making a request to a URL and providing either query parameters, or a request body in JSON format depending on the HTTP method used.

    Please refer to the Synchronous Requests Format section for more details about the response structure, available routes, and error handling.

  1. Asynchronous (or "push") notifications over a persistent WebSocket stream, for immediate state updates, including but not limited to: live betslips, open orders, events, or prices.

    These are received as a sequence of JSON-encoded messages which, when processed in order, update the state of the client to reflect the latest state on the MollyBet servers.

    The Creating an Asynchronous Stream section describes how to connect to the asynchronous stream, the format of the messages, and how to tell MollyBet what data you'd like to receive.