Skip to main content

Method signature

async def GET_getRecent(
    self,
    queue: str,
    region: str
) -> Union[RecentMatchesDto, Dict]
Get recent matches that have completed in the last 10 minutes for live regions and 12 hours for the esports routing value.
NA/LATAM/BR share a match history deployment. Recent matches will return a combined list of matches from those three regions. Requests are load balanced so you may see some inconsistencies as matches are added/removed from the list.

Parameters

queue
string
required
The queue to retrieve recent matches for. Valid queues are:
  • competitive - Competitive/ranked matches
  • unrated - Unrated matches
  • spikerush - Spike Rush matches
  • tournamentmode - Tournament matches
  • deathmatch - Deathmatch matches
  • onefa - Replication mode
  • ggteam - Escalation mode
  • hurm - Team Deathmatch
region
string
required
The region to execute against. Must be one of: ap, br, esports, eu, kr, latam, na.

Returns

RecentMatchesDto
object
List of recently completed match IDs.
When raw_data=True is set on the client, this method returns a Dict instead of a RecentMatchesDto object.

Exceptions

  • InvalidRegion: If the provided region is invalid.
  • InvalidQueue: If the provided queue is invalid.
  • RiotAPIResponseError: If the API response indicates an error.

Example

import asyncio
from valaw import Client

async def main():
    client = Client(
        token="RGAPI-your-token-here",
        cluster="americas"
    )
    
    # Get recent competitive matches
    recent = await client.GET_getRecent(
        queue="competitive",
        region="na"
    )
    
    print(f"Found {len(recent.matchIds)} recent competitive matches")
    print(f"Retrieved at: {recent.currentTime}")
    
    await client.close()

asyncio.run(main())

Notes

  • Matches are returned for the last 10 minutes in live regions
  • For esports region, matches from the last 12 hours are returned
  • NA, LATAM, and BR regions share match history, so results will include matches from all three
  • Results may be inconsistent due to load balancing as matches are added/removed

Build docs developers (and LLMs) love