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.
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:readMCP
Also available as the MCP tool list_trades, which takes the parameters below as its arguments.
Parameters
pageSizequery · integerItems per page (max 200). When set to 0, all matching trades are returned, except through MCP, where it defaults to 50.
beforequery · stringTrades 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 · stringPagination 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/jsonShow fields
tradesarray of TradeShow fields
idstringExample: "tr_01HVXHG9PMDKR3YQV4Z8W5T2BN"
accountIdstringThe bitcoin account the trade belongs to.
Example: "acc_01HQZX3V9KJ4M2P8R6T0W5Y7BC"
directionstring · enumValues: DIRECTION_BUY, DIRECTION_SELL
amountNokstringStringified decimal number: the NOK amount paid when buying, or received when selling.
Example: "65000"
amountBtcstringStringified decimal number with 8 decimal places: the BTC amount received when buying, or sold when selling.
Example: "0.10000000"
feeAmountstringStringified decimal number. When the fee is zero, fee_currency may be empty.
Example: "455"
feeCurrencystringExample: "NOK"
createTimestring · date-timeExample: "2024-02-01T10:22:36Z"
hasMorebooleanWhether there are more trades to fetch.
nextBeforestring · date-timePass as 'before' in the next request to fetch the next page.
nextBeforeIdstringPass as 'before_id' in the next request to fetch the next page.