File size: 1,722 Bytes
b5ff5d2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://oddsflow.ai/schemas/signal-log.schema.json",
  "title": "OddsFlow Signal Log",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "match_id",
    "timestamp",
    "market",
    "selection",
    "odds",
    "model_version",
    "schema_version"
  ],
  "properties": {
    "match_id": { "type": "string", "minLength": 1 },

    "timestamp": {
      "type": "string",
      "format": "date-time",
      "description": "ISO 8601 with timezone"
    },

    "league": { "type": "string" },
    "home_team": { "type": "string" },
    "away_team": { "type": "string" },

    "market": { "type": "string", "enum": ["1X2", "AH", "OU"] },

    "selection": { "type": "string", "minLength": 1 },

    "line": { "type": ["number", "null"] },

    "odds": { "type": "number", "minimum": 1.01 },

    "odds_source": { "type": ["string", "null"] },

    "model_version": { "type": "string", "minLength": 1 },
    "schema_version": { "type": "string", "minLength": 1 },

    "status": {
      "type": "string",
      "enum": ["open", "settled", "void"],
      "default": "open"
    },

    "result": { "type": ["string", "null"] },
    "notes": { "type": ["string", "null"] }
  },
  "allOf": [
    {
      "if": {
        "properties": { "market": { "const": "1X2" } },
        "required": ["market"]
      },
      "then": {
        "properties": { "line": { "const": null } }
      }
    },
    {
      "if": {
        "properties": { "market": { "enum": ["AH", "OU"] } },
        "required": ["market"]
      },
      "then": {
        "required": ["line"],
        "properties": { "line": { "type": "number" } }
      }
    }
  ]
}