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

# Authentication

> Send your API key as a bearer token.

```bash theme={null}
curl -s -H "Authorization: Bearer $KEY" \
  "https://api.fomoscan.sh/v3/traders/lookup?handle=tradername"
```

`X-Api-Key: $KEY` works as an alternative header. A key in the query string does
not count. v2 keys work on v3 with the same scopes: `basic` covers REST and the
stream, `http:read` REST only and `live:read` the stream only.

A missing, unknown, revoked or expired key returns `401 UNAUTHENTICATED`.

> [!WARNING]
>
> Keep the key on your server. The browser `WebSocket` constructor cannot set
> headers, and a key shipped to a browser is a key anyone can read.

## Requests and responses

* REST calls go to `https://api.fomoscan.sh`. The stream has its own host:
  [Live posts](https://docs.fomoscan.sh/v3/websocket/overview.md).
* A request body is JSON sent with `Content-Type: application/json`. A body with
  another content type, or with none, answers `400`.
* Every response carries `X-Request-Id`, the id of the request in our logs.
  Quote it when you write to us.
* `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` report the
  per-minute window of the key. A key without a limit gets none of them.
* Inside v3 every change is additive: a new optional field, kind, platform or
  block. Skip what you do not know. Removing, renaming or retyping a field needs
  a new major version.

## Your key

`GET /v3/me` describes the calling key: plan, scopes, `api.ratePerMinute`, and
the month's counters, including `api.unitsRemaining`, `api.revealsUsed` and
`api.revealsRemaining`. It costs nothing, and it reports the same balance as
`GET /v2/me`.


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