Balance by Credential
GET /v1/assets/balance/credential/:credential
Get the total balance (lovelace and native assets) for a given payment credential.
Parameters:
| Parameter | Type | Description |
|---|---|---|
credential | string | The payment credential (56 hex characters / 28 bytes) |
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
groupByPolicy | boolean | false | If true, groups assets by policy ID |
Example Request:
bash
curl -X GET "https://api.fireblocks.partners.iagon.com/v1/assets/balance/credential/796b1809f61cd4a050bfd631ec127c2db63e074fa0a561848731c41e" \
-H "Authorization: Bearer YOUR_API_KEY"
# With groupByPolicy
curl -X GET "https://api.fireblocks.partners.iagon.com/v1/assets/balance/credential/796b1809f61cd4a050bfd631ec127c2db63e074fa0a561848731c41e?groupByPolicy=true" \
-H "Authorization: Bearer YOUR_API_KEY"Response:
Content-Type: application/json;charset=utf-8
json
{
"success": true,
"data": {
"lovelace": 21839080681,
"assets": {
"87264e48adc75c4472c4e52e80acd36051ca153f42ee339fb04f5a28.957625f0f7805957c527640abe109ca87bb707b187b135e9e1c4b8236b3aacdf": 20000000
}
}
}Response Fields:
| Field | Type | Description |
|---|---|---|
lovelace | number | Total lovelace balance |
assets | object | Native assets. Default: {policy_id.asset_name: quantity}. With groupByPolicy=true: {policy_id: {asset_name: quantity}} |
