Skip to main content

2.1 General Workflow

The first step in connecting to Sportmarket API is to ensure that your Sportmarket account is authorised to access the API. If you have not signed a contract for Sportmarket API or have not yet been granted access, you will be unable to login - if that is the case please do not hesitate to get in touch with our support staff.

Once you have been granted access, you may log in by simply:

  1. Making an HTTPS call with your Sportmarket credentials to create a new session (see Available Requests), and
  2. Attaching an asynchronous stream to the session (see Creating an Asynchronous Stream).

As soon as the connections are established, you will start receiving data from the asynchronous stream, such as the current currency conversion rates, your Sportmarket balance, and the list of events Sportmarket currently knows about.

This is roughly equivalent to loading the Sportmarket website Trade page, and only looking at the side-bar (which shows your balance and a list of known competitions). In fact, anyone who has previously used the website will already be familiar with the typical usage scenario of the API:

  1. Register to one or more events.

    To receive live scores and price updates from your available bookies. This is equivalent to clicking on a competition in the side-bar to show the expanded competition view with detailed prices. Of course, Sportmarket API sends raw prices, while the website shows a summarised form.

  2. Inspect the async updates.

    To find events and prices that look interesting.

  3. Open betslips.

    To get the exact prices from the bookie accounts you have available.

  4. Place orders.

    When the prices on the betslip are up to your expectations, you can ask Sportmarket to start placing bets, by providing a minimum price and maximum stake.

  5. Receive further bet updates.

    Sportmarket will continue to report the status of placed bets as long as the bookie continues to update them. This is the same information displayed in the "Betbar" on the website.

  6. See step 2.