General

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.

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.

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.

list_betting_markets

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

Apis.instance().db_api().exec( "list_betting_markets", [bettingMarketGroupId] )

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

get_global_betting_statistics

Get global betting statistics

Apis.instance().db_api().exec( "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.

Apis.instance().bookie_api().exec( "get_binned_order_book", [ betting_market_id, precision ] )
  • betting_market_id: The id of the betting market for the order book.

  • precision: Precision

get_total_matched_bet_amount_for_betting_market_group

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

Apis.instance().bookie_api().exec( "get_total_matched_bet_amount_for_betting_market_group", [ group_id ] )
  • group_id: The betting market group id.

get_events_containing_sub_string

Used to search for events.

Apis.instance().bookie_api().exec( "get_events_containing_sub_string", [ sub_string, language ])
  • sub_string: The (sub) string of text to search for

  • language: Language id.

get_unmatched_bets_for_bettor

Get unmatched bets for a bettor.

Apis.instance().bookie_api().exec( "get_matched_bets_for_bettor", [ bettor_id ] )
  • bettor_id: The id of the bettor.

list_events_in_group

Get a list of events in any event group.

Apis.instance().db_api().exec( "list_events_in_group", [ event_group_id ] )
  • event_group_id: The id of the event group.

get_all_unmatched_bets_for_bettor

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

Apis.instance().db_api().exec( "get_all_unmatched_bets_for_bettor", [ account_id_type ] )
  • account_type_id: The id of the bettor account type/

get_matched_bets_for_bettor

Get the matched bets for a bettor.

Apis.instance().bookie_api().exec( "get_matched_bets_for_bettor", [ bettor_id ] )
  • bettor_id: The id of the bettor.

get_all_matched_bets_for_bettor

Get all matched bets for a bettor within a range.

Apis.instance().bookie_api().exec( "get_all_matched_bets_for_bettor", [ bettor_id, start, limit ] )
  • bettor_id: The id of the bettor

  • start: The start date

  • limit: Number of bets to be returned

Last updated

#888: Peerplays DEX User guide update

Change request updated