Loading the API documentation
No notifications.
Language
English
No other language is available yet.
Loading the API documentation
The Zethar Exchange API serves the market data behind this site and relays transactions that a wallet has already signed. It holds no keys and has no accounts: there is nothing to sign up for. This page is built from the API contract (version 0.1.0).
https://exchange.zethareum.comwss://exchange.zethareum.com/v1/streamA success answers { "data": ... }. An error answers { "error": { "code", "message" } }. Branch on code, never on message. An empty list is [], never null.
{ "error": { "code": "not_found", "message": "..." } }Prices, amounts, balances and percentages are strings such as "0.000997", never JSON numbers, so no value is rounded by a float. Parse them with a decimal library.
{ "price": "0.000997" }{ "data": ... }. Error body: { "error": { "code", "message" } }.priceChangePercent24h may be negative.BASE/QUOTE in bodies and BASE-QUOTE in paths.X-Request-ID (a valid client value matching ^[A-Za-z0-9._-]{1,64}$ is echoed, otherwise one is generated) and Cache-Control: no-store unless a route says otherwise./v1 route (not on /healthz or /readyz): a per-client rate limit answers 429 with code rate_limited and a Retry-After header (POST /v1/tx/broadcast has a stricter tier of 2 requests per second, burst 5); when the server is at its concurrency cap it answers 503 with code overloaded and Retry-After: 1; a request that runs past its 5 second deadline answers 503 with code timeout.403 with code forbidden.| Summary | ||
|---|---|---|
| GET | /v1/assets (GET), details | Listed assets |
| GET | /v1/buy/config (GET), details | Fiat buy settings (Zethar Exchange) |
| POST | /v1/buy/quotes (POST), details | Price a purchase in rupiah |
| POST | /v1/buy/orders (POST), details | Place an order from a quote |
| POST | /v1/buy/history (POST), details | The wallet's own buy orders |
| GET | /v1/buy/orders/{id} (GET), details | Status of an order |
| GET | /v1/markets/listed (GET), details | Markets created through the chain's listing contract |
| GET | /v1/markets/pairs (GET), details | All trading pairs with 24h stats |
| GET | /v1/markets/{symbol}/orderbook (GET), details | Aggregated order book of one venue |
| GET | /v1/markets/{symbol}/trades (GET), details | Recent public trades of every venue, newest first |
| GET | /v1/markets/{symbol}/candles (GET), details | OHLCV candles built from stored trades, oldest first |
| GET | /v1/staking/pools (GET), details | Staking pools |
| GET | /v1/explorer/overview (GET), details | Head of the chain and the recent block time |
| GET | /v1/explorer/blocks (GET), details | Blocks, newest first |
| GET | /v1/explorer/blocks/{id} (GET), details | One block with its transactions |
| GET | /v1/explorer/txs (GET), details | Recent transactions, newest first |
| GET | /v1/explorer/txs/{hash} (GET), details | One transaction with its receipt |
| GET | /v1/explorer/addresses/{address} (GET), details | Balance and kind of an address |
| GET | /v1/popular (GET), details | Popular coins with real prices (landing page) |
| GET | /v1/stats/online (GET), details | Open realtime connections across API replicas |
| GET | /v1/governance/overview (GET), details | Settings of the chain's Governor |
| GET | /v1/governance/proposals (GET), details | Proposals, newest first |
| GET | /v1/governance/proposals/{id} (GET), details | One proposal |
| GET | /v1/staking/validators (GET), details | Every registered validator of the Zethar chain |
| GET | /v1/staking/pool (GET), details | The Zethar staking pool |
Showing 1 to 25 of 32
Connect a WebSocket client to wss://exchange.zethareum.com/v1/stream and send JSON text frames. Each subscribe is answered with a full snapshot of every channel you list, then a fresh full snapshot whenever it changes (not a delta).
op: subscribe, unsubscribe or ping; channels: 1 to 20 names. {"op":"ping","t":<number>} takes no channels and is answered with a pong carrying the same t.^(ticker|(trades|orderbook):[A-Za-z0-9]{1,12}-[A-Za-z0-9]{1,12})$^trades:[A-Z0-9]{1,12}-[A-Z0-9]{1,12}$; data array of Trade^orderbook:[A-Z0-9]{1,12}-[A-Z0-9]{1,12}$; data OrderBook{"op":"subscribe","channels":["ticker","trades:ZET-ZUSD"]}Limits, error codes and close codes are on the /v1/stream page.