{
  "openapi": "3.1.0",
  "info": {
    "title": "PricedOdds API",
    "version": "1.0.0",
    "description": "Real-time US sports odds: 15 books chosen by the customer (Solo 2, Starter 5, Growth 10, All-Access all 15) plus Pinnacle (included in All-Access, add-on on other plans), props and live, no-vig fair price and best line on every selection. Independent service, not affiliated with any sportsbook. Informational data only.\n\nAuth: send `Authorization: Bearer <key>` (or `X-Api-Key`). Keys in the URL are rejected.",
    "contact": {
      "email": "support@pricedodds.com"
    }
  },
  "servers": [
    {
      "url": "https://api.pricedodds.com"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "tags": [
    {
      "name": "catalog"
    },
    {
      "name": "odds"
    },
    {
      "name": "analytics"
    },
    {
      "name": "account"
    }
  ],
  "paths": {
    "/v1/sports": {
      "get": {
        "tags": [
          "catalog"
        ],
        "security": [],
        "summary": "Sports and leagues",
        "operationId": "listSports",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Sport"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/books": {
      "get": {
        "tags": [
          "catalog"
        ],
        "security": [],
        "summary": "Books, type, status; with a key: included in your plan",
        "operationId": "listBooks",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Book"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/markets": {
      "get": {
        "tags": [
          "catalog"
        ],
        "security": [],
        "summary": "Market keys and periods (never guess names)",
        "operationId": "listMarkets",
        "parameters": [
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "description": "basketball, football, hockey, baseball, soccer",
            "schema": {
              "type": "string"
            },
            "example": "basketball"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/coverage": {
      "get": {
        "tags": [
          "catalog"
        ],
        "security": [],
        "summary": "Everything included: books (type, status, leagues, markets, props, live/pre-match), sports and leagues, market vocabulary, periods; observed in the live feed",
        "operationId": "getCoverage",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "books": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "sports": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "markets": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        },
                        "periods": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "plans": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "tags": [
          "catalog"
        ],
        "security": [],
        "summary": "Per-book data status",
        "operationId": "getStatus",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "tags": [
          "odds"
        ],
        "summary": "Events (live first, then by start time; next 7 days by default)",
        "operationId": "listEvents",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "League id (nba, nfl, nhl, ncaab, ncaaf, mlb, epl ...). Comma list allowed.",
            "schema": {
              "type": "string"
            },
            "example": "nba"
          },
          {
            "name": "sport",
            "in": "query",
            "required": false,
            "description": "Sport id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "scheduled,live (default) | live | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "description": "Team name or abbreviation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "description": "ISO date-time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "description": "ISO date-time",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "include_started",
            "in": "query",
            "required": false,
            "description": "Show pre-match events that already started",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1-500, default 50",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "From `next`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Event"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque cursor for the next page"
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "evt_3fq9x2m1k8ab7c0d",
                      "sport": "basketball",
                      "league": {
                        "id": "nba",
                        "name": "NBA"
                      },
                      "home": {
                        "id": "tm_4c1qa2b3c4d5e6f7",
                        "name": "Boston Celtics",
                        "abbr": "BOS"
                      },
                      "away": {
                        "id": "tm_8z2ra2b3c4d5e6f7",
                        "name": "New York Knicks",
                        "abbr": "NYK"
                      },
                      "startsAt": "2026-11-23T00:30:00.000Z",
                      "status": "scheduled",
                      "live": null,
                      "books": [
                        "draftkings",
                        "fanduel",
                        "betmgm"
                      ],
                      "markets_available": 143
                    }
                  ],
                  "asOf": "2026-11-22T18:05:00.120Z",
                  "next": null
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{id}": {
      "get": {
        "tags": [
          "odds"
        ],
        "summary": "One event with live state",
        "operationId": "getEvent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^evt_[a-z2-7]{16}$"
            },
            "example": "evt_3fq9x2m1k8ab7c0d"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Event"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{id}/odds": {
      "get": {
        "tags": [
          "odds"
        ],
        "summary": "Every book for one event (main lines; include=alt for alternates)",
        "operationId": "getEventOdds",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^evt_[a-z2-7]{16}$"
            },
            "example": "evt_3fq9x2m1k8ab7c0d"
          },
          {
            "name": "markets",
            "in": "query",
            "required": false,
            "description": "Comma list of market keys, optionally key@period (spread@1h).",
            "schema": {
              "type": "string"
            },
            "example": "moneyline,spread,total"
          },
          {
            "name": "books",
            "in": "query",
            "required": false,
            "description": "Comma list of book ids (must be in your plan: the books you chose, see GET /v1/account).",
            "schema": {
              "type": "string"
            },
            "example": "draftkings,fanduel,circa"
          },
          {
            "name": "include",
            "in": "query",
            "required": false,
            "description": "alt,ev,links",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "event": {
                          "$ref": "#/components/schemas/Event"
                        },
                        "markets": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Market"
                          }
                        }
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "example": {
                  "data": {
                    "event": {
                      "id": "evt_3fq9x2m1k8ab7c0d",
                      "sport": "basketball",
                      "league": {
                        "id": "nba",
                        "name": "NBA"
                      },
                      "home": {
                        "id": "tm_4c1qa2b3c4d5e6f7",
                        "name": "Boston Celtics",
                        "abbr": "BOS"
                      },
                      "away": {
                        "id": "tm_8z2ra2b3c4d5e6f7",
                        "name": "New York Knicks",
                        "abbr": "NYK"
                      },
                      "startsAt": "2026-11-23T00:30:00.000Z",
                      "status": "scheduled",
                      "live": null,
                      "books": [
                        "draftkings",
                        "fanduel",
                        "betmgm"
                      ],
                      "markets_available": 143
                    },
                    "markets": [
                      {
                        "id": "mkt_2k8da2b3c4d5e6f7",
                        "market": "spread",
                        "period": "game",
                        "selections": [
                          {
                            "id": "sel_a1b2c3d4e5f6g7h2",
                            "side": "home",
                            "line": -4.5,
                            "prices": [
                              {
                                "book": "draftkings",
                                "decimal": 1.909,
                                "american": -110,
                                "implied": 0.5238,
                                "updatedAt": "2026-11-22T18:03:58.911Z",
                                "changedAt": "2026-11-22T17:41:12.305Z"
                              },
                              {
                                "book": "fanduel",
                                "decimal": 1.926,
                                "american": -108,
                                "implied": 0.5192,
                                "updatedAt": "2026-11-22T18:04:02.104Z",
                                "changedAt": "2026-11-22T18:04:02.104Z"
                              }
                            ],
                            "best": {
                              "book": "fanduel",
                              "decimal": 1.926,
                              "american": -108
                            },
                            "fair": {
                              "decimal": 1.996,
                              "american": -100,
                              "prob": 0.501,
                              "method": "sharp_consensus_v1",
                              "sources": [
                                "circa",
                                "novig"
                              ]
                            }
                          }
                        ],
                        "margin": {
                          "draftkings": 0.0476,
                          "fanduel": 0.0384
                        }
                      }
                    ]
                  },
                  "asOf": "2026-11-22T18:05:00.120Z"
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/events/{id}/props": {
      "get": {
        "tags": [
          "odds"
        ],
        "summary": "Player props (all lines)",
        "operationId": "getEventProps",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^evt_[a-z2-7]{16}$"
            },
            "example": "evt_3fq9x2m1k8ab7c0d"
          },
          {
            "name": "player",
            "in": "query",
            "required": false,
            "description": "Name substring",
            "schema": {
              "type": "string"
            },
            "example": "tatum"
          },
          {
            "name": "markets",
            "in": "query",
            "required": false,
            "description": "e.g. player_points",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "books",
            "in": "query",
            "required": false,
            "description": "Comma list of book ids (must be in your plan: the books you chose, see GET /v1/account).",
            "schema": {
              "type": "string"
            },
            "example": "draftkings,fanduel,circa"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/odds": {
      "get": {
        "tags": [
          "odds"
        ],
        "summary": "Board: many events, main markets",
        "operationId": "getBoard",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "League id (nba, nfl, nhl, ncaab, ncaaf, mlb, epl ...). Comma list allowed.",
            "schema": {
              "type": "string"
            },
            "example": "nba"
          },
          {
            "name": "markets",
            "in": "query",
            "required": false,
            "description": "Comma list of market keys, optionally key@period (spread@1h).",
            "schema": {
              "type": "string"
            },
            "example": "moneyline,spread,total"
          },
          {
            "name": "books",
            "in": "query",
            "required": false,
            "description": "Comma list of book ids (must be in your plan: the books you chose, see GET /v1/account).",
            "schema": {
              "type": "string"
            },
            "example": "draftkings,fanduel,circa"
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "scheduled,live | live | all",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "1-100, default 25",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "From `next`",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque cursor for the next page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/best": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Best price per selection (line shopping)",
        "operationId": "getBest",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "League id (nba, nfl, nhl, ncaab, ncaaf, mlb, epl ...). Comma list allowed.",
            "schema": {
              "type": "string"
            },
            "example": "nba"
          },
          {
            "name": "market",
            "in": "query",
            "required": false,
            "description": "Market key, default main markets",
            "schema": {
              "type": "string"
            },
            "example": "moneyline"
          },
          {
            "name": "books",
            "in": "query",
            "required": false,
            "description": "Comma list of book ids (must be in your plan: the books you chose, see GET /v1/account).",
            "schema": {
              "type": "string"
            },
            "example": "draftkings,fanduel,circa"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "next": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Opaque cursor for the next page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/fair": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "No-vig fair price and each book margin",
        "operationId": "getFair",
        "parameters": [
          {
            "name": "event_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "markets",
            "in": "query",
            "required": false,
            "description": "Comma list of market keys, optionally key@period (spread@1h).",
            "schema": {
              "type": "string"
            },
            "example": "moneyline,spread,total"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/ev": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Pre-match prices above fair (min_ev <= EV <= max_ev)",
        "description": "Sorted by EV, highest first. Sanity defaults: the fair price must come from at least min_sources (default 2) independent books, and rows above max_ev (default 0.15 = +15 %) are dropped as implausible (stale or mis-mapped prices); filters.above_max_ev says how many were dropped. A book whose own no-vig price is far from the other books never feeds the fair price, and a book whose sides look crossed (it makes the other side the favourite) is left out of fair, best and EV for that market.",
        "operationId": "getPositiveEv",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "League id (nba, nfl, nhl, ncaab, ncaaf, mlb, epl ...). Comma list allowed.",
            "schema": {
              "type": "string"
            },
            "example": "nba"
          },
          {
            "name": "books",
            "in": "query",
            "required": false,
            "description": "Comma list of book ids (must be in your plan: the books you chose, see GET /v1/account).",
            "schema": {
              "type": "string"
            },
            "example": "draftkings,fanduel,circa"
          },
          {
            "name": "markets",
            "in": "query",
            "required": false,
            "description": "Comma list of market keys, optionally key@period (spread@1h).",
            "schema": {
              "type": "string"
            },
            "example": "moneyline,spread,total"
          },
          {
            "name": "min_ev",
            "in": "query",
            "required": false,
            "description": "Default 0.02",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "max_ev",
            "in": "query",
            "required": false,
            "description": "Default 0.15. Rows above it are dropped; raise it (e.g. 1) to inspect outliers",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "min_sources",
            "in": "query",
            "required": false,
            "description": "Default 2, minimum 1. Independent books behind the fair price",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "fair_method",
            "in": "query",
            "required": false,
            "description": "sharp (default) | market",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Default 50",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/arbs": {
      "get": {
        "tags": [
          "analytics"
        ],
        "summary": "Cross-book discrepancies (sum of implied < 100 %)",
        "operationId": "getArbs",
        "parameters": [
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "League id (nba, nfl, nhl, ncaab, ncaaf, mlb, epl ...). Comma list allowed.",
            "schema": {
              "type": "string"
            },
            "example": "nba"
          },
          {
            "name": "books",
            "in": "query",
            "required": false,
            "description": "Comma list of book ids (must be in your plan: the books you chose, see GET /v1/account).",
            "schema": {
              "type": "string"
            },
            "example": "draftkings,fanduel,circa"
          },
          {
            "name": "min_margin",
            "in": "query",
            "required": false,
            "description": "Default 0",
            "schema": {
              "type": "number"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/changes": {
      "get": {
        "tags": [
          "odds"
        ],
        "summary": "Delta polling without WebSocket",
        "operationId": "getChanges",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Cursor from the previous call (omit to get a starting cursor)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "league",
            "in": "query",
            "required": false,
            "description": "League id (nba, nfl, nhl, ncaab, ncaaf, mlb, epl ...). Comma list allowed.",
            "schema": {
              "type": "string"
            },
            "example": "nba"
          },
          {
            "name": "books",
            "in": "query",
            "required": false,
            "description": "Comma list of book ids (must be in your plan: the books you chose, see GET /v1/account).",
            "schema": {
              "type": "string"
            },
            "example": "draftkings,fanduel,circa"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "next": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "tags": [
          "account"
        ],
        "summary": "Plan, books you can query, book selection, Pinnacle, limits, trial",
        "operationId": "getAccount",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/account/books": {
      "get": {
        "tags": [
          "account"
        ],
        "summary": "Your book selection (max books, chosen, free slots, next change time)",
        "operationId": "getBookSelection",
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "account"
        ],
        "summary": "Change your book selection (Solo 2, Starter 5, Growth 10). Once every 24 h.",
        "operationId": "setBookSelection",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "books"
                ],
                "properties": {
                  "books": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "example": [
                      "draftkings",
                      "fanduel",
                      "circa"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                }
              },
              "RateLimit-Remaining": {
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "asOf"
                  ],
                  "properties": {
                    "data": {
                      "type": "object"
                    },
                    "asOf": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/v1/stream": {
      "get": {
        "tags": [
          "odds"
        ],
        "summary": "WebSocket stream: snapshot, price deltas, entitlement changes",
        "operationId": "stream",
        "description": "Upgrade this URL to WebSocket (`wss://api.pricedodds.com/v1/stream`). After auth the server sends a `ready` frame, then `snapshot` and `price` deltas. When the plan or books on the key change (for example Pinnacle is added), the server sends `{\"type\":\"entitlement\",\"data\":{\"plan\":\"...\",\"books\":[...]}}` and, if you subscribed to the default book set, a fresh snapshot of the new books. Apply `data.books` immediately. Explicit subscriptions drop books that left the plan. A suspended key closes the socket with code 4002. See /docs/websocket.",
        "responses": {
          "101": {
            "description": "Switching Protocols (WebSocket)"
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "po_live_... key from your dashboard. Server-side only."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "fix"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "missing_key",
                  "invalid_key",
                  "trial_expired",
                  "payment_required",
                  "plan_lacks_ws",
                  "book_not_in_plan",
                  "unknown_book",
                  "unknown_market",
                  "unknown_league",
                  "event_not_found",
                  "invalid_param",
                  "too_many_books",
                  "book_change_too_soon",
                  "rate_limited",
                  "cursor_expired",
                  "data_temporarily_unavailable",
                  "not_found"
                ]
              },
              "message": {
                "type": "string"
              },
              "fix": {
                "type": "string"
              },
              "docs_url": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "retry_after": {
                "type": "integer"
              }
            }
          }
        },
        "example": {
          "error": {
            "code": "book_not_in_plan",
            "message": "Your Starter plan does not include 'circa'.",
            "fix": "Remove 'circa' from books= or upgrade to Growth.",
            "docs_url": "https://pricedodds.com/docs/errors#book_not_in_plan",
            "request_id": "req_x1y2z3"
          }
        }
      },
      "Sport": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "leagues": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Book": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "draftkings"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "sportsbook",
              "social_sportsbook",
              "exchange",
              "prediction_market",
              "sharp_reference",
              "offshore_sportsbook"
            ]
          },
          "region": {
            "type": "string"
          },
          "is_sharp": {
            "type": "boolean"
          },
          "reference_only": {
            "type": "boolean"
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded",
              "down",
              "unknown",
              "activating"
            ],
            "description": "activating = listed, source being connected, no prices yet"
          },
          "pickable": {
            "type": "boolean",
            "description": "Can be one of your chosen books (false for Pinnacle: included in All-Access or add-on)"
          },
          "included": {
            "type": "boolean"
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "sport": {
            "type": "string"
          },
          "league": {
            "type": "object"
          },
          "home": {
            "$ref": "#/components/schemas/Team"
          },
          "away": {
            "$ref": "#/components/schemas/Team"
          },
          "startsAt": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "type": "string",
            "enum": [
              "scheduled",
              "live",
              "final",
              "postponed",
              "canceled"
            ]
          },
          "live": {
            "type": [
              "object",
              "null"
            ]
          },
          "books": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "markets_available": {
            "type": "integer"
          }
        },
        "example": {
          "id": "evt_3fq9x2m1k8ab7c0d",
          "sport": "basketball",
          "league": {
            "id": "nba",
            "name": "NBA"
          },
          "home": {
            "id": "tm_4c1qa2b3c4d5e6f7",
            "name": "Boston Celtics",
            "abbr": "BOS"
          },
          "away": {
            "id": "tm_8z2ra2b3c4d5e6f7",
            "name": "New York Knicks",
            "abbr": "NYK"
          },
          "startsAt": "2026-11-23T00:30:00.000Z",
          "status": "scheduled",
          "live": null,
          "books": [
            "draftkings",
            "fanduel",
            "betmgm"
          ],
          "markets_available": 143
        }
      },
      "Team": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "abbr": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Market": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "market": {
            "type": "string"
          },
          "period": {
            "type": "string"
          },
          "team": {
            "type": "string",
            "enum": [
              "home",
              "away"
            ]
          },
          "player": {
            "type": "object"
          },
          "selections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Selection"
            }
          },
          "margin": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            }
          }
        }
      },
      "Selection": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "side": {
            "type": "string",
            "enum": [
              "home",
              "away",
              "draw",
              "over",
              "under",
              "yes",
              "no"
            ]
          },
          "line": {
            "type": [
              "number",
              "null"
            ],
            "description": "Per side: away of a home -4.5 spread is +4.5"
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Price"
            }
          },
          "best": {
            "type": [
              "object",
              "null"
            ]
          },
          "fair": {
            "type": [
              "object",
              "null"
            ]
          }
        },
        "example": {
          "id": "sel_a1b2c3d4e5f6g7h2",
          "side": "home",
          "line": -4.5,
          "prices": [
            {
              "book": "draftkings",
              "decimal": 1.909,
              "american": -110,
              "implied": 0.5238,
              "updatedAt": "2026-11-22T18:03:58.911Z",
              "changedAt": "2026-11-22T17:41:12.305Z"
            },
            {
              "book": "fanduel",
              "decimal": 1.926,
              "american": -108,
              "implied": 0.5192,
              "updatedAt": "2026-11-22T18:04:02.104Z",
              "changedAt": "2026-11-22T18:04:02.104Z"
            }
          ],
          "best": {
            "book": "fanduel",
            "decimal": 1.926,
            "american": -108
          },
          "fair": {
            "decimal": 1.996,
            "american": -100,
            "prob": 0.501,
            "method": "sharp_consensus_v1",
            "sources": [
              "circa",
              "novig"
            ]
          }
        }
      },
      "Price": {
        "type": "object",
        "properties": {
          "book": {
            "type": "string"
          },
          "decimal": {
            "type": "number"
          },
          "american": {
            "type": "integer"
          },
          "implied": {
            "type": "number"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last time the source confirmed this price (refreshed on every source update for this event and book, even when the price is unchanged)"
          },
          "changedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last time this price changed value"
          },
          "sourceChangedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Upstream update time of the market, when the source sends one"
          },
          "lay_decimal": {
            "type": "number",
            "description": "Exchanges and prediction markets (novig, prophetx, kalshi, polymarket): best price to lay (bet against) this outcome, decimal. Omitted when nobody offers it"
          },
          "lay_american": {
            "type": "integer",
            "description": "lay_decimal in American odds"
          },
          "liquidity": {
            "$ref": "#/components/schemas/Liquidity"
          },
          "ev": {
            "type": "number"
          },
          "link": {
            "type": "string"
          }
        },
        "example": {
          "book": "draftkings",
          "decimal": 1.909,
          "american": -110,
          "implied": 0.5238,
          "updatedAt": "2026-11-22T18:03:58.911Z",
          "changedAt": "2026-11-22T17:41:12.305Z"
        }
      },
      "Liquidity": {
        "type": "object",
        "description": "Stake available, in whole US dollars, as published by the venue. Exchanges and prediction markets carry back_usd/lay_usd; max_stake_usd also appears on books that publish a bet limit. Every field is optional; the whole block is omitted when the book publishes none.",
        "properties": {
          "back_usd": {
            "type": "integer",
            "description": "Stake available at the back price (decimal) of this outcome"
          },
          "lay_usd": {
            "type": "integer",
            "description": "Stake available at lay_decimal"
          },
          "max_stake_usd": {
            "type": "integer",
            "description": "Largest single bet the venue accepts on this market"
          },
          "currency": {
            "type": "string",
            "enum": [
              "USD"
            ]
          }
        },
        "required": [
          "currency"
        ],
        "example": {
          "back_usd": 3913,
          "lay_usd": 7736,
          "max_stake_usd": 250,
          "currency": "USD"
        }
      },
      "WsEntitlement": {
        "type": "object",
        "description": "Pushed on an open WebSocket when the key's plan or books change. Replace the client book list with data.books; a snapshot of newly added books may follow.",
        "required": [
          "type",
          "data"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "entitlement"
          },
          "seq": {
            "type": "integer"
          },
          "ts": {
            "type": "string",
            "format": "date-time"
          },
          "data": {
            "type": "object",
            "required": [
              "plan",
              "books"
            ],
            "properties": {
              "plan": {
                "type": "string",
                "example": "Starter + Pinnacle"
              },
              "books": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "draftkings",
                  "circa",
                  "pinnacle"
                ]
              }
            }
          }
        },
        "example": {
          "type": "entitlement",
          "seq": 1048300,
          "ts": "2026-11-22T18:10:00.000Z",
          "data": {
            "plan": "Starter + Pinnacle",
            "books": [
              "draftkings",
              "circa",
              "pinnacle"
            ]
          }
        }
      }
    }
  }
}