Random Number Generator (RNG)
Other Documentation
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

1
definitions:
2
identifier:
3
type: string
4
description: Identification string for the
5
id:
6
description: Blockchain id of the object (e.g. 1.16.0)
7
pattern: "^[0-9]*\\.[0-9]*\\.[0-9]*quot;
8
internationalized_name:
9
type: object
10
description: Internationalized name
11
properties:
12
en:
13
type: string
14
description: English name of the sport
15
required:
16
- en
17
aliases:
18
type:
19
- "null"
20
- array
21
oneOf:
22
- type: "null"
23
- type: array
24
description: List of known aliases
25
items:
26
type: string
27
asset:
28
type: array
29
description: Asset symbol
30
uniqueItems: true
31
items:
32
- type: string
33
- enum:
34
- PPY
35
- BTC
36
- BTCTEST
37
- BTF
38
- BTFUN
39
- TEST
Copied!

Sport

1
$schema: "http://json-schema.org/draft-06/schema#"
2
title: BookieSports::Sport
3
description: Format for BookieSports::Sport
4
type: object
5
properties:
6
identifier:
7
$ref: "#/definitions/identifier"
8
name:
9
$ref: "#/definitions/internationalized_name"
10
aliases:
11
$ref: "#/definitions/aliases"
12
id:
13
$ref: "#/definitions/id"
14
eventgroups:
15
type: array
16
description: list of event groups that are in this sport
17
items:
18
type: string
19
required:
20
- identifier
21
- name
22
- id
23
- eventgroups
Copied!

Eventgroup

1
$schema: "http://json-schema.org/draft-04/schema#"
2
title: BookieSports::EventGroup
3
description: Format for BookieSports::EventGroup
4
type: object
5
properties:
6
identifier:
7
$ref: "#/definitions/identifier"
8
name:
9
$ref: "#/definitions/internationalized_name"
10
aliases:
11
$ref: "#/definitions/aliases"
12
id:
13
$ref: "#/definitions/id"
14
participants:
15
description: Identifier for the teams
16
type: string
17
bettingmarketgroups:
18
type: array
19
description: list of identifiers for the betting market groups
20
items:
21
type: string
22
eventscheme:
23
type: object
24
description: Internationalized name after which the events are named on creation
25
properties:
26
name:
27
$ref: "#/definitions/internationalized_name"
28
start_date:
29
type: string
30
format: date-time
31
finish_date:
32
type: string
33
format: date-time
34
leadtime_Max:
35
type: number
36
required:
37
- identifier
38
- name
39
- id
40
- participants
41
- bettingmarketgroups
42
- eventscheme
43
#- start_date
44
#- finish_date
45
#- leadtime_Max
46
Copied!

Participant

1
$schema: "http://json-schema.org/draft-06/schema#"
2
title: BookieSports::MarketBettingGroup
3
description: Format for BookieSports::MarketBettingGroup
4
type: object
5
properties:
6
participants:
7
description: List of participants
8
type: array
9
items:
10
type: object
11
properties:
12
identifier:
13
$ref: "#/definitions/identifier"
14
aliases:
15
$ref: "#/definitions/aliases"
16
name:
17
$ref: "#/definitions/internationalized_name"
18
required:
19
- participants
Copied!

Rule

1
$schema: "http://json-schema.org/draft-06/schema#"
2
title: BookieSports::MarketBettingGroup
3
description: Format for BookieSports::MarketBettingGroup
4
type: object
5
properties:
6
identifier:
7
$ref: "#/definitions/identifier"
8
name:
9
$ref: "#/definitions/internationalized_name"
10
description:
11
$ref: "#/definitions/internationalized_name"
12
id:
13
$ref: "#/definitions/id"
14
grading:
15
type: object
16
description: Grading for the rule
17
properties:
18
metric:
19
type: string
20
description: Calculate metric according to this
21
resolutions:
22
type: array
23
descriptions: Resolve betting markets according to the rules here
24
items:
25
type: object
26
properties:
27
win:
28
type: string
29
description: If true this market is win
30
not_win:
31
type: string
32
description: If true this market is not_win
33
void:
34
type: string
35
description: If true this market is void
36
required:
37
- metric
38
- resolutions
39
required:
40
- identifier
41
- id
42
- name
43
- description
44
- grading
Copied!

BettingMarketGroup

1
$schema: "http://json-schema.org/draft-06/schema#"
2
title: BookieSports::MarketBettingGroup
3
description: Format for BookieSports::MarketBettingGroup
4
type: object
5
properties:
6
description:
7
$ref: "#/definitions/internationalized_name"
8
asset:
9
$ref: "#/definitions/asset"
10
dynamic:
11
description: Is this a dynamic BMG (like a NFL handicap or NBA Over-under BMG)?
12
anyOf:
13
- type: string
14
enum:
15
- ou # Over under
16
- hc # handicap
17
- type: boolean
18
number_betting_markets:
19
type: number
20
description: Number of Betting Markets in this BMG
21
items:
22
type: string
23
is_live:
24
type: boolean
25
description: WIll this BMG be turned Live at Event start? This is YES for all BMGs at launch
26
rules:
27
type: string
28
description: Human readable rules that the Grading Algorithm is a machine-readable instantiation of
29
bettingmarkets:
30
type: array
31
description: Betting markets to open
32
items:
33
type: object
34
properties:
35
description:
36
$ref: "#/definitions/internationalized_name"
37
required:
38
- description
39
- asset
40
- dynamic
41
- number_betting_markets
42
- is_live
43
- rules
44
- bettingmarkets
Copied!