osrs-data-hub
XP and gains

Gains per skill

GET
/accounts/{id}/gains

XP gained per skill in a period or an explicit range (stats): every skill the account has, 0 when nothing was gained. Default period=day.

Authorization

bearerAuth
AuthorizationBearer <token>

An API key from the hub’s API keys page.

In: header

Path Parameters

id*string

The account's public id (opaque, base62), as id in /accounts.

Match^[0-9A-Za-z]{1,64}$

Query Parameters

period?string

day = since local midnight in the key creator’s time zone (their hub settings); week/month/year = the last 7/30/365 days. Default day. Not together with from/to.

Value in

  • "day"
  • "week"
  • "month"
  • "year"
from?string

An explicit range instead of period.

Formatdate-time
to?string

With from; default now.

Formatdate-time

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/accounts/4fT9kQ2mXa7B/gains"
{  "data": {    "account": {      "id": "string",      "name": "string"    },    "period": "day",    "from": "2019-08-24T14:15:22Z",    "to": "2019-08-24T14:15:22Z",    "gains": [      {        "skill": "string",        "xp": 0      }    ]  },  "meta": {    "generated_at": "2019-08-24T14:15:22Z"  }}