This API is to get event information and including some market information.
## Request
```http request
GET /sports/{version}/GetEvents?query=$filter=sporttype eq 1&includeMarkets=$filter=bettype eq 128&language=cs
Accept: application/json
Accept-Encoding: br, gzip, deflate
X-Forwarded-For: client ip (If using API via proxy)
Authorization: Bearer {JWT token}
```
| Parameter | Description |
| ------ | ------ |
| query | Specific the query parameters for using odata query format |
| from | Specific the start date of the data. It can be inputted separately.<br>The date time string format should be like: "2021-01-01T00:00:00", encodable |
| until | Specific the end date of the data. It can be inputted separately.<br>The date time string format should be like: "2021-01-01T00:00:00", encodable |
| language | Specific the language of the response context |
| includeMarkets | Specify whether it is necessary to return the market information. <br /> **If the parameter of includeMarkets does not include in the query parameters, market information will be responded by default.** <br /> **includeMarkets = $filter=bettype eq 128;** Market information is returned with conditions specified by parameters. <br /> **includeMarkets = none;** Market information is not returned. |
## Response
```
{
"events": Event[],
"markets": Market[] | null
}
```
| Name| Format | Description |
| ------ | ------ | ------ |
|events|Event array|Specifies the information of events.|
|markets|Market array|Specifies the information of markets.|
### **Event**
```
{
"sportType": int,
"sportName": string,
"leagueId": int,
"leagueName": string,
"leagueIconUrl": string,
"eventId": int,
"eventCode": string,
"eventStatus": string,
"isMainMarket": bool,
"kickOffTime": DateTime,
"globalShowTime": DateTime,
"countryCode": string,
"gameSession": int,
"parentId": int,
"isTest": bool,
"isLive": bool,
"isParlay": bool,
"isCashout": bool,
"isVirtualEvent": bool,
"hasLiveMarket": bool,
"marketCount": int,
"marketCategories": int[],
"streamingOption": int,
"channelCode": string,
"teamInfo": TeamInfo,
"gameInfo": GameInfo,
"soccerInfo": SoccerInfo | null,
"tennisInfo": TennisInfo | null,
"beachVolleyBallInfo": BeachVolleyBallInfo | null,
"eSportInfo": ESportInfo | null,
"basketballInfo": BasketballInfo | null,
"baseballInfo": BaseballInfo | null,
"volleyBallInfo": VolleyballInfo | null
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|sportType|int|Specifies the identifier of the sport.|Yes|$filter=sporttype eq 1|
|sportName|string|Specifies the name of the sport.|Yes|$filter=sportname eq 'Soccer'|
|leagueId|int |Specifies the identifier of the league.|Yes|$filter=leagueid eq 56038|
|leagueName|string|Specifies the name of the league.|Yes|$filter=leaguename eq '*UEFA CHAMPIONS LEAGUE' or $filter=contains(leaguename,'NBA')|
|leagueIconUrl|string|Specifies the URL of the league image.<br>If the image not found, please change to use default url.<br>{domain}/LeagueImg/league_flag.png <br>Please replace domain with the domain returned by leagueIconUrl |No|-|
|eventId|int|Specifies the identifier of the event.|Yes|$filter=eventid eq 38255274|
|eventCode|string|Specifies the order of the event.|No|—|
|eventStatus|string|Specifies the status of the event.<br>running/closed/postponed/deleted|Yse|$filter=eventStatus eq 'running'|
|isMainMarket|bool|Specifies the event is in the main market.|Yes|$filter=ismainmarket eq true |
|kickOffTime|DateTime|Specifies the start time for the event of system. (time zone **GMT+0**)|No|—|
|globalShowTime|DateTime|Specifies the start time for the event. (time zone **GMT+0**)|No|—|
|countryCode|string|Specifies the identifier of the country.|No|—|
|gameSession|int|Specifies the total games of the event.|No|—|
|parentId|int|Specifies the identifier of the parent event.|No|—|
|isTest|bool|Specifies whether the event is test.|No|—|
|isLive|bool|Specifies whether the event is live.|Yes|$filter=islive eq true|
|isParlay|bool|Specifies whether the event is parlay.|Yes|$filter=isparlay eq true|
|isCashout|bool|Specifies whether the event supports cashout.|Yes|$filter=iscashout eq true|
|isVirtualEvent|bool|Specifies whether the event is a virtual game.|Yes|$filter=isvirtualevent eq true|
|hasLiveMarket|bool|Specifies the event has a live market.|No|—|
|marketCount|int|Specifies the amount of markets for each event.|No|—|
|marketCategories|int[]|Specifies the categories of all markets for each event.<br>0: None <br>1: FullTime <br>2: Half <br>3: Corners /Bookings <br>4: Intervals <br>5: Specials <br>6: Players <br>7: FastMarket <br>8: Quarter <br>9: ExtraTime <br>10: Penalty <br>11-19: E-Sports Map 1-9 |No|—|
|streamingOption|int|Specifies the identifier of the streaming.|Yes|$filter=streamingOption eq 131072|
|channelCode|string|Specifies the code of the streaming.|Yes|$filter=channelCode ne null|
|teamInfo|TeamInfo|Specifies the information of the team.|No|—|
|gameInfo|GameInfo|Specifies the information of the game.|No|—|
|soccerInfo|SoccerInfo|Specifies the information of the soccer.|No|—|
|tennisInfo|TennisInfo|Specifies the information of the tennis.|No|—|
|beachVolleyBallInfo|BeachVolleyBallInfo|Specifies the information of the beach volleyball.|No|—|
|eSportInfo|ESportInfo|Specifies the information of the E-Sport.|No|—|
|basketballInfo|BasketballInfo|Specifies the information of the Basketball.|No|—|
|baseballInfo|BaseballInfo|Specifies the information of the Baseball.|No|—|
|volleyballInfo|VolleyballInfo|Specifies the information of the Volleyball.|No|—|
#### **TeamInfo**
```
{
"homeId": int,
"homeName": string,
"homeIconUrl": string,
"awayId": int,
"awayName": string,
"awayIconUrl": string,
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|homeId|int|Specifies the identifier of the home team.|Yes|$filter=homeId eq 17892|
|homeName|string|Specifies the name of the home team.|Yes|$filter=contains(homename,'Field')|
|homeIconUrl|string|Specifies the URL of the home team image.<br>If the image not found, please change to use default url.<br>{domain}/TeamImg/team_flag_home.png <br>Please replace domain with the domain returned by homeIconUrl |No|-|
|awayId|int|Specifies the identifier of the away team.|Yes|$filter=awayid eq 714227|
|awayName|string|Specifies the name of the away team.|Yes|$filter=contains(awayname,'Lakers')|
|awayIconUrl|string|Specifies the URL of the away team image.<br>If the image not found, please change to use default url.<br>{domain}/TeamImg/team_flag_away.png <br>Please replace domain with the domain returned by awayIconUrl|No|-|
#### **GameInfo**
```
{
"livePeriod": byte,
"clockDirection": string,
"seconds": int,
"isNeutral": bool,
"isHt": bool,
"isBreak": bool,
"isClosed": bool,
"inJuryTime": byte,
"delayLive": bool,
"gameStatus" byte,
"inPlayTime": string,
"liveHomeScore": int,
"liveAwayScore": int
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|livePeriod|byte|Specifies the current part of the game.<br>If the value is 0, the front end should not be displayed the time. It means the game is at a special time.<br>Only support for:<br>1: Soccer<br>2: Backetball<br>3: Football<br>4: Icehockey<br>9: Badminton<br>24: Handball<br>26: Rugby<br>43: E-Sports|No|—|
|clockDirection|string|Specifies the clock direction. Two values are possible:"inc"(counting starts from 0 to end game) and "dec"(counting starts from a specific value and goes down to 0)|No|—|
|seconds|int|Specifies the current game time in seconds.|No|—|
|isNeutral|bool|Specifies the game is neither hold in home nor away site.|No|—|
|isHt|bool|Specifies the event is in the half time interval.|No|—|
|isBreak|bool|Specifies the game is in break time.|No|—|
|isClosed|bool|Specifies the event has been closed|No|—|
|inJuryTime|byte|Specifies the injury time of the game.|No|—|
|delayLive|bool|Specifies whether the event is delaying.|No|—|
|gameStatus|byte|Specifies the status for the game.<br>1=PRC; 2=PPen; 3=VAR; 4=Penalty; 5=Injury; 6=Sudden Death |No|—|
|inPlayTime|string|Specifies the steps of the event is going.|No|—|
|liveHomeScore|int|Specifies the current score of home team.|No|—|
|liveAwayScore|int|Specifies the current score of away team.|No|—|
#### **SoccerInfo**
```
{
"homeRedCard":byte,
"awayRedCard":byte,
"homeYellowCard":byte,
"awayYellowCard":byte
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|homeRedCard|byte|Specifies the number of red cards of Home’s.|No|—|
|awayRedCard|byte|Specifies the number of red cards of Away’s.|No|—|
|homeYellowCard|byte|Specifies the number of yellow cards of Home’s.|No|—|
|awayYellowCard|byte|Specifies the number of yellow cards of Away’s.|No|—|
#### **TennisInfo**
```
{
"homeGameScore": int[],
"awayGameScore": int[],
"homePointScore": string,
"awayPointScore": string,
"currentSet": int,
"currentServe": int
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|homeGameScore|int[]|Specifies the number of the point in a set, the Home player got.|No|—|
|awayGameScore|int[]|Specifies the number of the point in a set, the Away player got.|No|—|
|homePointScore|string|Specifies the Home’s point of current game.|No|—|
|awayPointScore|string|Specifies the Away’s point of current game.|No|—|
|currentSet|int|Specifies the current set.|No|—|
|currentServe|int|Specifies which team is current server.|No|—|
#### **BeachVolleyBallInfo**
```
{
"homeGameScore": int[],
"awayGameScore": int[],
"currentSet": int,
"currentServe": int,
"playerInjury": int,
"isRain" bool
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|homeGameScore|int[]|Specifies the number of the point in a set, the Home player got.|No|—|
|awayGameScore|int[]|Specifies the number of the point in a set, the Away player got.|No|—|
|currentSet|int|Specifies the current set.|No|—|
|currentServe|int|Specifies which team is the current server.|No|—|
|playerInjury|int|Specifies which team is injury.<br>0=no one, 1=home, 2=away, 3=both |No|—|
|isRain|bool|Specifies whether the weather is raining. |No|—|
#### **ESportInfo**
```
{
"bestOfMap": int,
"isStartingSoon": bool,
"moveBO3Down": bool,
"overTimeSession": int,
"leagueGroup": string,
"leagueGroupId": int
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|bestOfMap|int|Specifies how many maps will be use.|No|—|
|isStartingSoon|bool|Specifies the competition is starting soon.|No|—|
|moveBO3Down|bool|Specifies to display a flag in web page.|No|—|
|overTimeSession|int|<p>Specifies the information of league.<br>1 → Dota2 ; 2 → LOL ; 3 → CS2 ; 4 → KOG ; 99 → Others</p>|Yes|$filter=overTimeSession eq 1|
|leagueGroup|string|Specifies the name of the league group.|No|—|
|leagueGroupId|int|Specifies the identifier of the league group.|No|—|
#### **BasketballInfo**
```
{
"homeGameScore": int[],
"awayGameScore": int[],
"latestLivePeriod":int,
"homeOverTimeScore": int,
"awayOverTimeScore": int
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|homeGameScore|int[]|Specifies the current score of home team.|No|—|
|awayGameScore|int[]|Specifies the current score of away team.|No|—|
|latestLivePeriod|int|Specifies current period|No|—|
|homeOverTimeScore|int|Specifies the current overtime score of home team.|No|—|
|awayOverTimeScore|int|Specifies the current overtime score of away team.|No|—|
#### **BaseballInfo**
```
{
"homeGameScore": int[],
"awayGameScore": int[],
"homeOverTimeScore": int,
"awayOverTimeScore": int,
"baseHasRunner": bool[],
"currentInning": int,
"currentBattingTeam": int,
"currentOuts": int
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|homeGameScore|int[]|Specifies the current score of home team.|No|—|
|awayGameScore|int[]|Specifies the current score of away team.|No|—|
|latestLivePeriod|int|Currrent Game Period|No|—|
|homeOverTimeScore|int|Specifies the current overtime score of home team.|No|—|
|awayOverTimeScore|int|Specifies the current overtime score of away team.|No|—|
|baseHasRunner|bool[]|Specifies which base has runner.<br>First Item Indicates True If There's a Runner on First Base And So On|No|—|
|currentInning|int|Specifies current inning number|No|—|
|currentBattingTeam|int|Specifies Current Batting Team<br>1=Home,2=Away |No|—|
|currentOuts|int|Specifies current outs in batting team|No|—|
#### **VolleyballInfo**
```
{
"homeGameScore": int[],
"awayGameScore": int[],
"homePointScore":int,
"awayPointScore":int,
"currentServe":int,
"homeCurrentPoint":int,
"awayCurrentPoint":int,
"playerInjury":int,
"lastestLivePeriod":int
}
```
| Name| Format | Description | Queryable | Query Example |
| ------ | ------ | ------ | ------ | ------ |
|homeGameScore|int[]|Specifies the number of the point in a set, the Home player got.|No|—|
|awayGameScore|int[]|Specifies the number of the point in a set, the Home player got.|No|—|
|homePointScore|int|Specifies Home Team Total Score|No|—|
|awayPointScore|int|Specifies Away Team Total Score|No|—|
|currentServe|int|Specifies which team is the current server.|No|—|
|homeCurrentPoint|int|Specifies home team score in current period|No|—|
|awayCurrentPoint|int|Specifies away team score in current period|No|—|
|playerInjury|int|Specifies which team is injury.<br>0=no one, 1=home, 2=away, 3=both |No|—|
|latestLivePeriod|int|Specifies current period|No|—|
### **Market**
please reference GetMarkets response