> A bolsix.io page, as Markdown. Index of every page: https://bolsix.io/llms.txt
> Connecting Bolsix to an agent? Follow https://bolsix.io/agent-quickstart.md
> Source: https://bolsix.io/docs/authentication

Get started

# Authentication

Use the hosted MCP server, signed in through the browser, when a person works with an agent. Use a REST API key for anything that runs on its own. The keyless demo is for trying the API.

## Which to use

| Access       | For                                                                                                                                                                                                                              | Auth                                                                                            | Production |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------- |
| Hosted MCP   | Interactive sessions: a person working with an agent in Claude, ChatGPT, Codex, Cursor, VS Code, Gemini CLI or Windsurf. The OAuth session belongs to the person who signed in. Don't use it from servers, scheduled jobs or CI. | Browser OAuth. No key; the first sign-in creates a free account.                                | no         |
| REST API     | Production: backends, scheduled jobs, CI, and any application code.                                                                                                                                                              | API key in Authorization: Bearer bx\_live\_… (or X-API-Key), read from an environment variable. | yes        |
| Keyless demo | Trying the API: PETR4, VALE3, ITUB4 and HGLG11 on quote, prices, fundamentals and dividends.                                                                                                                                     | None. 100 requests per client IP per UTC day.                                                   | no         |

## REST: keyless demo

Without a key, the demo allows PETR4, VALE3, ITUB4 and HGLG11 on the quote, prices, fundamentals and dividends endpoints, up to 100 requests per client IP per UTC day. Responses include `X-Bolsix-Demo: true`.

```
curl "https://api.bolsix.io/v1/stocks/quote?symbols=PETR4,VALE3"
```

## REST: Bearer API key

Use a key for other tickers or endpoints. Send the key in the `Authorization` header, or in an `X-API-Key` header. A key in the query string (`?token=`) is not accepted: the request is refused with `400 unknown_parameter`, because URLs end up in logs.

```
Authorization: Bearer bx_live_...
```

## Hosted MCP: OAuth

Compatible clients discover the protected resource, open a browser login, and request the `read` scope. Bolsix verifies the token audience and maps the identity to the account's own connector key (listed as “Claude connector” on the Overview page). A watchlist belongs to the key that set it, so the one an MCP client sets is the connector key's, separate from your REST keys'. MCP calls count against the account's quota, shared with its API keys.

```
claude mcp add --transport http bolsix https://mcp.bolsix.io/
```

## Rate limits

Free accounts allow 5,000 requests per UTC month and 200 per UTC day; Pro and Scale have a monthly allowance and no daily cap. The limits are shared by all of an account's keys. Authenticated responses include `X-RateLimit-*` headers for the window with the least room left (the day or the month; extra requests count toward the month) and `X-RateLimit-Monthly-*` headers for the month; `X-Extra-Requests-Remaining` appears when you hold extra requests. An account with neither a daily nor a monthly limit gets none of these headers. A spent daily limit returns `429 quota_exceeded`, a spent month returns `429 monthly_quota_exceeded`, both with a `Retry-After` header. On Pro, extra requests keep calls going after the month's allowance; they are used after it and never expire. The keyless demo has its separate 100-request-per-IP daily limit above.

```
X-RateLimit-Limit: 200
X-RateLimit-Remaining: 197
X-RateLimit-Reset: 1790812800
X-RateLimit-Monthly-Limit: 5000
X-RateLimit-Monthly-Remaining: 4712
X-RateLimit-Monthly-Reset: 1790812800
```

## What counts against the quota

Limits belong to the account, not to a key: every key you create, and every MCP session, draws from the same allowance. The free plan allows 5,000 requests per UTC month and 200 per UTC day; Pro and Scale have a monthly allowance and no daily cap. A request counts when the API accepts it.

### Counts

* Every REST request that reaches an endpoint with a valid key, including one that returns 404 (an unknown ticker is a real lookup).
* Every API request an MCP tool makes on your behalf: one per tool call for most tools (see below).
* Each page of a paginated result.

### Doesn't count

* A request refused with 429 because the quota is spent.
* A request with a missing, invalid or inactive key (401).
* A request rejected for an unknown query parameter (400).
* A request that fails validation (422): a value outside its range or allowed set, or a malformed date.
* Keyless demo requests, which have their own 100-per-IP daily limit; there, every admitted request counts, including a 422.
* Feedback reports (POST /v1/feedback), which have their own 100-per-key daily limit.

Every MCP tool makes one API request per call, except:

| compare\_stocks   | 3–6 | fundamentals for each of the 2–5 tickers, plus one quote request |
| ----------------- | --- | ---------------------------------------------------------------- |
| get\_fii\_summary | 4   | quote, fundamentals, distributions and portfolio                 |

## Errors

Every error has the same envelope. Branch on `error_code`, which stays fixed when message wording changes; `suggested_action` says what to do next, and `request_id` identifies the request if you report it.

```
{ "status": "error", "code": 429, "error_code": "quota_exceeded",
  "message": "Daily limit of 200 requests reached. It resets at ...",
  "suggested_action": "The account's daily quota is spent. Wait until X-RateLimit-Reset ...",
  "request_id": "...", "retryable": true, "retry_after": 3600 }
```

| Status | error\_code                | What to do                                                                                                                                                                                                                                                                                           |
| ------ | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 400    | unknown\_parameter         | Remove or rename the parameters listed in unknown\_params; the message lists the ones this endpoint accepts.                                                                                                                                                                                         |
| 400    | invalid\_parameter         | Fix the parameter named in the message; it lists the valid values where there is a fixed set.                                                                                                                                                                                                        |
| 422    | validation\_error          | Fix each field listed in errors. Ratios and yields are decimals (0.15 = 15%); dates are YYYY-MM-DD.                                                                                                                                                                                                  |
| 401    | missing\_api\_key          | Send Authorization: Bearer <key>. Without a key only the keyless demo works; create a free key at https://bolsix.io/auth/signup.                                                                                                                                                                     |
| 401    | invalid\_api\_key          | Check the key for typos or revocation; create a new one at https://bolsix.io/auth/signup.                                                                                                                                                                                                            |
| 403    | forbidden                  | This account is disabled; contact api@bolsix.io.                                                                                                                                                                                                                                                     |
| 404    | not\_found                 | Check the symbol or identifier. GET /v1/stocks/list?name=... (MCP: list\_stocks) finds tickers; the dataset may not cover this one.                                                                                                                                                                  |
| 404    | ticker\_renamed            | Retry with the current symbol in renamed\_to.                                                                                                                                                                                                                                                        |
| 404    | asset\_class\_not\_covered | The symbol is valid, but Bolsix does not serve this data for its asset\_class (in the body). The message says what is covered instead; don't retry with another spelling.                                                                                                                            |
| 404    | NOT\_A\_COMPANY            | The symbol is a fund, ETF, BDR or index (asset\_class says which), not a CVM-registered company, so it has no company filings or results calendar. The message says where its data is: for an FII, GET /v1/fii/portfolio (MCP: get\_fii\_summary), /v1/stocks/fundamentals and /v1/stocks/dividends. |
| 409    | WATCHLIST\_FULL            | A watchlist holds at most 200 symbols and nothing was added. Remove some first (POST /v1/watchlist/remove, MCP: remove\_from\_watchlist) or add fewer.                                                                                                                                               |
| 429    | quota\_exceeded            | The account's daily quota is spent. Wait until X-RateLimit-Reset (00:00 UTC); retrying sooner fails. To lift it, give the user upgrade.url from the response; they choose a plan there, never the agent.                                                                                             |
| 429    | monthly\_quota\_exceeded   | The account's monthly allowance is spent. Give the user upgrade.url from the response: signed in, they can buy extra requests (Pro) or move to a larger plan there, never the agent. Otherwise wait for X-RateLimit-Reset (00:00 UTC on the 1st).                                                    |
| 429    | demo\_limit\_exceeded      | The keyless demo's daily limit is spent. Create a free key at https://bolsix.io/auth/signup.                                                                                                                                                                                                         |
| 429    | feedback\_limit\_exceeded  | This key has sent 100 feedback reports today. Send more after 00:00 UTC.                                                                                                                                                                                                                             |
| 409    | webhook\_limit\_exceeded   | This API key has its maximum of 5 webhooks. Delete one (DELETE /v1/webhooks/{webhook\_id}) first.                                                                                                                                                                                                    |
| 405    | method\_not\_allowed       | Use one of the methods in the response's Allow header.                                                                                                                                                                                                                                               |
| 502    | upstream\_unavailable      | A source such as BCB is temporarily unavailable. Retry with backoff (1s, 2s, 4s).                                                                                                                                                                                                                    |
| 500    | internal\_error            | Retry once. If it persists, report the request\_id to api@bolsix.io.                                                                                                                                                                                                                                 |
