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

# Pools

> Live TVL across MAYAChain, THORChain, Chainflip, and the LEO ecosystem

## Endpoint

```
GET /leokit/explorer/pools
```

No authentication required. Cached for 5 minutes.

## Response

```json theme={null}
{
  "data": {
    "mayachain": {
      "pools": [
        {
          "id": "BTC.BTC",
          "asset": "BTC.BTC",
          "token0": "BTC",
          "token1": "CACAO",
          "chain": "Bitcoin",
          "protocol": "mayachain",
          "tvl_usd": 12480000,
          "volume_24h_usd": 482015.55,
          "price_usd": 98500.45,
          "apy": 0.04,
          "lp_count": 42,
          "status": "available",
          "url": "https://www.mayascan.org/pool/BTC.BTC"
        }
      ],
      "total_tvl": 124800000,
      "cacao_price": 0.42
    },
    "thorchain": { "pools": [...], "total_tvl": 482000000, "rune_price": 4.25 },
    "chainflip": { "pools": [...], "total_tvl": 122000000 },
    "leo":       { "pools": [...] }
  }
}
```

## Section Reference

#### `mayachain` / `thorchain`

| Field                        | Description                                     |
| ---------------------------- | ----------------------------------------------- |
| `pools`                      | Array of `ProtocolPool` (see below)             |
| `total_tvl`                  | Sum of `tvl_usd` across `available` pools (USD) |
| `cacao_price` / `rune_price` | Derived from highest-TVL pool (BTC depth ratio) |

#### `chainflip`

| Field       | Description                                                      |
| ----------- | ---------------------------------------------------------------- |
| `pools`     | Array of `ProtocolPool` from Chainflip RPC + DexScreener pricing |
| `total_tvl` | Sum of `tvl_usd` across pools (USD)                              |

#### `leo`

| Field   | Description                                                             |
| ------- | ----------------------------------------------------------------------- |
| `pools` | LEO/HBD/Hive-Engine pools from a different schema (see `LeoPool` below) |

### `ProtocolPool` Object

| Field            | Type   | Description                                             |
| ---------------- | ------ | ------------------------------------------------------- |
| `id`             | string | Pool identifier (raw asset string)                      |
| `asset`          | string | Same as `id`                                            |
| `token0`         | string | Asset symbol (e.g. `BTC`)                               |
| `token1`         | string | Quote symbol (`RUNE`, `CACAO`, or `USDC` for Chainflip) |
| `chain`          | string | Display chain name (e.g. `Bitcoin`, `BNB Chain`)        |
| `protocol`       | string | `mayachain`, `thorchain`, or `chainflip`                |
| `tvl_usd`        | number | Pool TVL in USD                                         |
| `volume_24h_usd` | number | 24-hour swap volume in USD                              |
| `price_usd`      | number | Asset price in USD                                      |
| `apy`            | number | LP APY (decimal, e.g. `0.04` = 4%)                      |
| `lp_count`       | number | Number of liquidity providers                           |
| `status`         | string | `available`, `staged`, or `suspended`                   |
| `url`            | string | Native explorer link to the pool                        |

### `LeoPool` Object

| Field               | Type   | Description                                     |
| ------------------- | ------ | ----------------------------------------------- |
| `id`                | string | LEO pool identifier                             |
| `name`              | string | Pool display name                               |
| `token0` / `token1` | string | Asset symbols                                   |
| `chain`             | string | Source chain (typically `Hive` for LEO pools)   |
| `dex`               | string | DEX name                                        |
| `tvl_usd`           | number | Pool TVL                                        |
| `volume_24h_usd`    | number | 24-hour volume                                  |
| `price_usd`         | number | Token price                                     |
| `price_change_24h`  | number | 24-hour price change (decimal, can be negative) |
| `url`               | string | Pool URL                                        |

## Caching

`X-Cache: HIT|MISS`. TTL 5 minutes. Source endpoints (Midgard, Chainflip RPC, DexScreener, Hive Engine) all have an 8-second timeout — partial results are returned if any source times out.

## Errors

The endpoint never errors as a unit; if all sources fail you get empty arrays, not a non-200 response.


## OpenAPI

````yaml /api-reference/openapi.json GET /explorer/pools
openapi: 3.0.3
info:
  title: Leokit API
  version: 1.0.0
  description: API reference for Leokit
servers:
  - url: https://api.leokit.dev
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /explorer/pools:
    get:
      summary: Live pool TVL across protocols
      responses:
        '200':
          description: Pool data for MAYAChain, THORChain, Chainflip, and LEO.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExplorerPoolsResponse'
      security:
        - {}
components:
  schemas:
    ExplorerPoolsResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          properties:
            mayachain:
              type: object
              additionalProperties: true
            thorchain:
              type: object
              additionalProperties: true
            chainflip:
              type: object
              additionalProperties: true
            leo:
              type: object
              additionalProperties: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Api-Key
      description: 'Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4'

````