API for interacting with Bare Bitcoin. Most endpoints require authentication. Create API keys here. Read about API authentication here.
curl -i -X GET \
'https://api.bb.no/v1/deposit-destinations/bitcoin?accountId=string' \
-H 'x-bb-api-hmac: YOUR_API_KEY_HERE' \
-H 'x-bb-api-key: YOUR_API_KEY_HERE' \
-H 'x-bb-api-nonce: YOUR_API_KEY_HERE'
{ "onchainAddress": { "destination": "string", "network": "NETWORK_UNSPECIFIED" }, "lightningAddress": { "destination": "string", "network": "NETWORK_UNSPECIFIED" }, "lnurlPay": { "destination": "string", "network": "NETWORK_UNSPECIFIED" } }
The currency the invoice is denominated in. Once created, the invoice is for a specific amount of bitcoin.
Public description of the invoice. Shown to both the creator and the recipient of the invoice. This is the so-called "memo" field of the Lightning invoice.
curl -i -X POST \
https://api.bb.no/v1/deposit-destinations/bitcoin/invoice \
-H 'Content-Type: application/json' \
-H 'x-bb-api-hmac: YOUR_API_KEY_HERE' \
-H 'x-bb-api-key: YOUR_API_KEY_HERE' \
-H 'x-bb-api-nonce: YOUR_API_KEY_HERE' \
-d '{
"accountId": "string",
"currency": "CURRENCY_UNSPECIFIED",
"amount": 0.1,
"publicDescription": "string",
"internalDescription": "string"
}'
{ "depositDestinationId": "string", "invoice": "string" }
curl -i -X GET \
'https://api.bb.no/v1/deposit-destinations/bitcoin/invoice/{id}' \
-H 'x-bb-api-hmac: YOUR_API_KEY_HERE' \
-H 'x-bb-api-key: YOUR_API_KEY_HERE' \
-H 'x-bb-api-nonce: YOUR_API_KEY_HERE'
{ "depositDestinationId": "string", "invoice": "string", "status": "INVOICE_STATUS_UNSPECIFIED" }
The bitcoin destination to send funds to. Supported formats:
The amount to send. This field is required for all destinations except Lightning invoices. If the destination is a Lightning invoice, the amount is derived from the invoice.
Marks the transaction as a payment. This has consequences for how the transaction is exported for tax purposes. It has no effect on the bitcoin transaction itself.
curl -i -X POST \
https://api.bb.no/v1/withdrawals/bitcoin \
-H 'Content-Type: application/json' \
-H 'x-bb-api-hmac: YOUR_API_KEY_HERE' \
-H 'x-bb-api-key: YOUR_API_KEY_HERE' \
-H 'x-bb-api-nonce: YOUR_API_KEY_HERE' \
-d '{
"destination": "string",
"amountBtc": 0.1,
"accountId": "string",
"isPayment": true,
"description": "string"
}'
{ "withdrawalId": "string", "network": "NETWORK_UNSPECIFIED", "status": "WITHDRAWAL_STATUS_UNSPECIFIED" }
curl -i -X GET \
'https://api.bb.no/v1/withdrawals/bitcoin/{withdrawalId}' \
-H 'x-bb-api-hmac: YOUR_API_KEY_HERE' \
-H 'x-bb-api-key: YOUR_API_KEY_HERE' \
-H 'x-bb-api-nonce: YOUR_API_KEY_HERE'
OK
The network this withdrawal was sent on.
The value of the BTC that was withdrawn, in NOK equivalent at time of withdrawal.
The status of the withdrawal.
{ "withdrawalId": "string", "destination": "string", "network": "NETWORK_UNSPECIFIED", "amountBtc": 0.1, "amountNok": 0.1, "status": "WITHDRAWAL_STATUS_UNSPECIFIED", "createdAt": "2019-08-24T14:15:22Z", "sentAt": "2019-08-24T14:15:22Z" }