> ## 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/v2/user/handle/tradername"
```

`X-Api-Key: $KEY` works as an alternative header. Keys look like `fsk_live_…`
for production and `fsk_test_…` for the sandbox.

A missing or invalid key returns `401 UNAUTHORIZED`.

> [!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.

## Response format

A successful response is the record itself, as flat JSON, with no wrapper to
unwrap. Timestamps on thesis and PnL records are epoch milliseconds.

`GET /v2/me` describes the calling key: plan, scopes,
`entitlement.ratePerMinute`, and usage counters including
`usage.unitsRemaining`, `usage.revealsUsed` and `usage.revealsRemaining`. It
costs nothing.


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