{
  "asyncapi": "3.1.0",
  "info": {
    "title": "Pickleball Live Downstream WebSocket",
    "version": "2.0.0",
    "description": "Live fixture/match/standings/markets stream. Endpoint wss://pickleball-api.com/v1/live"
  },
  "servers": {
    "production": {
      "host": "pickleball-api.com",
      "pathname": "/v1/live",
      "protocol": "wss"
    }
  },
  "channels": {
    "live": {
      "address": "/v1/live",
      "messages": {
        "clientMessage": {
          "payload": {
            "$ref": "#/definitions/DownstreamClientMessage",
            "definitions": {
              "DownstreamClientMessage": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscribe"
                      },
                      "topics": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "minItems": 1
                      }
                    },
                    "required": [
                      "type",
                      "topics"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "unsubscribe"
                      },
                      "topics": {
                        "type": "array",
                        "items": {
                          "type": "string"
                        },
                        "minItems": 1
                      }
                    },
                    "required": [
                      "type",
                      "topics"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "resume"
                      },
                      "cursor": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "cursor"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "pong"
                      },
                      "at": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"
                      }
                    },
                    "required": [
                      "type",
                      "at"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        },
        "serverMessage": {
          "payload": {
            "$ref": "#/definitions/DownstreamServerMessage",
            "definitions": {
              "DownstreamServerMessage": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "connection.ready"
                      },
                      "protocol_version": {
                        "type": "string",
                        "const": "2.0.0"
                      },
                      "event_id": {
                        "type": "string"
                      },
                      "sequence": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "topic": {
                        "type": "string"
                      },
                      "fixture_id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "format": "uuid"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "match_id": {
                        "anyOf": [
                          {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "occurred_at": {
                        "type": "string",
                        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "connection_id": {
                            "type": "string"
                          },
                          "replay_minutes": {
                            "type": "integer",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "connection_id",
                          "replay_minutes"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "subscription.ack"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "topics": {
                            "type": "array",
                            "items": {
                              "type": "string"
                            }
                          }
                        },
                        "required": [
                          "topics"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "snapshot"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {}
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "match.observation"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "sequence": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "observed_at": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                          },
                          "lifecycle": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "current_game": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "serving_side": {
                            "anyOf": [
                              {
                                "type": "number",
                                "enum": [
                                  0,
                                  1
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "server_number": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "side_0_points": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "side_1_points": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "side_0_games_won": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "side_1_games_won": {
                            "anyOf": [
                              {
                                "type": "integer"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "winner_side": {
                            "anyOf": [
                              {
                                "$ref": "#/definitions/DownstreamServerMessage/anyOf/3/properties/data/properties/serving_side/anyOf/0"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "sequence",
                          "observed_at",
                          "lifecycle",
                          "current_game",
                          "serving_side",
                          "server_number",
                          "side_0_points",
                          "side_1_points",
                          "side_0_games_won",
                          "side_1_games_won",
                          "winner_side"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "fixture.updated"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                          },
                          "event_id": {
                            "anyOf": [
                              {
                                "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "status": {
                            "type": "string",
                            "enum": [
                              "scheduled",
                              "in_progress",
                              "completed",
                              "cancelled"
                            ]
                          },
                          "scheduled_at": {
                            "anyOf": [
                              {
                                "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "court": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "stage": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "is_provisional": {
                            "type": "boolean"
                          },
                          "sides": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "side": {
                                  "$ref": "#/definitions/DownstreamServerMessage/anyOf/3/properties/data/properties/serving_side/anyOf/0"
                                },
                                "team": {
                                  "anyOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "abbreviation": {
                                          "type": [
                                            "string",
                                            "null"
                                          ]
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name",
                                        "abbreviation"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "label": {
                                  "type": [
                                    "string",
                                    "null"
                                  ]
                                },
                                "matches_won": {
                                  "type": "integer",
                                  "minimum": 0
                                }
                              },
                              "required": [
                                "side",
                                "team",
                                "label",
                                "matches_won"
                              ],
                              "additionalProperties": false
                            }
                          }
                        },
                        "required": [
                          "id",
                          "event_id",
                          "status",
                          "scheduled_at",
                          "court",
                          "stage",
                          "is_provisional",
                          "sides"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "event.updated"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                          },
                          "season_id": {
                            "anyOf": [
                              {
                                "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "venue_id": {
                            "anyOf": [
                              {
                                "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "name": {
                            "type": "string"
                          },
                          "starts_on": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "ends_on": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "timezone": {
                            "type": [
                              "string",
                              "null"
                            ]
                          },
                          "active": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "id",
                          "season_id",
                          "venue_id",
                          "name",
                          "starts_on",
                          "ends_on",
                          "timezone",
                          "active"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "market.price_changed"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "market_id": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                          },
                          "outcome_id": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                          },
                          "price": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "market_id",
                          "outcome_id",
                          "price"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "market.book_changed"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "market_id": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                          },
                          "outcome_id": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                          },
                          "best_bid": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "best_ask": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "spread": {
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "market_id",
                          "outcome_id",
                          "best_bid",
                          "best_ask",
                          "spread"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "market.context"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "fixture": {
                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/4/properties/data"
                          },
                          "markets": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                                },
                                "question": {
                                  "type": "string"
                                },
                                "status": {
                                  "type": "string",
                                  "enum": [
                                    "active",
                                    "resolved",
                                    "closed"
                                  ]
                                },
                                "resolved_outcome_id": {
                                  "anyOf": [
                                    {
                                      "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                                    },
                                    {
                                      "type": "null"
                                    }
                                  ]
                                },
                                "outcomes": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id/anyOf/0"
                                      },
                                      "name": {
                                        "type": "string"
                                      },
                                      "latest_price": {
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "price_observed_at": {
                                        "anyOf": [
                                          {
                                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      },
                                      "best_bid": {
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "best_ask": {
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "spread": {
                                        "type": [
                                          "number",
                                          "null"
                                        ]
                                      },
                                      "book_observed_at": {
                                        "anyOf": [
                                          {
                                            "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                                          },
                                          {
                                            "type": "null"
                                          }
                                        ]
                                      }
                                    },
                                    "required": [
                                      "id",
                                      "name",
                                      "latest_price",
                                      "price_observed_at",
                                      "best_bid",
                                      "best_ask",
                                      "spread",
                                      "book_observed_at"
                                    ],
                                    "additionalProperties": false
                                  }
                                }
                              },
                              "required": [
                                "id",
                                "question",
                                "status",
                                "resolved_outcome_id",
                                "outcomes"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "sports_freshness_seconds": {
                            "type": [
                              "number",
                              "null"
                            ]
                          },
                          "market_freshness_seconds": {
                            "type": [
                              "number",
                              "null"
                            ]
                          }
                        },
                        "required": [
                          "fixture",
                          "markets",
                          "sports_freshness_seconds",
                          "market_freshness_seconds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "resync_required"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "reason": {
                            "type": "string"
                          },
                          "snapshot_url": {
                            "type": "string",
                            "format": "uri"
                          }
                        },
                        "required": [
                          "reason",
                          "snapshot_url"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "rate_limit"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "retry_after_seconds": {
                            "type": "integer",
                            "exclusiveMinimum": 0
                          }
                        },
                        "required": [
                          "retry_after_seconds"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "error"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {
                          "code": {
                            "type": "string"
                          },
                          "message": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "code",
                          "message"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "const": "ping"
                      },
                      "protocol_version": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/protocol_version"
                      },
                      "event_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/event_id"
                      },
                      "sequence": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/sequence"
                      },
                      "topic": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/topic"
                      },
                      "fixture_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/fixture_id"
                      },
                      "match_id": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/match_id"
                      },
                      "occurred_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "published_at": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "server_time": {
                        "$ref": "#/definitions/DownstreamServerMessage/anyOf/0/properties/occurred_at"
                      },
                      "data": {
                        "type": "object",
                        "properties": {},
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "type",
                      "protocol_version",
                      "event_id",
                      "topic",
                      "published_at",
                      "server_time",
                      "data"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            },
            "$schema": "http://json-schema.org/draft-07/schema#"
          }
        }
      }
    }
  },
  "operations": {
    "receiveLive": {
      "action": "receive",
      "channel": {
        "$ref": "#/channels/live"
      },
      "messages": [
        {
          "$ref": "#/channels/live/messages/serverMessage"
        }
      ]
    },
    "sendCommand": {
      "action": "send",
      "channel": {
        "$ref": "#/channels/live"
      },
      "messages": [
        {
          "$ref": "#/channels/live/messages/clientMessage"
        }
      ]
    }
  }
}
