# Quickstart

The production base URL is `https://api.bb.no`. Examples on this site do not run
automatically.

## Fetch the current price

Public market data does not require credentials.

```sh
curl --fail-with-body 'https://api.bb.no/v1/price/nok'
```

See [BTC/NOK prices](https://barebitcoin.no/developers/api/market-data/price) for the response fields
and the optional NOK amount parameter.

## Create an API key

Sign in and open [API keys](https://barebitcoin.no/innlogget/profil/nokler).
Create a key for this integration. Enable trading or withdrawal permissions only
if your integration needs them. Keep the key and secret outside source control.

## Read your accounts

Set `BB_API_KEY` in your environment to the complete key, including its
`bb/public/` prefix. Listing accounts requires no nonce or signature.

```sh
curl --fail-with-body 'https://api.bb.no/v1/user/bitcoin-accounts' \
  -H "x-bb-api-key: $BB_API_KEY"
```

The response contains an array of
[BitcoinAccount](https://barebitcoin.no/developers/models/BitcoinAccount) objects. Use the account ID
when directing a transaction to a specific account.

## Next steps

Read [API keys and signing](https://barebitcoin.no/developers/authentication/api-keys) before
submitting orders or withdrawals. For an integration acting on behalf of other
users, see [OAuth](https://barebitcoin.no/developers/authentication/oauth).


Source: https://barebitcoin.no/developers/quickstart
