---
title: "An address's balance by day, week or month"
method: GET
path: "/balance_history/{network}/{address}"
tags: ["Addresses"]
---

# An address's balance by day, week or month

`GET /balance_history/{network}/{address}`

## Request

- Base URL: `https://sochain.com/api/v3`
- URL: `https://sochain.com/api/v3/balance_history/{network}/{address}`
- Auth: one of:
  - none
  - API key in header `API-KEY`
  - API key in query parameter `api_key`

With what came in and went out in each interval and how many transactions did each. Without an API key at most 2,000 points, with one 20,000.

## Path parameters

- `network` 'BTC' | 'LTC' | 'DOGE' | 'ZEC' | 'BTCTEST' | 'LTCTEST' | 'DOGETEST' | 'ZECTEST', required
- `address` string, required

## Query parameters

- `interval` 'day' | 'week' | 'month'
- `from` string
- `to` string

## Response `200`

Success.

- object
  - `status` 'success', required
  - `data` BalanceHistory, required
    - `address` string, required
    - `interval` 'day' | 'week' | 'month', required
    - `resolution_blocks` integer: 1: every balance exact at its interval's end; 128: a balance can lag it by up to 128 blocks (received and sent are always exact).
    - `exact_resolution` boolean
    - `tx_counts_available` boolean
    - `external_available` boolean: Whether received_external and sent_external are filled in. Not yet: they will be, in this same form.
    - `points` object[], required
      - `t` integer: Interval start (UTC); the last point is the newest block's time.
      - `height` integer, nullable
      - `v` string: 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.
      - `received` string: 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.
      - `sent` string: 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.
      - `tx_in` integer, nullable
      - `tx_out` integer, nullable
      - `received_external` string, nullable: What came in from other addresses, leaving out coins it moved to itself; null while external_available is false.
      - `sent_external` string, nullable: What went out to other addresses, leaving out coins it moved to itself; null while external_available is false.

## 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`: Unknown network, or not an address on it.
- `429`: Without a key, past the day's 2,500 lookups from this IP while SoChain is busy (Retry-After: 60), or past the day's most (Retry-After: seconds to 00:00 UTC). With or without one, too many requests in flight at once (Retry-After: 1, not counted).
- `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)
