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 / Type | Condition | Description |
|---|---|---|
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.
Locked Assets: The locked_gold and locked_silver fields represent user assets currently held in locked mode (such as assets purchased via the reserve-vcert operation). These fields are only available if Treasury has configured the vcert-operation-enable setting in your partner settings.
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
},
"locked_gold": {
"grams" : 0.6,
"pnl_amount" : 33990,
"pnl_percentage": 3.01
},
"silver": {
"grams" : 0,
"pnl_amount" : 0,
"pnl_percentage": 0
},
"locked_silver": {
"grams" : 0,
"pnl_amount" : 0,
"pnl_percentage": 0
}
}
}