Skip to main content

Others Are Playing Query

This query provides information about games that other users are currently playing or have recently played.

othersArePlaying​

Returns a list of games that other players are currently playing or have recently played, excluding the current user's games and filtered by bet type.

Query​

query OthersArePlaying($limit: Int, $offset: Int, $type: QueryUserBetType) {
othersArePlaying(limit: $limit, offset: $offset, type: $type) {
user {
id
username
avatarUrl
}
game {
id
name
thumbnailUrl
provider
}
isPlaying
}
}

Parameters​

ParameterTypeDescriptionRequiredDefault
limitIntMaximum number of results to returnNo5
offsetIntNumber of results to skipNo0
typeQueryUserBetTypeFilter by bet type (SPORT, CASINO, BOTH)NoCASINO

Response​

{
"data": {
"othersArePlaying": [
{
"user": {
"id": "60da4b45bc06b53c4851a123",
"username": "player123",
"avatarUrl": "https://example.com/avatars/player123.jpg"
},
"game": {
"id": "cg-123456",
"name": "Book of Dead",
"thumbnailUrl": "https://example.com/games/book-of-dead.jpg",
"provider": "Play'n GO"
},
"isPlaying": true
},
{
"user": {
"id": "60da4b45bc06b53c4851a124",
"username": "gambler456",
"avatarUrl": "https://example.com/avatars/gambler456.jpg"
},
"game": {
"id": "cg-789012",
"name": "Gonzo's Quest",
"thumbnailUrl": "https://example.com/games/gonzos-quest.jpg",
"provider": "NetEnt"
},
"isPlaying": false
}
]
}
}

Field Descriptions​

FieldDescription
userInformation about the user playing the game
gameInformation about the casino game
isPlayingBoolean indicating whether the user is currently playing (true) or recently played (false)

Notes​

  1. This query only returns games that are being played by users other than the current authenticated user.
  2. The query prioritizes games with higher indexInProvider values.
  3. The isPlaying field indicates whether a user is currently playing (has an active bet with status PLACED) or just recently played.
  4. For privacy reasons, users with hidden preferences are filtered out from the results.