openapi: 3.2.0 info: description: 'OpticOdds sports betting data API - Version 3 **Pagination**: Endpoints returning lists support two modes. *Offset-based (default)*: Use `page` (1-indexed) and `limit` (max 100, default 100). Response includes `page` and `has_more`. *Cursor-based*: Use `cursor` (opaque token from previous response) and `limit`. Response includes `cursor` (null when no more results). When using cursor, `page` and `has_more` are omitted. Do not pass both `page` and `cursor`. Cursor-based pagination is recommended for large result sets.' title: OpticOdds API v3 Leagues API contact: name: OpticOdds Support url: https://opticodds.com/support license: name: Proprietary url: https://opticodds.com/terms version: '3.0' servers: - url: https://api.opticodds.com/v3 tags: - name: leagues paths: /leagues: get: security: - ApiKeyHeader: [] - ApiKeyQuery: [] description: Returns all available leagues with their sport and main markets tags: - leagues summary: List all leagues parameters: - description: 'Sport IDs (use GET /sports for valid values). Example: ''basketball''' name: sport in: query style: form explode: false schema: type: array items: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.LeaguesEnvelope' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' /leagues/active: get: security: - ApiKeyHeader: [] - ApiKeyQuery: [] description: Returns leagues that currently have fixtures with odds tags: - leagues summary: List active leagues parameters: - description: 'Sport IDs (use GET /sports for valid values). Example: ''basketball''' name: sport in: query style: form explode: false schema: type: array items: type: string - description: 'Filter by fixture status. Valid values: unplayed, live, half, completed, cancelled, suspended, delayed, forfeited, invalid' name: fixture_status in: query schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.LeaguesEnvelope' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '401': description: Unauthorized content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.ErrorResponse' components: schemas: github_com_opticodds_api-go_internal_v3_response.Sport: type: object properties: id: type: string example: football main_markets: type: array items: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.Market' name: type: string example: Football numerical_id: type: integer example: 1 github_com_opticodds_api-go_internal_v3_response.Market: type: object properties: id: type: string example: moneyline name: type: string example: Moneyline numerical_id: type: integer example: 100 github_com_opticodds_api-go_internal_v3_response.ErrorResponse: type: object properties: error: type: string example: Invalid API key github_com_opticodds_api-go_internal_v3_response.LeaguesEnvelope: type: object properties: data: type: array items: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.League' github_com_opticodds_api-go_internal_v3_response.League: type: object properties: gender: type: string example: male id: type: string example: nfl name: type: string example: NFL numerical_id: type: integer example: 1 region: type: string example: USA region_code: type: string example: US sport: $ref: '#/components/schemas/github_com_opticodds_api-go_internal_v3_response.Sport' securitySchemes: ApiKeyHeader: description: API key passed via X-Api-Key header type: apiKey name: X-Api-Key in: header ApiKeyQuery: description: API key passed via query parameter type: apiKey name: key in: query