# Stellar Pools API
> Read live Stellar liquidity pools — the network's native automated market maker — straight from the public Horizon API, no key. Every Stellar pool is a constant-product market maker between two assets; this surfaces what asset and order-book readers miss: browse the pools with their two reserves, fee, share count and the number of trustlines (participants); read any single pool by its id; or find every pool that holds a given asset, against XLM or another token, to see exactly where a token has on-chain liquidity and at what depth. The automated-market-maker layer for Stellar wallets, anchors, swap UIs, liquidity providers and analytics. Live from the network; short cache only.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/stellarpools-api/..."
```

## Pricing
- **Free** (Free) — 5,400 calls/Mo, 3 req/s
- **Starter** ($12/Mo) — 114,500 calls/Mo, 8 req/s
- **Pro** ($40/Mo) — 723,000 calls/Mo, 20 req/s
- **Business** ($112/Mo) — 4,615,000 calls/Mo, 50 req/s

## Endpoints

### Pools

#### `GET /v1/for-asset` — Pools holding an asset (code=XLM for native)

**Parameters:**
- `code` (query, required, string) — Asset code (XLM for native, or e.g. USDC) Example: `XLM`
- `issuer` (query, optional, string) — Issuer account (required for issued assets)
- `limit` (query, optional, string) — How many (1-200) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stellarpools-api/v1/for-asset?code=XLM&limit=20"
```

**Response:**
```json
{
    "data": {
        "note": "Every liquidity pool that holds this asset as one of its two reserves — use it to see where a token has on-chain AMM liquidity and against what.",
        "asset": "native",
        "count": 20,
        "pools": [
            {
                "id": "ffff7fe3743b3c63b12e80f22aed5e8799aa986e25fe155a19277b660d547e71",
                "type": "constant_product",
                "fee_bp": 30,
                "fee_pct": 0.3,
                "reserves": [
                    {
                        "code": "XLM",
                        "asset": "XLM",
                        "amount": "1.6374287",
                        "issuer": null
                    },
                    {
                        "code": "AAVE",
                        "asset": "AAVE:GDTGN34MKUEO4BTJET4SX6TCRQ72FS2TPDNFO6JDXXVL4PNBSREHD2D5",
                        "amount": "157892432.1726389",
                        "issuer": "GDTGN34MKUEO4BTJET4SX6TCRQ72FS2TPDNFO6JDXXVL4PNBSREHD2D5"
                    }
                ],
                "total_shares": "15653.2744178",
                "total_trustlines": 1,
                "last_modified_ledger": 60027687
            },
            {
                "id": "fffda4cef31fa619b605cbd16973f2ddc1139d766a1856f2ce395bf0e0e96455",
                "type": "constant_product",
                "fee_bp": 30,
                "fee_pct": 0.3,
                "reserves": [
                    {
                        "code": "XLM",
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/pool` — A single liquidity pool by id (omit for the top pool)

**Parameters:**
- `id` (query, optional, string) — Liquidity pool id (64 hex); omit for the top pool

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stellarpools-api/v1/pool"
```

**Response:**
```json
{
    "data": {
        "id": "ffffe478b19c0d27c19fecdf36b6b60fefc563e1806109a58b86b4138abd085a",
        "note": "A single Stellar liquidity pool: its two reserves, fee, shares and trustlines.",
        "type": "constant_product",
        "fee_bp": 30,
        "source": "Stellar Horizon",
        "fee_pct": 0.3,
        "reserves": [
            {
                "code": "LIBRE",
                "asset": "LIBRE:GAYCCWKECNGDRHYU3UTREBD2XLC3CUQN6FV22TKM4WCQER3IWR7TF5CY",
                "amount": "2493.4272764",
                "issuer": "GAYCCWKECNGDRHYU3UTREBD2XLC3CUQN6FV22TKM4WCQER3IWR7TF5CY"
            },
            {
                "code": "NFIUM",
                "asset": "NFIUM:GD76B36XOOH432PICDIVEOD4RU7TEFJ5DZVA2C5MW5LKTSCARK45V3DB",
                "amount": "2948385.4709963",
                "issuer": "GD76B36XOOH432PICDIVEOD4RU7TEFJ5DZVA2C5MW5LKTSCARK45V3DB"
            }
        ],
        "total_shares": "85559.0257965",
        "total_trustlines": 1,
        "last_modified_ledger": 63020560
    },
    "meta": {
        "timestamp": "2026-06-14T08:03:50.795Z",
        "request_id": "5123fffc-5bbb-46b6-8333-11994493fc29"
    },
    "status": "ok",
    "message": "Pool retrieved successfully",
    "success": true
}
```

#### `GET /v1/pools` — Browse liquidity pools with reserves, fee, shares, trustlines

**Parameters:**
- `limit` (query, optional, string) — How many (1-200) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stellarpools-api/v1/pools?limit=20"
```

**Response:**
```json
{
    "data": {
        "note": "Stellar liquidity pools (native constant-product AMMs). Each has two reserves, a fee (fee_pct), the number of pool shares and trustlines (participants).",
        "count": 20,
        "pools": [
            {
                "id": "ffffe478b19c0d27c19fecdf36b6b60fefc563e1806109a58b86b4138abd085a",
                "type": "constant_product",
                "fee_bp": 30,
                "fee_pct": 0.3,
                "reserves": [
                    {
                        "code": "LIBRE",
                        "asset": "LIBRE:GAYCCWKECNGDRHYU3UTREBD2XLC3CUQN6FV22TKM4WCQER3IWR7TF5CY",
                        "amount": "2493.4272764",
                        "issuer": "GAYCCWKECNGDRHYU3UTREBD2XLC3CUQN6FV22TKM4WCQER3IWR7TF5CY"
                    },
                    {
                        "code": "NFIUM",
                        "asset": "NFIUM:GD76B36XOOH432PICDIVEOD4RU7TEFJ5DZVA2C5MW5LKTSCARK45V3DB",
                        "amount": "2948385.4709963",
                        "issuer": "GD76B36XOOH432PICDIVEOD4RU7TEFJ5DZVA2C5MW5LKTSCARK45V3DB"
                    }
                ],
                "total_shares": "85559.0257965",
                "total_trustlines": 1,
                "last_modified_ledger": 63020560
            },
            {
                "id": "ffff7fe3743b3c63b12e80f22aed5e8799aa986e25fe155a19277b660d547e71",
                "type": "constant_product",
                "fee_bp": 30,
                "fee_pct"
…(truncated, see openapi.json for full schema)
```

### Meta

#### `GET /v1/meta` — Service metadata & live sample

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stellarpools-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "pools_sampled": 1
        },
        "source": "public Stellar Horizon API (horizon.stellar.org /liquidity_pools), keyless",
        "service": "stellarpools-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/pool": "A single pool by id (id=...64 hex).",
            "GET /v1/pools": "Browse liquidity pools with reserves, fee, shares, trustlines (limit).",
            "GET /v1/for-asset": "Pools holding an asset (code, issuer; code=XLM for native)."
        },
        "description": "Read live Stellar liquidity pools (the native AMM) from the public Horizon API: browse pools with their reserves/fee/shares/trustlines, read a single pool by id, or find every pool holding a given asset. The automated-market-maker layer for Stellar wallets, swap UIs and analytics. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T08:03:51.103Z",
        "request_id": "1c00261d-da6e-4971-87e9-dd12d0d9d038"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/stellarpools-api
OpenAPI spec: https://www.oanor.com/api/stellarpools-api/openapi.json
