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

# HoodLoot API

The HoodLoot backend exposes a small read-only REST API over Robinhood Chain data — network state, per-wallet stats, the leaderboard, and the ETH/USD price used for tolls.

## Public endpoints

| Method | Path                   | Returns                                            |
| ------ | ---------------------- | -------------------------------------------------- |
| `GET`  | `/health`              | Liveness, mock/live mode, last block seen          |
| `GET`  | `/api/global`          | Emission, halving, supply, burn, network Loot Rate |
| `GET`  | `/api/stats/{address}` | A wallet's tier, Loot Rate, pending $SHARE, roster |
| `GET`  | `/api/leaderboard`     | Top-20 wallets by Loot Rate                        |
| `GET`  | `/api/price`           | ETH/USD (Chainlink) used to value the tolls        |

All responses are JSON. Large integers (wei, block numbers) are returned as **strings** to preserve precision.

### Example

```bash
curl https://hoodloot.com/api/global
```

```json
{
  "blockNumber": "888210",
  "emissionPerBlockWei": "405092592592592640",
  "totalSupplyWei": "8625000000000000000000000",
  "totalBurnedWei": "10125000000000000000000000",
  "ethPriceUsd": 3000
}
```

## Machine-readable spec

The full contract — every endpoint, parameter, and response schema — lives in the OpenAPI 3.0 spec: [`hoodloot-api.yaml`](https://github.com/hoodloot/HoodLoot/blob/main/api/hoodloot-api.yaml).


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.hoodloot.com/api/api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
