OpenMLBB SDK Docs

OpenMLBB Endpoint

SDK call mapping, request requirements, and Python example.

Every card documents the SDK call from OpenMLBB and mirrors API path/query/body requirements.

GET User Statistics

/openmlbb/user/stats

Open Only This

API Path: /api/user/stats

Retrieve the authenticated player's overall statistics using a valid JWT. Supports query parameter for localization (lang). Requires an Authorization header with the JWT from login.

Headers:

  • Authorization: Bearer <jwt> (JWT obtained during login).

Query parameters:

  • lang: Language code for localized content (default: en).

The response includes general player statistics:

  • wc: Win Count (total matches won).
  • tc: Total Count (total matches played).
  • as: Average Score (overall performance rating, as/100).
  • gt: Game Time (total play time duration in hours).
  • mvpc: MVP Count (number of times player earned MVP).
  • wsc: Win Streak Count (longest consecutive wins).

Hero-specific highlights:

  • mo: Most Often (hero most damage dealt).
  • hk: Highest Kills (hero with the most kills).
  • ma: Most Assists (hero contributing the most assists).
  • ms: Most Score (hero with the highest accumulated score).
  • mdt: Most Damage Taken (hero absorbing the most damage).
  • mg: Most Gold (hero earning the most gold).
  • mtd: Most Total Damage (hero dealing the most damage overall).

Each hero highlight includes metadata such as:

      • v: Value or statistic for the highlight. if ms is used, it calculates v/100.
      • ts: Timestamp of the highlight.
      • hid: Hero ID.
      • n: Hero name.
      • ix: Hero image URL.
      • i2x: Large hero image URL.
      • bid: Battle ID reference.

This endpoint is useful for:

  • Analyzing overall player performance.
  • Identifying favorite heroes.
  • Showcasing personal achievements in MLBB.

This endpoint requires JWT. Pass the token via the SDK call argument jwt="YOUR_JWT".

Python Example

from OpenMLBB import OpenMLBB

client = OpenMLBB()
response = client.user.stats(jwt="YOUR_JWT", lang="en")
print(response)

Path and Query Parameters

Name In Type Required Default
lang query string no en