Developer docs
The Stellar Index API serves verified, per-protocol Stellar pricing and on-chain data over REST + SSE. This page is the quickstart; the full machine-readable contract is the OpenAPI spec.
Base URL & versioning
All endpoints live under a single versioned base. v1 is stable; additive changes bump the minor version, breaking changes the major.
https://api.stellarindex.io/v1curl https://api.stellarindex.io/v1/price?asset=native"e=fiat:USDAuthentication
Public endpoints work without a key (subject to rate limits). An API key raises your limits and is required for account/usage endpoints. Keys are sip_* tokens (legacy rek_* still accepted), minted in the dashboard, and passed as a bearer token:
curl -H "Authorization: Bearer sip_your_key_here" \
https://api.stellarindex.io/v1/price?asset=native"e=fiat:USDAn X-API-Key: <key> header is accepted as an alternative; if both are sent, the bearer token wins.
Rate limits
Every response carries X-RateLimit-Limit and X-RateLimit-Remaining. When the quota is exhausted the API returns 429 with a Retry-After header (seconds until you can retry). Back off and retry — do not hammer.
Core endpoints
Pricing
- GET /v1/price
- Latest closed-bucket VWAP for a pair.
- GET /v1/price/tip
- Rolling-window (live) price for a pair.
- GET /v1/price/batch
- Many pairs in one request.
- GET /v1/vwap, /v1/twap
- Volume- / time-weighted average price.
- GET /v1/ohlc, /v1/chart, /v1/history
- OHLC candles, chart series, full history.
Assets & markets
- GET /v1/assets, /v1/assets/verified
- Asset catalogue + the verified set.
- GET /v1/assets/{asset_id}
- Per-asset detail (price, supply, holders).
- GET /v1/markets, /v1/markets/sources
- Aggregate markets + per-source breakdown.
- GET /v1/issuers, /v1/issuers/{g}
- Issuer directory + per-issuer detail.
Protocols & network
- GET /v1/protocols, /v1/protocols/{name}
- Per-protocol analytics.
- GET /v1/lending/pools, /v1/pools
- Lending pools + reserves.
- GET /v1/network/stats, /v1/network/throughput
- Network-wide stats.
- GET /v1/mev, /v1/anomalies, /v1/divergence
- Integrity + monitoring feeds.
Streaming (SSE)
- GET /v1/price/stream, /v1/price/tip/stream
- Server-Sent Events price feeds.
- GET /v1/observations/stream, /v1/oracle/streams
- Raw observation + oracle streams.
- GET /v1/ledger/stream
- Live ledger tip stream.
Streaming (Server-Sent Events)
The */stream endpoints return text/event-stream. Connect with an SSE client and read price/observation/ledger events as they close:
curl -N https://api.stellarindex.io/v1/price/stream?asset=native"e=fiat:USDErrors
Errors are RFC 7807 application/problem+json: a stable type URI, title, status, and a human detail. Branch on type, not the prose.
{
"type": "https://api.stellarindex.io/errors/rate-limited",
"title": "Rate limit exceeded",
"status": 429,
"detail": "quota exhausted; see Retry-After"
}Conventions
- Amounts are strings. Token amounts, reserves, supplies and prices can exceed 253, so they serialize as JSON strings (parse with a big-decimal type) — never as JSON numbers.
- Asset IDs.
native(XLM),CODE-GISSUER…(classic),C…(Soroban),crypto:BTC/fiat:USD(reference). - Closed-bucket pricing.
/v1/priceserves the latest closed 1-minute VWAP bucket (deterministic across regions);/v1/price/tipis the rolling live window.
More
- Full API reference — every endpoint, parameter, and schema
- SDK & client libraries
- Pricing methodology — how every number is computed
- API changelog
- OpenAPI spec