> For the complete documentation index, see [llms.txt](https://docs.magna.so/magna-api-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.magna.so/magna-api-documentation/tokens/total-supply.md).

# Total Supply

Users can retrieve the total supply of a token from the Magna platform. This endpoint returns the self-reported total supply from the cap table (the minted supply that the project reports), not the smart contract max supply.\
\
This endpoint is designed for token data provider compatibility (ex. Coinmarketcap) and returns a plain text number for easy integration with external systems.

Access Control:&#x20;

This endpoint requires the `EXTERNAL_STATS_READ` scope, which is more restrictive than full access API keys. You can generate a scoped API key with `EXTERNAL_STATS_READ` permissions from your project settings at `/settings/api-keys` (called "Statistics API Key"). This allows third-party integrations to access token statistics without full project access.

Example request:

```sh
curl -X GET https://app.magna.so/api/external/v1/tokens/{your_token_id}/total-supply?id={your_token_id} \
  -H 'Content-Type: application/json' \
  -H 'x-magna-api-token: magna_project_api_token'
```

* `magna_project_api_token` (required) - replace with your actual Magna API token
* `your_token_id` (required) - with your token id

Response example:

```json
1000000000
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.magna.so/magna-api-documentation/tokens/total-supply.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
