Entity Sport Fantasy API

Fantasy points and squads.

OpenAPI Specification

entitysport-fantasy-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Entity Sport Cricket API V2 Authentication Fantasy API
  description: Token-authenticated REST API for cricket data from Entity Sport (Entity Digital Sports). Covers competitions and seasons, fixtures, results, live ball-by-ball scoring, scorecards, fantasy points, squads, player and team profiles, standings, and betting odds. Clients obtain a short-lived access token by POSTing access_key and secret_key to /auth, then pass the token as the `token` query parameter on every request.
  termsOfService: https://www.entitysport.com/terms-conditions/
  contact:
    name: Entity Sport Support
    email: sales@entitysport.com
    url: https://www.doc.entitysport.com/cricket-api-v2
  version: '2.0'
servers:
- url: https://restapi.entitysport.com/v2
  description: Entity Sport Cricket API V2 production server
security:
- accessToken: []
tags:
- name: Fantasy
  description: Fantasy points and squads.
paths:
  /matches/{mid}/squads:
    get:
      operationId: getMatchSquads
      tags:
      - Fantasy
      summary: Get match squad / fantasy roster.
      description: Returns the pre-match fantasy squad/roster with player roles and fantasy credits for a match by mid.
      parameters:
      - $ref: '#/components/parameters/mid'
      - $ref: '#/components/parameters/token'
      responses:
        '200':
          description: Match squads.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
  /matches/{mid}/point:
    get:
      operationId: getMatchFantasyPoints
      tags:
      - Fantasy
      summary: Get match fantasy points.
      description: Returns Entity Sport fantasy cricket points for a match by mid.
      parameters:
      - $ref: '#/components/parameters/mid'
      - $ref: '#/components/parameters/token'
      responses:
        '200':
          description: Fantasy points.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiResponse'
components:
  parameters:
    token:
      name: token
      in: query
      required: true
      description: Short-lived access token from POST /auth.
      schema:
        type: string
    mid:
      name: mid
      in: path
      required: true
      description: Match identifier.
      schema:
        type: integer
  schemas:
    ApiResponse:
      type: object
      description: Standard Entity Sport response envelope.
      properties:
        status:
          type: string
          description: Response status (e.g. ok).
          example: ok
        response:
          type: object
          description: Endpoint-specific payload.
      additionalProperties: true
  securitySchemes:
    accessToken:
      type: apiKey
      in: query
      name: token
      description: Short-lived access token obtained from POST /auth, passed as the `token` query parameter on every request.