> ## Documentation Index
> Fetch the complete documentation index at: https://docs.burokku.app/llms.txt
> Use this file to discover all available pages before exploring further.

# REST API

> The Burokku REST API v1: base URL, authentication, answers and the reference for every endpoint.

```text theme={null}
https://api.burokku.app/v1
```

The REST API has the same nine operations as the [connector](https://docs.burokku.app/ai-apps/overview.md), with the same inputs and answers. Use it from your own scripts, servers and apps.

## Authenticate

Send an [API key](https://docs.burokku.app/developers/authentication.md#api-keys) or an [OAuth access token](https://docs.burokku.app/developers/authentication.md#oauth-2-1) issued for `https://api.burokku.app/v1` as a bearer token. A token issued for the connector is refused with `401`.

```bash theme={null}
curl https://api.burokku.app/v1/holdings?symbol=ETH \
  -H "Authorization: Bearer $BUROKKU_API_KEY"
```

The API reads no cookies. It answers CORS requests from any origin, without credentials, so the playground on these pages can call it with your key. Keep keys on a server in your own apps.

## Requests

* **Reads** are `GET`, with inputs as query parameters.
* **The two writes** are `POST`, with a JSON body (`Content-Type: application/json`).
* Inputs are checked before anything runs. A bad one is a `400` with `bad-input`, naming each field.
* **Errors** are `{"error": {"code", "message"}}`, with the message in the language `Accept-Language` asks for, or English.

## Answers

* **JSON**, with money in US dollars (`*_usd`) and percentages as numbers (`12.5` is 12.5%).
* **`currency`** is your account's currency and its units per dollar, to convert the figures.
* **`read_at`** is when the figures were read, and **`refreshing`** is true while Burokku reads your accounts again behind the answer.
* **Accounts and alerts carry stable opaque ids** (`id`, `account_id`), and addresses are given in full. Pass an account's id as `account` to filter by it.

## The endpoints

| Method and path | Operation |
| - | - |
| `GET /v1/portfolio` | [Portfolio summary](https://docs.burokku.app/developers/mcp.md#portfolio_summary) |
| `GET /v1/holdings` | [Holdings](https://docs.burokku.app/developers/mcp.md#holdings) |
| `GET /v1/positions` | [Positions](https://docs.burokku.app/developers/mcp.md#positions) |
| `GET /v1/risk/liquidation` | [Liquidation risk](https://docs.burokku.app/developers/mcp.md#liquidation_risk) |
| `GET /v1/pnl` | [Profit and loss](https://docs.burokku.app/developers/mcp.md#pnl) |
| `GET /v1/activity` | [Activity](https://docs.burokku.app/developers/mcp.md#activity) |
| `GET /v1/alerts` | [Alerts](https://docs.burokku.app/developers/mcp.md#list_alerts) |
| `POST /v1/alerts` | [Create a price alert](https://docs.burokku.app/developers/mcp.md#create_price_alert) |
| `POST /v1/accounts/watch` | [Watch an address](https://docs.burokku.app/developers/mcp.md#add_watch_address) |

Each has a page in this section with its full schema and a playground. The OpenAPI 3.1 document is [`openapi.json`](https://docs.burokku.app/openapi.json).

See [Limits and errors](https://docs.burokku.app/developers/limits-and-errors.md) for rate limits, error codes, pagination and versioning.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.