Built for Bound Exchange
The candles endpoint started with a partner request. Bound Exchange wanted candle charts in its trading interface and asked for a chart data source its UI could call directly. SODAX shipped it as a public endpoint rather than a private integration, so every builder on SODAX gets the same chart data Bound does.Discover what is available
Start with the markets endpoint. It tells you which symbols and intervals exist, so your symbol picker and interval switcher never need a hardcoded list.Fetch candles
The candles endpoint takes four required query parameters:
Here is a request for the last few hours of hourly ETH candles:
timestampis the bucket start in UNIX seconds. A1hcandle atTcoversTup toT + 3600.- Symbols are network-agnostic.
BTCis one price for Bitcoin, whichever network or wrapped form your user holds it in. Ask for the asset, not the token address. - Prices are decimal strings, so no precision is lost in transit. Convert at the edge of your app.
final: falsemarks the candle still forming. Closed candles omit the field. Re-poll while the last candle is open to keep it current.- Candles are price only. There is no volume field.
- Up to 5000 candles per request. Wider ranges return
400, so page through long histories. - Empty ranges return
200with"candles": []. An unknown symbol does the same, which is another reason to validate against/oracle/marketsfirst. - Responses are cached for about 10 seconds, which makes browser polling at chart refresh rates comfortable.
Call it from TypeScript
@sodax/sdk wraps both endpoints on sodax.backendApi, returning the same payloads as a schema-validated Result:
getOracleMarkets and getOracleCandles ship in the release candidate line of @sodax/sdk (2.2.0-rc.8 on the rc tag at the time of writing). The current stable latest release, 2.1.0, does not include them. Install with npm install @sodax/sdk@rc to use the methods today, or call the REST endpoints with fetch, which work the same from any language.Draw the chart
The response maps almost directly onto the{ time, open, high, low, close } shape most candlestick libraries accept. With TradingView Lightweight Charts v5 the whole integration fits in a few lines:
/oracle/markets and an interval toggle fed by its intervals array give you a full chart panel. Poll the latest bucket on a timer and call series.update() with the newest candle to keep it moving.
Start building
- The Oracle API reference covers every field and convention.
- The Backend API module docs show the SDK methods and types.
- The interactive API explorer lets you try both endpoints in the browser.
- Building something that needs heavier read volume? Get in touch.