Skip to main content

3.1 Synchronous Requests Format

In order to send commands to MollyBet API you can perform HTTPS requests to:

https://api.mollybet.com/

Different requests are exposed as different paths in the API URL domain. Some API requests may accept different HTTP methods (GET, POST, DELETE...) in order to perform different operations.

Available Requests explains the accepted methods and their semantics. *GET* requests only return data from the server and are guaranteed to never have side effects. Other methods may change the system state (e.g. placing or cancelling an order).

Several API requests accept optional or mandatory arguments:

  • GET requests take their arguments in the URL query (i.e. after a ?), in application/x-www-form-urlencoded format;
  • other requests (POST, PATCH, etc.) take their arguments in the request body, in a format specified by the Content-Type header.

According to the HTTP standard, the default format for the HTTP request body is application/x-www-form-urlencoded; however the JSON format is much more suited to representing complex data types; as such, we recommend using Content-Type: application/json in request headers and JSON for the request body. The documentation will assume a JSON request in the examples provided.

3.1.1 HTTP persistent connections

MollyBet API fully supports HTTP persistent connections as a way to reduce application response times by avoiding the creation of a separate HTTP connection for each new MollyBet API request. Please make sure your client supports HTTP persistent connections to make use of this functionality.