Skip to main content

GET_getRecent

await client.GET_getRecent(queue, region)
Get recently completed match IDs for a queue. Returns matches from the last 10 minutes for live regions, or 12 hours for the esports routing value.
ParameterTypeDescription
queuestrQueue type. Valid values: competitive, unrated, spikerush, tournamentmode, deathmatch, onefa, ggteam, hurm
regionstrRegion to query. Valid values: ap, br, esports, eu, kr, latam, na
Returns: RecentMatchesDto or dict Raises: InvalidRegion, InvalidQueue, RiotAPIResponseError
NA, LATAM, and BR share a match history deployment. Results from those regions will be combined and may be inconsistent due to load balancing.

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        recent = await client.GET_getRecent("competitive", "na")
        print(f"Recent competitive matches: {len(recent.matchIds)}")
        for match_id in recent.matchIds[:3]:
            print(f"  {match_id}")
    finally:
        await client.close()

asyncio.run(main())