> ## Documentation Index
> Fetch the complete documentation index at: https://docs.4mica.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a collateral balance

> Read a wallet's deposited collateral for one asset, and how much of it is locked.

`GET /core/users/{user_address}/assets/{asset_address}`

Returns core's record of the collateral a wallet has deposited in the `Treasury` for one asset. Free collateral is `total` minus `locked`.

## Authorization

**Authorization** `string` *required*

`Bearer <access_token>`. The token needs the scope `payment:read` and must belong to the wallet, or have the `admin` or `facilitator` role.

## Path parameters

**user\_address** `string` *required*

**asset\_address** `string` *required*

Token address. Use the zero address for native ETH.

## Responses

The body is `null` when core has no balance record for the wallet and asset.

**user\_address** `string` *required*

**asset\_address** `string` *required*

**total** `string` *required*

Deposited collateral in base units, as a hex quantity.

**locked** `string` *required*

The part reserved for open guarantees and obligations, as a hex quantity.

**version** `number` *required*

Increases each time the record changes.

**updated\_at** `number` *required*

Unix seconds.

```bash cURL theme={null}
curl "https://base.sepolia.api.4mica.io/core/users/0x1111111111111111111111111111111111111111/assets/0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```

```javascript title="Fetch" theme={null}
const response = await fetch("https://base.sepolia.api.4mica.io/core/users/0x1111111111111111111111111111111111111111/assets/0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f", {
  headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
});
console.log(await response.json());
```

```python Python theme={null}
import os
import requests
url = "https://base.sepolia.api.4mica.io/core/users/0x1111111111111111111111111111111111111111/assets/0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f"
print(requests.get(url, headers={"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}"}).json())
```

```json 200 OK theme={null}
{
  "user_address": "0x1111111111111111111111111111111111111111",
  "asset_address": "0xba50Cd2A20f6DA35D788639E581bca8d0B5d4D5f",
  "total": "0x989680",
  "locked": "0x186a0",
  "version": 12,
  "updated_at": 1796292000
}
```

```json 200 No record theme={null}
null
```

```json 401 Unauthorized theme={null}
{ "error": "missing scope" }
```

## Status codes

| Code | Description |
| - | - |
| `200` | The balance, or `null`. |
| `400` | An address is malformed. |
| `401` | The bearer token is missing or invalid, lacks `payment:read`, or belongs to another wallet. |
| `500` | Core could not load the balance. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.