For the complete documentation index, see llms.txt. This page is also available as Markdown.

General Calls

This page documents the BookiePro data abstraction layer with the Peerplays blockchain.

BookiePro communicates with the blockchain using web-socket API calls.

list_sports

Get a list of available sports.

Apis.instance().db_api().exec( "list_sports", [] )

A list of all the available sports.

ChainStore.getSportsList = function getSportsList() {
    return new Promise(function (resolve, reject) {
      _ws.Apis.instance().db_api().exec('list_sports', []).then(function (sportsList) {
        if (sportsList) {
          resolve(sportsList);
        } else {
          resolve(null);
        }
      }, reject);
    });
  };

list_event_groups

Get a list of all event groups for a sport, for example, all soccer leagues in soccer.

Apis.instance().db_api().exec( "list_event_groups", [sportId] )

sportId: The id of the sport that the event groups are to be listed for.

A list of all event groups for the selected sport.

ChainStore.prototype.getEventGroupsList = function getEventGroupsList(sportId) {
    var _this17 = this;

    var eventGroupsList = this.event_groups_list_by_sport_id.get(sportId);

    if (eventGroupsList === undefined) {
      this.event_groups_list_by_sport_id = this.event_groups_list_by_sport_id.set(sportId, _immutable2.default.Set());

      _ws.Apis.instance().db_api().exec('list_event_groups', [sportId]).then(function (eventGroups) {
        var set = new Set();

        for (var i = 0, len = eventGroups.length; i < len; ++i) {
          set.add(eventGroups[i]);
        }

        _this17.event_groups_list_by_sport_id = _this17.event_groups_list_by_sport_id.set(sportId, _immutable2.default.Set(set));
        _this17.notifySubscribers();
      }, function () {
        _this17.event_groups_list_by_sport_id = _this17.event_groups_list_by_sport_id.delete(sportId);
      });
    }

    return this.event_groups_list_by_sport_id.get(sportId);
  };

list_betting_market_groups

Get a list of all betting market groups for an event, for example, Moneyline and OVER/UNDER for soccer)

Apis.instance().db_api().exec( "list_betting_market_groups", [eventId] )

eventId: The id of the event that the betting market groups are to be listed for.

A list of all the betting market groups for the event.

ChainStore.prototype.getBettingMarketGroupsList = function getBettingMarketGroupsList(eventId) {
    var _this18 = this;

    var bettingMarketGroupsList = this.betting_market_groups_list_by_sport_id.get(eventId);

    if (bettingMarketGroupsList === undefined) {
      this.betting_market_groups_list_by_sport_id = this.betting_market_groups_list_by_sport_id.set(eventId, _immutable2.default.Set());

      _ws.Apis.instance().db_api().exec('list_betting_market_groups', [eventId]).then(function (bettingMarketGroups) {
        var set = new Set();

        for (var i = 0, len = bettingMarketGroups.length; i < len; ++i) {
          set.add(bettingMarketGroups[i]);
        }

        _this18.betting_market_groups_list_by_sport_id = _this18.betting_market_groups_list_by_sport_id.set( // eslint-disable-line
        eventId, _immutable2.default.Set(set));
        _this18.notifySubscribers();
      }, function () {
        _this18.betting_market_groups_list_by_sport_id = _this18.betting_market_groups_list_by_sport_id.delete( // eslint-disable-line
        eventId);
      });
    }

    return this.betting_market_groups_list_by_sport_id.get(eventId);
  };

list_betting_markets

Get a list of all betting markets for a betting market group (BMG).

bettingMarketGroupId: The id of the betting market group that the betting markets are to be listed for.

A list of all the betting markets for the betting market group.

get_global_betting_statistics

Get global betting statistics

A list of all the global betting statistics.

get_binned_order_book

Get the binned order book for a betting market.

  • betting_market_id: The id of the betting market for the order book.

  • precision: Precision

A list of binned orders for the betting market.

get_total_matched_bet_amount_for_betting_market_group

Get the total matched bets for a betting market group (BMG).

  • group_id: The betting market group id.

Total of all the matched bet amounts for the selected betting market group.

get_events_containing_sub_string

Used to search for events.

  • sub_string: The (sub) string of text to search for

  • language: Language id.

List of events that contain the sub-string

get_unmatched_bets_for_bettor

Get unmatched bets for a bettor.

  • bettor_id: The id of the bettor.

List of all matched bets for a bettor.

list_events_in_group

Get a list of events in any event group.

  • event_group_id: The id of the event group.

A list of all the events in the event group.

get_all_unmatched_bets_for_bettor

Get all unmatched bets of a bettor according to account type.

  • account_type_id: The id of the bettor account type/

All unmatched bets by bettor account type.

get_matched_bets_for_bettor

Get the matched bets for a bettor.

  • bettor_id: The id of the bettor.

All matched bets for the bettor.

get_all_matched_bets_for_bettor

Get all matched bets for a bettor within a range.

  • bettor_id: The id of the bettor

  • start: The start date

  • limit: Number of bets to be returned

All matched bets for the better within the range start to limit.

Was this helpful?