User Asset

Retrieve real-time asset holdings and Profit & Loss (PnL) metrics for a specific user. This endpoint provides a consolidated view of both gold and silver assets, including their gram weights and fiscal performance.

Get User Assets

GET /user/assets

Headers

Header / TypeConditionDescription
Authorizationstring
required
Bearer token retrieved from the Authentication endpoint.
X-User-Idstring
optional-when
X-Partner-User-Id
Unique user identifier from Treasury.
X-Partner-User-Idstring
optional-when
X-User-Id
Your internal user identifier.

Response

The response includes asset totals and PnL calculations based on the current market price versus the average buy price.

Sample Response (200 OK)

json
{
  "code": 200,
  "data": {
    "timestamp": "2026-03-31T21:42:53+07:00",
    "gold"     : {
      "grams"         : 0.5,
      "pnl_amount"    : 41663,
      "pnl_percentage": 3.22
    },
    "silver"   : {
      "grams"         : 0,
      "pnl_amount"    : 0,
      "pnl_percentage": 0
    }
  }
}