API
The following APIs are designed to allow monitoring and quick access to data.
Overview
Sailor provides read-only HTTPS endpoints for market snapshots (REST) and detailed on-chain data (GraphQL proxy) to power analytics, listings, dashboards, and indexers on Sei.
Endpoints return JSON
No authentication required
Standard HTTP status codes with JSON error payloads when applicable
Base URL
Content Type: application/json
Environment: production, public, read‑only
Soft Rate limit: ~10 requests/second per IP
If HTTP 429 is returned, back off and retry with exponential delay
Quick start
Market snapshots: GET /cmc/c1 for a compact multi‑market snapshot (tickers and 24h volumes) in one call.
Subgraph analytics: POST /sailor/subgraph to query pools, tokens, swaps, liquidity, fees with first/skip pagination and orderBy/orderDirection sorting.
# Market snapshots (REST)
curl -s https://asia-southeast1-sailor-finance-2f870.cloudfunctions.net/sailor_otherapi/cmc/c1 | jq '.'
# Subgraph proxy (GraphQL)
curl -s -X POST https://asia-southeast1-sailor-finance-2f870.cloudfunctions.net/sailor_otherapi/sailor/subgraph \
-H 'Content-Type: application/json' \
-d '{"query":"{ swaps(first:10, orderBy: timestamp, orderDirection: desc) { id timestamp amount0 amount1 sqrtPriceX96 tick pool { id token0 { id symbol decimals } token1 { id symbol decimals } } } }"}'Endpoint groups
This section lists stable, public endpoints by functional area with method, path, purpose, request parameters, and example responses for copy‑paste integration in dashboards and indexers. Treat unknown fields in aggregated feeds as additive and non‑breaking to preserve forward compatibility.
Contracts reference
Primary on‑chain reference (label c0): 0xa51136931fdd3875902618bf6b3abe38ab2d703b; use this as the canonical anchor for explorers, SDKs, and integrations on the current deployment. For a complete factory/router/pools map, contact the Sailor core team via Discord.
Language examples
Error handling
Standard HTTP status codes; non‑2xx responses include a JSON error message where applicable to assist debugging.
Responses are raw JSON without a custom envelope; handle HTTP status and parse the body accordingly.
Best practices
Parse decimal string values with arbitrary‑precision libraries and only convert to floats at render time if necessary to avoid rounding errors.
Prefer embedded name/symbol fields for UI display; keep pair keys for programmatic identity.
Cache snapshot responses and implement exponential backoff on HTTP 429 to stay within soft limits and maintain responsiveness.
Changelog
v1.0: Introduces c0, cmc/c1, cmc/c3, and sailor/subgraph; future extensions will be additive to remain non‑breaking for clients, particularly in aggregated feeds.
Support
For questions, bug reports, and partner integrations (e.g., listings, wallets, aggregators), contact the Sailor core team via Discord, and include endpoint paths, example requests, and error payloads to speed triage.
Last updated