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

# Leaderboards and stats

> Read what coins, creators, donors, configs, charities and campaigns have given or received

Every total in the API answers a different question. Pick the row that matches yours. All of them
are on `https://api.donate.gg/api/v2`.

| You want | Call | Key |
| - | - | - |
| Donating coins, ranked, with who they reached | `GET /v2/coins` | Optional |
| Coin creators, ranked | `GET /v2/coin-creators` | Optional |
| What one coin has donated | `GET /v2/coins/{chainId}/{address}`, field `stats` | Optional |
| The same, broken down by config | `GET /v2/coins/{chainId}/{address}/stats` | Optional |
| Charities, ranked by what they have received | `GET /v2/charities?sort=raised` | Optional |
| What one charity has received | `GET /v2/charities/{charityId}`, field `stats` | Optional |
| What one campaign has raised | `GET /v2/campaigns/{campaignId}`, field `stats` | Optional |
| What one of your configs has received | `GET /v2/configs/{configId}/stats` | Required |
| The top donors to one of your configs | `GET /v2/configs/{configId}/donors` | Required |
| The coins donating through your donation source | `GET /v2/donation-sources/{chainId}/{address}/coins` | Required |

## One total, everywhere

Wherever a total appears it is the same `stats` object:

```json theme={null}
{
  "totalUsdE6": "181242751330",
  "pendingUsdE6": "0",
  "settledUsdE6": "181242751330",
  "donationCount": 423,
  "pendingCount": 0,
  "settledCount": 423,
  "firstDonationAt": "2026-04-29T18:02:19.000Z",
  "lastDonationAt": "2026-10-28T04:16:10.000Z"
}
```

Show `totalUsdE6`. It is US dollars times 10^6 in a string, so `"181242751330"` is \$181,242.75.
[Totals](https://docs.donate.gg/api/pagination-and-formats.md#totals) explains every field, and
[Lists](https://docs.donate.gg/api/pagination-and-formats.md#lists) how the ranked lists below page.

## Donating coins

[`GET /v2/coins`](https://docs.donate.gg/api-reference/coins/list) ranks the coins whose fees donate to charities and
campaigns. It is Donate's own public list, and it does not hold every coin of every donation
source. For the coins of your own source, use [the keyed list](#your-donation-source).

```bash theme={null}
curl "https://api.donate.gg/api/v2/coins?limit=2"
```

The answer is `{ "items": [...], "nextCursor": ... }`. One item, as an example:

```json theme={null}
{
  "chainId": 101,
  "address": "2ssMotVbTUfRJev2UnibHzHsoeszPzgwbfsTZPSHpump",
  "name": "Make A Wish",
  "symbol": "Wish",
  "decimals": 6,
  "imageUrl": null,
  "creatorAddress": "Ce74gzQGh9u1cg18oGbriCHmFtryfK8imT1GmmpWSqjs",
  "hidden": false,
  "rank": 2,
  "stats": {
    "totalUsdE6": "181242751330",
    "pendingUsdE6": "0",
    "settledUsdE6": "181242751330",
    "donationCount": 423,
    "pendingCount": 0,
    "settledCount": 423,
    "firstDonationAt": "2026-04-29T18:02:19.000Z",
    "lastDonationAt": "2026-10-28T04:16:10.000Z"
  },
  "fundedBeneficiaries": [{ "type": "charity", "id": "9b4dae4e-d8c1-4322-a594-35a4858296b2" }]
}
```

| Field | Meaning |
| - | - |
| `chainId`, `address` | The coin. Together they are its id |
| `name`, `symbol`, `imageUrl` | How to show it. Each can be `null`: show your own fallback |
| `creatorAddress` | The wallet credited for the coin |
| `rank` | The coin's position in the list you asked for, with your `sort` and filters |
| `stats` | What the coin has donated to charities and campaigns |
| `fundedBeneficiaries` | The charities and campaigns its donations have reached, as references |

| Parameter | Values |
| - | - |
| `sort` | `raised` (default) ranks by `stats.totalUsdE6`; `recent` by `stats.lastDonationAt` |
| `beneficiaryType` | `charity` or `campaign`: only coins that have donated to one |
| `beneficiarySource` | `donate` or `tiltify`: only coins that have donated to campaigns from this source. Needs `beneficiaryType=campaign` |
| `limit` | 1 to 100. Default 25 |
| `cursor` | The `nextCursor` of the previous page, with the same `sort` and filters |

* **With a filter, the numbers are filtered too.** `stats`, `rank` and `fundedBeneficiaries` count
  only what reached the matching beneficiaries.
* **`fundedBeneficiaries` is history.** It is who the coin's past donations reached. Who it pays
  from now on is the `config` of the coin itself: see
  [Show what a coin donates to](https://docs.donate.gg/guides/coin-page.md).
* **Names come from one more request.** Collect the references of a page, drop the repeats, and
  send them to [`GET /v2/beneficiaries/lookup?ids=`](https://docs.donate.gg/api-reference/beneficiaries/list-by-ids), at most 100 in a
  request.
* **A donation paid to a person directly is not counted in this list.** The read of one coin
  counts everything.

## Coin creators

[`GET /v2/coin-creators`](https://docs.donate.gg/api-reference/coins/coin-creators/list) ranks the wallets whose coins
have donated the most.

```bash theme={null}
curl "https://api.donate.gg/api/v2/coin-creators?limit=2"
```

One item, as an example:

```json theme={null}
{
  "rank": 2,
  "creator": {
    "chainId": 101,
    "address": "Ce74gzQGh9u1cg18oGbriCHmFtryfK8imT1GmmpWSqjs",
    "name": null,
    "imageUrl": null,
    "url": null
  },
  "stats": {
    "totalUsdE6": "181242751330",
    "pendingUsdE6": "0",
    "settledUsdE6": "181242751330",
    "donationCount": 423,
    "pendingCount": 0,
    "settledCount": 423,
    "firstDonationAt": "2026-04-29T18:02:19.000Z",
    "lastDonationAt": "2026-10-28T04:16:10.000Z"
  }
}
```

`creator` is a wallet with the name and image it is shown with when it has them. `name`,
`imageUrl` and `url` are `null` for a wallet nobody has named: show the `address`. `url` is the
owner's page on donate.gg when there is one. The list takes `limit` (1 to 100, default 25) and
`cursor`.

## One coin

The coin read carries the coin's `stats` and its `rank`.
[`GET /v2/coins/{chainId}/{address}/stats`](https://docs.donate.gg/api-reference/coins/get-stats) adds the breakdown by
config.

```bash theme={null}
curl "https://api.donate.gg/api/v2/coins/101/2ssMotVbTUfRJev2UnibHzHsoeszPzgwbfsTZPSHpump/stats"
```

An example answer:

```json theme={null}
{
  "rank": 2,
  "stats": {
    "totalUsdE6": "181242751330",
    "pendingUsdE6": "0",
    "settledUsdE6": "181242751330",
    "donationCount": 423,
    "pendingCount": 0,
    "settledCount": 423,
    "firstDonationAt": "2026-04-29T18:02:19.000Z",
    "lastDonationAt": "2026-10-28T04:16:10.000Z"
  },
  "configs": [
    {
      "configId": "0x99fbb793f984a8c5f06693e13af3a2629479beac1c38169ec8b601faad71bce9",
      "current": true,
      "stats": {
        "totalUsdE6": "181242751330",
        "pendingUsdE6": "0",
        "settledUsdE6": "181242751330",
        "donationCount": 423,
        "pendingCount": 0,
        "settledCount": 423,
        "firstDonationAt": "2026-04-29T18:02:19.000Z",
        "lastDonationAt": "2026-10-28T04:16:10.000Z"
      },
      "volumes": [
        {
          "chainId": 101,
          "tokenAddress": "So11111111111111111111111111111111111111112",
          "amountAtomic": "2168403305040"
        }
      ]
    }
  ]
}
```

* `configs` has one entry for each config the coin has donated through. `current` is `true` on the
  one it pays now. No entry is current for a coin that pays no config now.
* `volumes` is what was donated in each token before conversion, in that token's smallest unit.
  `2168403305040` lamports is about 2,168.4 SOL.
* `rank` is the coin's place among visible coins by everything they have donated, or `null` for a
  hidden coin.
* Both reads answer `404` for an address that pays no config and has donated nothing, and for a
  chain other than Solana (`101`), and `503` when the chain cannot be read.

## Hidden coins

Donate can keep a coin out of its public lists.

* `GET /v2/coins` never includes a hidden coin.
* A hidden coin can still be read by address. It has `hidden: true` and `rank: null`.
* A name or an image Donate does not show is not published. A coin hidden for its image has
  `imageUrl: null`. A coin hidden for its name has `name: null` and `symbol: null`, and where it
  is the `token` of a donation or a message, that `symbol` is `null` too.
* The list of your own donation source includes your hidden coins, and counts them in `rank`.
* Hiding never changes amounts, counts or dates.

## Your configs

These need your key and work only for configs your project created. Another project's config
answers `403` with `FORBIDDEN`, and an id that names no config `404`.

```bash theme={null}
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID/stats" \
  -H "donate-api-key: $DONATE_API_KEY"
```

[`GET /v2/configs/{configId}/stats`](https://docs.donate.gg/api-reference/configs/get-stats) returns the config's totals
and what was donated in each token. An example answer:

```json theme={null}
{
  "stats": {
    "totalUsdE6": "181242751330",
    "pendingUsdE6": "0",
    "settledUsdE6": "181242751330",
    "donationCount": 423,
    "pendingCount": 0,
    "settledCount": 423,
    "firstDonationAt": "2026-04-29T18:02:19.000Z",
    "lastDonationAt": "2026-10-28T04:16:10.000Z"
  },
  "volumes": [
    {
      "chainId": 101,
      "tokenAddress": "So11111111111111111111111111111111111111112",
      "amountAtomic": "2168403305040"
    }
  ]
}
```

```bash theme={null}
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID/donors?limit=50" \
  -H "donate-api-key: $DONATE_API_KEY"
```

[`GET /v2/configs/{configId}/donors`](https://docs.donate.gg/api-reference/configs/list-donors) ranks the wallets that
donated through the config. Each item is `{ "rank", "donor", "stats" }`, where `donor` has the
same five fields as `creator` above. `limit` is 1 to 100 and defaults to 25.

To find a config id, [`GET /v2/configs`](https://docs.donate.gg/api-reference/configs/list) lists every config your
project created, newest first.

## Your donation source

If your project has a registered donation source,
[`GET /v2/donation-sources/{chainId}/{address}/coins`](https://docs.donate.gg/api-reference/coins/donation-sources/list-coins)
ranks the coins donating through it. It needs your key, and a source that is not your project's
answers `404`.

```bash theme={null}
curl "https://api.donate.gg/api/v2/donation-sources/101/$SOURCE_ADDRESS/coins?limit=25" \
  -H "donate-api-key: $DONATE_API_KEY"
```

Each item is a coin with its `rank` and its `stats`: the fields of an item of `GET /v2/coins`
without `fundedBeneficiaries`. Here `stats` is everything the coin has donated. The list takes
`sort` (`raised` or `recent`), `limit` (1 to 100, default 25) and `cursor`.

## How fresh the numbers are

* A coin's total moves when its fees are claimed and donated, which happens in batches.
* A donation counts as pending when it is recorded and as settled when it is paid out.
  `totalUsdE6` is both together.
* Nothing is pushed to you. There are no webhooks; read again when you need a newer number, and
  keep what you read.

## Ranking every charity

[`GET /v2/charities?sort=raised`](https://docs.donate.gg/api-reference/charities/list) pages through every charity
listed on Donate, most raised first. Each item is the charity in full, and its `stats` is the
same object as on the read of one charity.

```bash theme={null}
curl "https://api.donate.gg/api/v2/charities?sort=raised&limit=25"
```

`sort=recent` orders by the latest donation instead. The list has no `rank` field: an item's
place is its position as you page.

## Runnable sequence

```bash theme={null}
# Needs curl and jq.
export DONATE_API_KEY="your key"

# Public lists
curl "https://api.donate.gg/api/v2/coins?limit=2"
curl "https://api.donate.gg/api/v2/coins?beneficiaryType=charity&sort=recent&limit=2"
curl "https://api.donate.gg/api/v2/coin-creators?limit=1"

# One coin, by config; one campaign and one charity, each with its stats
curl "https://api.donate.gg/api/v2/coins/101/2ssMotVbTUfRJev2UnibHzHsoeszPzgwbfsTZPSHpump/stats"
curl "https://api.donate.gg/api/v2/campaigns/cmr2icrm701xu04jxvybvmgwn"
curl "https://api.donate.gg/api/v2/charities/9b4dae4e-d8c1-4322-a594-35a4858296b2"

# Your own configs: list them, then read the totals and the donors of the newest
CONFIG_ID=$(curl -s "https://api.donate.gg/api/v2/configs?limit=1" \
  -H "donate-api-key: $DONATE_API_KEY" | jq -r '.items[0].id')
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID/stats" -H "donate-api-key: $DONATE_API_KEY"
curl "https://api.donate.gg/api/v2/configs/$CONFIG_ID/donors?limit=5" -H "donate-api-key: $DONATE_API_KEY"
```


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