{
  "openapi": "3.0.0",
  "info": {
    "title": "Bookie Hunt Public API",
    "description": "Public odds conversion API. Promotion, legal-status and trust-score feeds are unavailable pending verified data.",
    "version": "1.1.0"
  },
  "servers": [
    {
      "url": "https://bookiehunt.com/api/v1",
      "description": "Production Server"
    }
  ],
  "paths": {
    "/public/math/convert-odds": {
      "get": {
        "summary": "Convert American Odds",
        "description": "Converts American odds into decimal, fractional (clean continued-fraction reduction, e.g. -110 -> 10/11), implied probability, and the equivalent prediction-market contract price in cents.",
        "operationId": "convertOdds",
        "parameters": [
          {
            "name": "american",
            "in": "query",
            "required": true,
            "description": "American odds integer with magnitude >= 100 (e.g., -110, +150)",
            "schema": {
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful conversion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "american": {
                      "type": "integer"
                    },
                    "decimal": {
                      "type": "number"
                    },
                    "fractional": {
                      "type": "string",
                      "example": "10/11"
                    },
                    "implied_prob": {
                      "type": "number",
                      "description": "Implied probability as a percentage (0-100)"
                    },
                    "prediction_market_cents": {
                      "type": "number",
                      "description": "Equivalent prediction-market contract price in cents (== implied probability)"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid 'american' parameter (must be an integer >= +100 or <= -100)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
