# Get address

Returns balances and transactions of an address. The returned transactions are sorted by block height, newest blocks first.

This method will use `10` [Compute Units](https://docs.validationcloud.io/v1/about/billing).

***

## **Reference:** [**Here**](https://github.com/trezor/blockbook/blob/master/docs/api.md#get-address)

```bash
GET /api/v2/address/<address>[?page=<page>&pageSize=<size>&from=<block height>&to=<block height>&details=<basic|tokens|tokenBalances|txids|txs>&contract=<contract address>&secondary=usd]
```

## **Parameters**

Required parameters

**`address`**- string, required.&#x20;

Example: `bc1q262qeyyhdakrje5qaux8m2a3r4z8sw8vu5mysh`

Optional parameters

* ***`page`***: specifies page of returned transactions, starting from 1. If out of range, Blockbook returns the closest possible page.
* ***`pageSize`***: number of transactions returned by call (default and maximum 1000)
* ***`from`***, *to*: filter of the returned transactions *from* block height *to* block height (default no filter)
* ***`details`***: specifies level of details returned by request (default *`txids`*)
  * ***`basic`***: return only address balances, without any transactions
  * ***`tokens`***: *basic* + tokens belonging to the address (applicable only to some coins)
  * ***`tokenBalances`***: *basic* + tokens with balances + belonging to the address (applicable only to some coins)
  * ***`txids`***: *tokenBalances* + list of txids, subject to *from*, *to* filter and paging
  * ***`txslight`***: *tokenBalances* + list of transaction with limited details (only data from index), subject to *from*, *to* filter and paging
  * ***`txs`***: *tokenBalances* + list of transaction with details, subject to *from*, *to* filter and paging
* ***`contract`***: return only transactions which affect specified contract (applicable only to coins which support contracts)
* ***`secondary`***: specifies secondary (fiat) currency in which the token and total balances are returned in addition to crypto values

## Returns

Example response for a Bitcoin address, *details* set to *txids*:

Note:`balance`,`totalReceived`,`totalSent`,`unconfirmedBalance` are all denominated in satoshis.

```bash
{
	"page": 1,
	"totalPages": 6,
	"itemsOnPage": 1000,
	"address": "bc1q262qeyyhdakrje5qaux8m2a3r4z8sw8vu5mysh",
	"balance": "10834893",
	"totalReceived": "798821786",
	"totalSent": "787986893",
	"unconfirmedBalance": "0",
	"unconfirmedTxs": 0,
	"txs": 5375,
	"txids": [
		"7251593434b9feea3758fff2c954fe442d66226aca546de5cf26f84a683e3fe7",
		"853b96ce540b962fcb95a78fa05ebc5ba2dbc4340ab48dad2e40855962f1695e",
		....
		"f1aef2b95e4d7dfe4307130366e489a751b4a13b85e81422d519380a2a4ec213"
	]
}
```

{% tabs %}
{% tab title="mainnet" %}

```bash
curl https://mainnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE>/api/v2/address/bc1q262qeyyhdakrje5qaux8m2a3r4z8sw8vu5mysh \
 -X GET \
 -H "Content-Type: application/json"
```

{% endtab %}

{% tab title="testnet" %}

```bash
curl https://testnet.bitcoin.validationcloud.io/v1/<YOUR_API_KEY_HERE>/api/v2/address/bc1q262qeyyhdakrje5qaux8m2a3r4z8sw8vu5mysh \
 -X GET \
 -H "Content-Type: application/json"
```

{% endtab %}
{% endtabs %}
