# List bitcoin accounts

GET https://api.bb.no/v1/user/bitcoin-accounts

Lists the bitcoin accounts for the user. Each bitcoin account has a
 separate balance. Every bitcoin transaction (withdrawal, deposit, trade,
 bonus payout) affects the balance of exactly one bitcoin account.

## Authentication

x-bb-api-key: Public part of your API key. Starts with `bb/public/`.

Or:

OAuth: Authorization: Bearer <access token>. Required scopes: api:accounts:bitcoin:read.

[API keys and signing](https://barebitcoin.no/developers/authentication/api-keys)

## Parameters

### includeDeleted

query parameter · boolean

Include accounts that have previously been deleted.



## Examples

### API key

```sh
curl -X GET \
  https://api.bb.no/v1/user/bitcoin-accounts \
  -H "x-bb-api-key: $BB_API_KEY"
```


### OAuth

```sh
curl -X GET \
  https://api.bb.no/v1/user/bitcoin-accounts \
  -H "Authorization: Bearer $BB_TOKEN"
```



## Responses

### 200

OK

Example:

```json
{
  "accounts": [
    {
      "id": "acc_01HQZX3V9KJ4M2P8R6T0W5Y7BC",
      "availableBtc": 0.0145,
      "totalBtc": 0.0151,
      "totalNok": 15824.8,
      "name": "Hovedkonto",
      "createTime": "2024-06-03T08:15:42.103948Z"
    },
    {
      "id": "acc_01J2M8RK4XHV7T3N9QW6B5Y0ZD",
      "availableBtc": 0.01,
      "totalBtc": 0.01,
      "totalNok": 10480,
      "name": "Sparekonto",
      "createTime": "2025-01-09T19:02:11.734120Z"
    }
  ],
  "totalBtc": 0.0251,
  "totalNok": 26304.8
}
```

[ListBitcoinAccountsResponse](https://barebitcoin.no/developers/models/ListBitcoinAccountsResponse).

Source: https://barebitcoin.no/developers/api/accounts/bitcoin-accounts


## Model: ListBitcoinAccountsResponse





### accounts

Type: array of BitcoinAccount.





Items: [BitcoinAccount](https://barebitcoin.no/developers/models/BitcoinAccount).

### totalBtc

Type: number · double.

The total BTC balance of all accounts.





### totalNok

Type: number · double.

The total NOK value of the BTC of all accounts,
 at the time of the request.





## Model: BitcoinAccount





### id

Type: string.







### availableBtc

Type: number · double.

The current BTC holdings that can be used for trading or withdrawals.





### totalBtc

Type: number · double.

The BTC balance of the account.





### totalNok

Type: number · double.

The NOK value of the BTC of the account, at the time of the request.





### name

Type: string.

The name of the account.





### createTime

Type: string · date-time.

When this account was created.





### deleteTime

Type: string · date-time.

When this account was deleted.
 Empty if the account is not deleted.



