Balance by Stake Key
GET /v1/assets/balance/stake/:stakeKey
Get the total balance (lovelace and native assets) for addresses containing a given stake key.
WARNING
Assets on stake credential does not mean ownership of the assets. It can be used for easier grouping of addresses/assets, but ownership is defined by payment credential.
Parameters:
| Parameter | Type | Description |
|---|---|---|
stakeKey | string | The stake key (bech32 stake1... or 56 hex characters) |
Query Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
groupByPolicy | boolean | false | If true, groups assets by policy ID |
Example Request:
bash
# Using bech32 stake address
curl -X GET "https://api.fireblocks.partners.iagon.com/v1/assets/balance/stake/stake1u9yy380n3yrnn0ap2uaq8cx5vspm5qqr77c3f9f7qqxf4ugev3aru" \
-H "Authorization: Bearer YOUR_API_KEY"
# Using hex stake credential
curl -X GET "https://api.fireblocks.partners.iagon.com/v1/assets/balance/stake/48489df3890739bfa1573a03e0d46403ba0003f7b114953e000c9af1" \
-H "Authorization: Bearer YOUR_API_KEY"
# With groupByPolicy
curl -X GET "https://api.fireblocks.partners.iagon.com/v1/assets/balance/stake/stake1u9yy380n3yrnn0ap2uaq8cx5vspm5qqr77c3f9f7qqxf4ugev3aru?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}} |
