{
  "openapi": "3.1.1",
  "info": {
    "title": "ESKape Sportsbook Feed — subscriber API",
    "description": "The endpoints a self-service subscription key may call: the day's fixtures, the price catalogue, your own odds, binary contracts, same-game combinations, settlement, and your subscription. Every request carries X-Api-Key. Live updates on plans that include them (not the Free plan): SignalR at /hubs/feed-odds (access_token query parameter).",
    "termsOfService": "https://eskape.pro/terms",
    "contact": {
      "name": "ESKape",
      "url": "https://eskape.pro",
      "email": "management@eskape.pro"
    },
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://eskape.pro"
    }
  ],
  "paths": {
    "/api/betbuilder/quote": {
      "post": {
        "tags": [
          "BetBuilder"
        ],
        "operationId": "BetBuilderQuote",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BetBuilderQuoteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BetBuilderQuoteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BetBuilderQuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/fixtures/binary": {
      "get": {
        "tags": [
          "Fixtures"
        ],
        "operationId": "FixtureBinaryContracts",
        "parameters": [
          {
            "name": "home",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "away",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scenario",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/IngestionScenario"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/fixtures/daily": {
      "get": {
        "tags": [
          "Fixtures"
        ],
        "operationId": "DiscoverFixturesDaily",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/fixtures/odds-snapshot": {
      "get": {
        "tags": [
          "Fixtures"
        ],
        "operationId": "FixtureOddsSnapshot",
        "parameters": [
          {
            "name": "home",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "away",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/fixtures/quote": {
      "put": {
        "tags": [
          "Fixtures"
        ],
        "operationId": "SubmitClientQuote",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientQuoteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ClientQuoteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ClientQuoteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/settlement": {
      "get": {
        "tags": [
          "Settlement"
        ],
        "operationId": "FixtureSettlement",
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "home",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "away",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "fixtureId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/subscriptions/plans": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "operationId": "SubscriptionPlans",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/subscriptions/register": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "operationId": "RegisterSubscription",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegistrationRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/RegistrationRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/RegistrationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/subscriptions/confirm": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "operationId": "ConfirmSubscription",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/subscriptions/me": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "operationId": "MySubscription",
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/subscriptions/me/rotate-key": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "operationId": "RotateMyKey",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RotateKeyRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RotateKeyRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/RotateKeyRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/subscriptions/me/interest": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "operationId": "RegisterInterest",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/InterestRequest"
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/InterestRequest"
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/InterestRequest"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    },
    "/api/subscriptions/me/usage": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "operationId": "MyUsage",
        "parameters": [
          {
            "name": "days",
            "in": "query",
            "schema": {
              "pattern": "^-?(?:0|[1-9]\\d*)$",
              "type": [
                "integer",
                "string"
              ],
              "format": "int32"
            }
          },
          {
            "name": "detail",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        },
        "security": [
          {
            "ApiKey": [ ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "BetBuilderLeg": {
        "required": [
          "marketCode",
          "selectionKey"
        ],
        "type": "object",
        "properties": {
          "marketCode": {
            "type": "string"
          },
          "selectionKey": {
            "type": "string"
          }
        }
      },
      "BetBuilderQuoteRequest": {
        "required": [
          "homeTeamName",
          "awayTeamName",
          "date",
          "legs"
        ],
        "type": "object",
        "properties": {
          "homeTeamName": {
            "type": "string"
          },
          "awayTeamName": {
            "type": "string"
          },
          "date": {
            "type": [
              "null",
              "string"
            ]
          },
          "legs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BetBuilderLeg"
            }
          }
        }
      },
      "ClientQuoteRequest": {
        "required": [
          "homeTeamName",
          "awayTeamName"
        ],
        "type": "object",
        "properties": {
          "homeTeamName": {
            "type": "string"
          },
          "awayTeamName": {
            "type": "string"
          },
          "date": {
            "type": [
              "null",
              "string"
            ]
          },
          "homeWinDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "drawDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "awayWinDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "overDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "underDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "totalGoalsLine": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double",
            "default": 2.5
          },
          "homeAsianDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "awayAsianDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "asianHomeLine": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "number",
              "string"
            ],
            "format": "double",
            "default": 0
          },
          "bttsYesDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          },
          "bttsNoDecimal": {
            "pattern": "^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?$",
            "type": [
              "null",
              "number",
              "string"
            ],
            "format": "double"
          }
        }
      },
      "IngestionScenario": {
        "type": "integer"
      },
      "InterestRequest": {
        "required": [
          "plan"
        ],
        "type": "object",
        "properties": {
          "plan": {
            "type": [
              "null",
              "string"
            ]
          }
        }
      },
      "RegistrationRequest": {
        "required": [
          "company",
          "country",
          "licence",
          "email",
          "acceptTerms",
          "termsVersion"
        ],
        "type": "object",
        "properties": {
          "company": {
            "type": [
              "null",
              "string"
            ]
          },
          "country": {
            "type": [
              "null",
              "string"
            ]
          },
          "licence": {
            "type": [
              "null",
              "string"
            ]
          },
          "email": {
            "type": [
              "null",
              "string"
            ]
          },
          "acceptTerms": {
            "type": "boolean"
          },
          "termsVersion": {
            "type": [
              "null",
              "string"
            ]
          },
          "competition": {
            "type": [
              "null",
              "string"
            ]
          },
          "password": {
            "type": [
              "null",
              "string"
            ]
          },
          "businessUse": {
            "type": "boolean",
            "default": false
          },
          "registrationNumber": {
            "type": [
              "null",
              "string"
            ]
          },
          "localLicence": {
            "type": "boolean",
            "default": false
          }
        }
      },
      "RotateKeyRequest": {
        "type": "object",
        "properties": {
          "revokePrevious": {
            "type": "boolean",
            "default": false
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "description": "The API key — a configured client's, or a subscriber's esk_… key. The live hub takes it as the access_token query parameter instead.",
        "name": "X-Api-Key",
        "in": "header"
      }
    }
  },
  "tags": [
    {
      "name": "BetBuilder"
    },
    {
      "name": "Fixtures"
    },
    {
      "name": "Settlement"
    },
    {
      "name": "Subscriptions"
    }
  ]
}