---
title: "Total balance of a bucket"
method: GET
path: "/buckets/{bucket}/balance"
tags: ["Buckets"]
---

# Total balance of a bucket

`GET /buckets/{bucket}/balance`

## Request

- Base URL: `https://sochain.com/api/v3`
- URL: `https://sochain.com/api/v3/buckets/{bucket}/balance`
- Auth: one of:
  - API key in header `API-KEY`
  - API key in query parameter `api_key`

Confirmed and unconfirmed, for every address in it; with height or time, the confirmed total at that point (and with members=true each address's). One request.

## Path parameters

- `bucket` string, required: Letters, numbers, - and _, up to 64 characters. Unique within your account.

## Query parameters

- `height` integer
- `time` string
- `members` boolean

## Response `200`

Success.

- object
  - `status` 'success', required
  - `data` union, required
    - BucketBalance
      - `bucket` string, required: Letters, numbers, - and _, up to 64 characters. Unique within your account.
      - `network` 'BTC' | 'LTC' | 'DOGE' | 'ZEC' | 'BTCTEST' | 'LTCTEST' | 'DOGETEST' | 'ZECTEST', required
      - `num_addresses` integer, required
      - `funded_addresses` integer: Addresses holding a confirmed balance.
      - `confirmed` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `unconfirmed` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `version` integer, required
      - `tip_height` integer: The newest block when the answer was made.
    - BucketBalanceAt: The bucket's confirmed total at a past point (with height or time), for the addresses in it now.
      - `bucket` string, required: Letters, numbers, - and _, up to 64 characters. Unique within your account.
      - `network` 'BTC' | 'LTC' | 'DOGE' | 'ZEC' | 'BTCTEST' | 'LTCTEST' | 'DOGETEST' | 'ZECTEST', required
      - `confirmed` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `height` integer, nullable, required
      - `time` integer, nullable, required
      - `block_hash` string, nullable, required
      - `num_addresses` integer, required
      - `funded_addresses` integer, required: Addresses that held a balance then.
      - `version` integer
      - `members` object[]: With members=true: each address's confirmed balance then.
        - `address` string, required
        - `confirmed` string, required: An exact decimal amount of coins with 8 decimals. Signed amounts may start with '-'. Parse as an integer of the smallest unit, not a float.
      - `tip_height` integer: The newest block when the answer was made.

## Other responses

- `400`: A bad parameter or body; the message says which.
- `401`: An invalid key, no key where one is needed (buckets, webhooks, /account_info), a locked account or expired plan, or both the month's requests and the keyless rate used up. Kept as 401, with this message, for v3 compatibility.
- `404`: Not found.
- `503`: Briefly unavailable; retry with backoff. May carry Retry-After.

---

[API](https://skmtc.dev/sochain/apis/sochain-api.md) · [All operations](https://skmtc.dev/sochain/apis/sochain-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sochain/apis/sochain-api/revisions/80682797b38f?raw)
