Skip to content

Client

Provides a client for the Halo Infinite API.

HaloInfiniteClient(session, spartan_token, clearance_token, requests_per_second=5)

A client for the Halo Infinite API.

Parameters:

Name Type Description Default
session ClientSession | CachedSession

The aiohttp.ClientSession to use. Support for caching is available via a CachedSession from aiohttp-client-cache.

required
spartan_token str

The spartan token used to authenticate with the API.

required
clearance_token str

The clearance token used to authenticate with the API.

required
requests_per_second int

The rate limit to use. Note that this rate limit is enforced per service, not globally. Defaults to 5 requests per second.

5

discovery_ugc: DiscoveryUgcService cached property

User-generated content discovery data service (maps, modes, etc.).

economy: EconomyService cached property

Store and customization data service.

gamecms_hacs: GameCmsHacsService cached property

Game content management data service (e.g., medal metadata)

profile: ProfileService cached property

Profile data service. Get user data, such as XUIDs/gamertags.

skill: SkillService cached property

Skill data service. Retrieve MMR and CSR data by match or playlist.

stats: StatsService cached property

Stats data service. Retrieve match history and match stats.

set_tokens(spartan_token, clearance_token)

Update the tokens used for authentication.

This method is called during initialization, but can be used after initialization to replace expiring tokens.

Parameters:

Name Type Description Default
spartan_token str

The spartan token used to authenticate with the API.

required
clearance_token str

The clearance token used to authenticate with the API.

required