DocsREST APIMarkets
REST API

Markets

Public market data over HTTPS. Tickers and OHLCV candles for every supported pair. Backed by the same multi-source price oracle (CoinGecko + Paprika + Binance) that powers the dashboard, with OKX for candles.

v1Public — no auth required

Authentication

Market endpoints are public — you do not need an API key. If you do attach one, the request still counts against your read bucket, so prefer caching responses client-side for repeated reads.

All responses are JSON. Numeric fields (price, volume24h, OHLCV values) are returned as strings to avoid floating-point precision loss.change24h is a decimal fraction (0.0234 = +2.34%). Timestamps are ISO 8601 UTC.

List tickers GET /api/v1/markets/tickers

Returns the current ticker for every supported pair in one call. Edge-cached for 30 seconds.

bash
1curl https://nextbridge.exchange/api/v1/markets/tickers
json
1{
2 "tickers": [
3 {
4 "symbol": "BTC",
5 "pair": "BTC-USDT",
6 "name": "Bitcoin",
7 "price": "67234.50",
8 "change24h": 0.0234,
9 "volume24h": "8123456.78",
10 "ts": "2026-05-22T12:00:00.000Z"
11 }
12 ],
13 "ts": "2026-05-22T12:00:00.000Z"
14}

Single ticker GET /api/v1/markets/{symbol}

Returns a single pair. Symbol is case-insensitive. Returns404 if the symbol isn't in our supported set.

bash
1curl https://nextbridge.exchange/api/v1/markets/btc
json
1{
2 "ticker": {
3 "symbol": "BTC",
4 "pair": "BTC-USDT",
5 "name": "Bitcoin",
6 "price": "67234.50",
7 "change24h": 0.0234,
8 "volume24h": "8123456.78",
9 "ts": "2026-05-22T12:00:00.000Z"
10 }
11}

OHLCV candles GET /api/v1/markets/{symbol}/candles

Historical candles, sourced from OKX. Query parameters:

  • interval — one of 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1w, 1M. Default 1h.
  • limit — 1 to 1000. Default 500.
bash
1curl "https://nextbridge.exchange/api/v1/markets/eth/candles?interval=1h&limit=24"
json
1{
2 "symbol": "ETH",
3 "pair": "ETH-USDT",
4 "interval": "1h",
5 "candles": [
6 {
7 "ts": "2026-05-21T13:00:00.000Z",
8 "open": "3512.40",
9 "high": "3520.10",
10 "low": "3508.00",
11 "close": "3517.85",
12 "volume": "1234.567"
13 }
14 ]
15}

Degraded responses

Market data must never hard-fail — a transient upstream blip would otherwise paint your whole UI red. If every price source is unreachable, ticker endpoints return a 200with a degraded: true flag and conservative static fallback prices. Check the flag in production code and consider greying out the value until the next poll.

Candles do return 502 on upstream failure since there's no sensible static fallback for time-series data.