# Stellar Asset API
> Read live data on Stellar assets and the native Stellar DEX, straight from the public Horizon API — no key. Resolve any issued asset (code plus issuer) to its on-chain stats: total authorized supply, number of holding accounts, claimable-balance, liquidity-pool and Soroban-contract amounts, the authorization flags (auth required, revocable, clawback) that tell you how tightly the issuer controls it, and its Soroban contract id. List every issuer of an asset code to survey them and spot impersonators — anyone can issue an asset with any code, so verifying the exact issuer matters. And pull the live order book for an asset against XLM (or any counter asset) on Stellar's built-in decentralized exchange — best bid, best ask and the spread. Distinct from account-, payment- and transaction-level APIs: this is the asset-and-market layer for Stellar wallets, anchors, stablecoin issuers and trading tools. 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/stellarasset-api/..."
```

## Pricing
- **Free** (Free) — 5,300 calls/Mo, 3 req/s
- **Starter** ($12/Mo) — 115,000 calls/Mo, 8 req/s
- **Pro** ($40/Mo) — 725,000 calls/Mo, 20 req/s
- **Business** ($114/Mo) — 4,600,000 calls/Mo, 50 req/s

## Endpoints

### Assets

#### `GET /v1/asset` — Asset stats: supply, holders, flags, contract id

**Parameters:**
- `code` (query, required, string) — Asset code (1-12 alphanumeric) Example: `USDC`
- `issuer` (query, required, string) — Issuer account (G... 56 chars) Example: `GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stellarasset-api/v1/asset?code=USDC&issuer=GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
```

**Response:**
```json
{
    "data": {
        "note": "On-chain stats for the issued asset from Horizon. supply is the total authorized balance; holders is the number of authorized accounts. flags show how the issuer controls the asset.",
        "flags": {
            "auth_required": false,
            "auth_immutable": false,
            "auth_revocable": true,
            "auth_clawback_enabled": false
        },
        "source": "Stellar Horizon",
        "supply": "237989931.6834145",
        "holders": 2232017,
        "asset_code": "USDC",
        "asset_type": "credit_alphanum4",
        "contract_id": "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75",
        "asset_issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
        "num_contracts": 31411,
        "liquidity_pools": "2552155.8032734",
        "contracts_amount": "42090356.8184738",
        "claimable_balances": "21796.2979538",
        "num_liquidity_pools": 1008
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:02.187Z",
        "request_id": "a04a51b0-b82b-43aa-930b-90dbfdb2a71a"
    },
    "status": "ok",
    "message": "Asset retrieved successfully",
    "success": true
}
```

#### `GET /v1/assets` — All issuers of an asset code, sorted by holders

**Parameters:**
- `code` (query, required, string) — Asset code Example: `USDC`
- `limit` (query, optional, string) — Max issuers (1-200) Example: `20`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stellarasset-api/v1/assets?code=USDC&limit=20"
```

**Response:**
```json
{
    "data": {
        "code": "USDC",
        "note": "Issuers of this asset code on the network (up to `limit`, sorted by holders within the returned page). Anyone can issue an asset with any code, so the same code often has many issuers — use this to survey them and spot impersonators; always verify the exact issuer account.",
        "count": 20,
        "limit": 20,
        "assets": [
            {
                "flags": {
                    "auth_required": false,
                    "auth_immutable": false,
                    "auth_revocable": true,
                    "auth_clawback_enabled": false
                },
                "supply": "237989931.6834145",
                "holders": 2232017,
                "asset_code": "USDC",
                "asset_type": "credit_alphanum4",
                "contract_id": "CCW67TSZV3SSS2HXMBQ5JFGCKJNXKZM7UQUWUZPUTHXSTZLEO7SJMI75",
                "asset_issuer": "GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
                "num_contracts": 31411,
                "liquidity_pools": "2552155.8032734",
                "contracts_amount": "42090356.8184738",
                "claimable_balances": "21796.2979538",
                "num_liquidity_pools": 1008
            },
            {
                "flags": {
                    "auth_required": false,
                    "auth_immutable": false,
                    "auth_revocable": false,
                    "auth_clawback_enabled": false
               
…(truncated, see openapi.json for full schema)
```

### DEX

#### `GET /v1/orderbook` — Live DEX order book vs XLM or a counter asset

**Parameters:**
- `code` (query, required, string) — Asset code Example: `USDC`
- `issuer` (query, required, string) — Issuer account (G...) Example: `GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN`
- `counter_code` (query, optional, string) — Counter asset code (omit for XLM)
- `counter_issuer` (query, optional, string) — Counter asset issuer (with counter_code)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/stellarasset-api/v1/orderbook?code=USDC&issuer=GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN"
```

**Response:**
```json
{
    "data": {
        "asks": [
            {
                "price": 5.3724769,
                "amount": 560.6832186
            },
            {
                "price": 5.3753222,
                "amount": 0.1977219
            },
            {
                "price": 5.3774699,
                "amount": 1.5186144
            },
            {
                "price": 5.3783248,
                "amount": 929.6575
            },
            {
                "price": 5.3783303,
                "amount": 0.2348009
            },
            {
                "price": 5.3783827,
                "amount": 929.6475
            },
            {
                "price": 5.3799249,
                "amount": 39.3412946
            },
            {
                "price": 5.3809497,
                "amount": 5
            },
            {
                "price": 5.3831048,
                "amount": 917.6521787
            },
            {
                "price": 5.3832323,
                "amount": 523.84884
            }
        ],
        "bids": [
            {
                "price": 5.3663269,
                "amount": 5000
            },
            {
                "price": 5.3662693,
                "amount": 5000
            },
            {
                "price": 5.3661225,
                "amount": 4476.9351424
            },
            {
                "price": 5.3661199,
                "amount": 8000
            },
            {
                "price": 5.
…(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/stellarasset-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "sample": {
            "code": "USDC",
            "holders": 2232017
        },
        "source": "public Stellar Horizon API (horizon.stellar.org), keyless",
        "service": "stellarasset-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/asset": "Asset stats: supply, holders, flags, contract id (code=USDC, issuer=G...).",
            "GET /v1/assets": "All issuers of an asset code, sorted by holders (code=USDC).",
            "GET /v1/orderbook": "Live DEX order book vs XLM or a counter asset (code, issuer, optional counter_code/counter_issuer)."
        },
        "description": "Read live Stellar asset and native-DEX data from the public Horizon API: resolve any issued asset to its supply, holders, flags and Soroban contract id; list every issuer of a code to find the canonical one; and pull the live order book for an asset against XLM. The asset-and-market layer for Stellar wallets, anchors and trading tools. Live, short cache only.",
        "upstream_status": "ok"
    },
    "meta": {
        "timestamp": "2026-06-14T08:04:02.806Z",
        "request_id": "8f115b6d-b8e7-4379-b245-0aee1957f8cb"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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