LogoLogo
PAO DocsCommunity DocsDeveloper DocsPeerplays.com
  • Infrastructure Documentation
  • The Basics
    • Peerplays Node Types
    • Hardware Requirements
    • Obtaining private keys for cli_wallet
    • Using the CLI Wallet
      • CLI Wallet Fundamentals
      • CLI Commands for All Nodes
      • CLI Commands for Witnesses
      • CLI Commands for SONs
        • Updated CLI commands for SON voting
      • Deriving Keys using CLI Wallet
    • Auto-Starting a Node
    • Backup Servers
    • Obtaining Your First Tokens
    • Updating a Witness Node
    • How to create a Peerplays Account?
  • Advanced Topics
    • Private Testnets
      • Peerplays QA environment
      • Private Testnets - Manual Install
    • Reverse Proxy for Enabling SSL
    • Enabling Elasticsearch on a Node
    • Introduction to Faucet
  • Witnesses
    • What is a Witness node?
    • Installation Guides
      • Build and Install
      • Docker Install
      • GitLab Artifact Install
    • How to become a block producing witness?
    • Other Ways to configure a witness node
      • Peerplays API nodes & Installation Guide
      • Configuring Witness Node as Delayed Node
    • What's Next?
  • Sidechain Operator Nodes (SONs)
    • Installation Guides
      • Manual Install
      • Docker Install
      • SON Configuration - Version 1.5.19
      • SON configuration - Version 1.6.0
      • Bitcoin-SONs Sanity Checks
      • ETH-SONs Configuration & Installation
      • Existing SON node upgrade
  • Bookie Oracle Suite (BOS)
    • Introduction to BOS
    • BOS Installation
      • Installing MongoDB
      • Installing Redis
      • Configuration of bos-auto
      • Spinning Up bos-auto
    • BookieSports
      • Installing Bookiesports
      • Synchronizing BOS with BookieSports
      • BookieSports Module Contents
        • Sub Modules
      • Schema
      • Naming Scheme
    • Manual Intervention Tool (MINT)
      • Installing MINT
      • Introduction
  • DATA PROXIES
    • Introduction to Data Proxies
    • How Data Proxies Work
    • Data Proxy Set Up
  • COUCH POTATO
    • Installation
    • Functional Requirements
      • Flow Diagrams
      • Home Page
      • Create Account
      • Dashboard
        • Header
        • Sports Tabs
        • League Tabs
        • Calendar
        • Notifications
        • Replay
        • Account Menu
      • Game Selector
      • Change Password
    • Help
      • User Guide
        • Introduction
        • Home Page
        • Creating an Account
        • Dashboard
          • Replay
          • Account Menu
            • Change Password
        • Game Selector
    • Database
      • Schema
      • Objects
        • Tables
        • Views
    • API
      • Using the API
      • API Reference
        • Objects
        • Error Codes
      • BOS Schema
    • Proxy Payment Considerations
  • Other Documentation
    • Peerplays Home
    • Community Docs
    • Developer Docs
    • Site Reliability Engineering
Powered by GitBook
On this page
  • Schemata
  • General Definitions
  • Sport
  • Eventgroup
  • Participant
  • Rule
  • BettingMarketGroup

Was this helpful?

Export as PDF
  1. Bookie Oracle Suite (BOS)
  2. BookieSports

Schema

For validation of the data format presented in the sports folder, a validation is performed.

The corresponding validation schemata are stored in the schema/ subdirectory and used internally when instantiating bookiesports.BookieSports.

Schemata

General Definitions

definitions:
 identifier:
  type: string
  description: Identification string for the 
 id:
  description: Blockchain id of the object (e.g. 1.16.0)
  pattern: "^[0-9]*\\.[0-9]*\\.[0-9]*$"
 internationalized_name:
  type: object
  description: Internationalized name
  properties:
   en:
    type: string
    description: English name of the sport
  required:
   - en
 aliases:
  type:
   - "null"
   - array
  oneOf:
   - type: "null"
   - type: array
     description: List of known aliases
     items:
      type: string
 asset:
  type: array
  description: Asset symbol
  uniqueItems: true
  items:
   - type: string
   - enum:
      - PPY
      - BTC
      - BTCTEST
      - BTF
      - BTFUN
      - TEST

Sport

$schema: "http://json-schema.org/draft-06/schema#"
title: BookieSports::Sport
description: Format for BookieSports::Sport
type: object
properties:
 identifier:
  $ref: "#/definitions/identifier"
 name:
  $ref: "#/definitions/internationalized_name"
 aliases:
  $ref: "#/definitions/aliases"
 id:
  $ref: "#/definitions/id"
 eventgroups:
  type: array
  description: list of event groups that are in this sport
  items:
   type: string
required:
 - identifier
 - name
 - id
 - eventgroups

Eventgroup

$schema: "http://json-schema.org/draft-04/schema#"
title: BookieSports::EventGroup
description: Format for BookieSports::EventGroup
type: object
properties:
 identifier:
  $ref: "#/definitions/identifier"
 name:
  $ref: "#/definitions/internationalized_name"
 aliases:
  $ref: "#/definitions/aliases"
 id:
  $ref: "#/definitions/id"
 participants:
  description: Identifier for the teams
  type: string
 bettingmarketgroups:
  type: array
  description: list of identifiers for the betting market groups
  items:
   type: string
 eventscheme:
  type: object
  description: Internationalized name after which the events are named on creation
  properties:
   name:
    $ref: "#/definitions/internationalized_name"
 start_date:
  type: string
  format: date-time
 finish_date:
  type: string
  format: date-time
 leadtime_Max:
  type: number
required:
 - identifier
 - name
 - id
 - participants
 - bettingmarketgroups
 - eventscheme
   #- start_date
   #- finish_date
   #- leadtime_Max

Participant

$schema: "http://json-schema.org/draft-06/schema#"
title: BookieSports::MarketBettingGroup
description: Format for BookieSports::MarketBettingGroup
type: object
properties:
 participants:
  description: List of participants
  type: array
  items:
   type: object
   properties:
    identifier:
     $ref: "#/definitions/identifier"
    aliases:
     $ref: "#/definitions/aliases"
    name:
     $ref: "#/definitions/internationalized_name"
required:
 - participants

Rule

$schema: "http://json-schema.org/draft-06/schema#"
title: BookieSports::MarketBettingGroup
description: Format for BookieSports::MarketBettingGroup
type: object
properties:
 identifier:
  $ref: "#/definitions/identifier"
 name:
  $ref: "#/definitions/internationalized_name"
 description:
  $ref: "#/definitions/internationalized_name"
 id:
  $ref: "#/definitions/id"
 grading:
  type: object
  description: Grading for the rule
  properties:
   metric:
    type: string
    description: Calculate metric according to this
   resolutions:
    type: array
    descriptions: Resolve betting markets according to the rules here
    items:
     type: object
     properties:
      win:
       type: string
       description: If true this market is win
      not_win:
       type: string
       description: If true this market is not_win
      void:
       type: string
       description: If true this market is void
  required:
   - metric
   - resolutions
required:
 - identifier
 - id
 - name
 - description
 - grading

BettingMarketGroup

$schema: "http://json-schema.org/draft-06/schema#"
title: BookieSports::MarketBettingGroup
description: Format for BookieSports::MarketBettingGroup
type: object
properties:
 description:
  $ref: "#/definitions/internationalized_name"
 asset:
  $ref: "#/definitions/asset"
 dynamic:
  description: Is this a dynamic BMG (like a NFL handicap or NBA Over-under BMG)?
  anyOf:
   - type: string
     enum:
      - ou  # Over under
      - hc  # handicap
   - type: boolean
 number_betting_markets:
  type: number
  description: Number of Betting Markets in this BMG
  items:
   type: string
 is_live:
  type: boolean
  description: WIll this BMG be turned Live at Event start? This is YES for all BMGs at launch
 rules:
  type: string
  description: Human readable rules that the Grading Algorithm is a machine-readable instantiation of
 bettingmarkets:
  type: array
  description: Betting markets to open
  items:
   type: object
   properties:
    description:
     $ref: "#/definitions/internationalized_name"
required:
 - description
 - asset
 - dynamic
 - number_betting_markets
 - is_live
 - rules
 - bettingmarkets
PreviousSub ModulesNextNaming Scheme

Last updated 2 years ago

Was this helpful?