Skip to content
Bare BitcoinDevelopers

Search documentation

↑ ↓ Select · Enter Open · Escape Close

barebitcoin.no ↗
Menu

API reference / Orders

List trades

Lists the user's executed trades, newest first. When hasMore is true, pass nextBefore and nextBeforeId as before and beforeId to fetch the next page.

View Markdown

GET https://api.bb.no/v1/trades

Authentication

API key

Send x-bb-api-key. No nonce or signature is required.

OAuth

Send an access token in Authorization: Bearer.

Required scopes:

api:trades:read
Authentication guide →

MCP

Also available as the MCP tool list_trades, which takes the parameters below as its arguments.

MCP server guide →

Parameters

pageSizequery · integer

Items per page (max 200). When set to 0, all matching trades are returned, except through MCP, where it defaults to 50.

beforequery · string

Trades are listed newest first, so pagination walks backward in time. Only return trades created before this time. Can be used standalone to filter down to an end date; pass next_before from the previous response (together with next_before_id) to fetch the next page.

beforeIdquery · string

Pagination cursor tiebreaker: when multiple trades share the same create_time, this ID breaks the tie. Pass next_before_id from the previous response. Requires 'before'; supplying 'before_id' alone is rejected.

Responses

200 · OK

application/json
ListTradesResponse
Show fields
tradesarray of Trade
Items:
Trade
Show fields
idstring

Example: "tr_01HVXHG9PMDKR3YQV4Z8W5T2BN"

accountIdstring

The bitcoin account the trade belongs to.

Example: "acc_01HQZX3V9KJ4M2P8R6T0W5Y7BC"

directionstring · enum

Values: DIRECTION_BUY, DIRECTION_SELL

amountNokstring

Stringified decimal number: the NOK amount paid when buying, or received when selling.

Example: "65000"

amountBtcstring

Stringified decimal number with 8 decimal places: the BTC amount received when buying, or sold when selling.

Example: "0.10000000"

feeAmountstring

Stringified decimal number. When the fee is zero, fee_currency may be empty.

Example: "455"

feeCurrencystring

Example: "NOK"

createTimestring · date-time

Example: "2024-02-01T10:22:36Z"

hasMoreboolean

Whether there are more trades to fetch.

nextBeforestring · date-time

Pass as 'before' in the next request to fetch the next page.

nextBeforeIdstring

Pass as 'before_id' in the next request to fetch the next page.