Skip to main content

GET_getMatchlist

await client.GET_getMatchlist(puuid, region)
Get a player’s match history.
ParameterTypeDescription
puuidstrThe player’s PUUID
regionstrThe player’s region. Valid values: ap, br, esports, eu, kr, latam, na
Returns: MatchlistDto or dict Raises: InvalidRegion, RiotAPIResponseError

Example

import valaw
import asyncio

async def main():
    client = valaw.Client("YOUR_TOKEN", "americas")
    try:
        account = await client.GET_getByRiotId("PlayerName", "NA1")
        matchlist = await client.GET_getMatchlist(account.puuid, "na")

        print(f"Total matches: {len(matchlist.history)}")
        for entry in matchlist.history[:5]:
            print(f"  {entry.matchId}{entry.queueId}")
    finally:
        await client.close()

asyncio.run(main())