Skip to main content
Market data routes help you discover supported pairs, show current prices, inspect order book depth, and reconcile execution activity. They are designed for backend trading automation and internal tools that need deterministic product metadata before placing orders.

Market Discovery

Call GET /partner/exchange/markets during startup and refresh it periodically. Use the returned values as the source of truth for:
  • supported pair_id values and their base_currency and quote_currency
  • tick_size, the price increment
  • min_base_lot, the smallest order quantity, and min_notional, the smallest order value in quote currency
  • maker_fee_bps and taker_fee_bps
There is no maximum order size. Order types and time-in-force values are the same for every market and are listed on Order management. Do not submit an order for a pair that is missing or whose price and quantity fall outside the returned limits; such orders return 400. If trading on a pair is suspended, order creation and replacement return 403 even though the pair is still listed. The currently supported exchange pair is USD/NGN. Future pairs should be discovered from this endpoint when they become available.

Pricing Before Order Submission

Use ticker data for lightweight quote displays. The path interval is required and accepts exactly 24h, 1d, 7d, 30d, 180d, or 360d. 24h and 1d are equivalent one-day aliases. The response echoes the requested alias and returns the exact rolling [from, to) calculation window. Open, high, low, last, price change, executed volume, executed quote notional, and trade count use the selected interval. Best bid and best ask are the freshest top-of-book values available, not the highest bid or lowest ask observed during the interval. When the live book is momentarily unavailable they fall back to the most recently recorded top of book, and either side can be null. Ticker responses can be cached for up to one second. Treat the returned to and each ticker’s identical timestamp as the calculation time.
pair_id is optional. With a pair filter, an interval with no executions still returns one ticker with null historical price fields and zero volume/count. Without a filter, the API returns only pairs that executed during the selected interval, ordered by canonical pair ID.

Candles

Candles use a bounded datafeed-style request: the client chooses the exact visible UTC window with from and to, and independently chooses the width of one candle with interval.
Every candle query requires: There is no range, before, or limit parameter. The request may span at most 500 theoretical buckets, including buckets with no trades. Results contain non-empty buckets only, ordered oldest-first. Stabyl does not synthesize prices or carry a previous close through missing activity. For candlesticks, use open, high, low, and close directly. For a line series, plot close at the returned bucket-start timestamp; do not reindex returned values across omitted buckets. Candle responses can be cached for up to five seconds, so use as_of as the calculation time. as_of is the server calculation time. is_closed=false means the final returned candle extends beyond as_of and can change. To request the currently forming candle, set to to the next aligned candle boundary. Use these client presets for the analytics UI: The range labels are client behavior, not candle intervals. A one-year view uses interval=1d; interval=360d is not supported because it would mean one 360-day candle.

Recent Executions

Both routes return public executions and require pair_id. GET /partner/exchange/trades accepts after_sequence and limit (default 50, maximum 200), so you can resume from the last sequence you processed. GET /partner/exchange/fills accepts limit only (default 50, maximum 100) and always returns the latest executions. Neither route is filtered to your account; your own executions are the fills list on GET /partner/exchange/orders/{order_id}. Order book depth is controlled with levels on the snapshot route (default 50, maximum 500) and with a required side of bid or ask plus limit (default 20, maximum 500) on the levels route.

Operational Guidance

Required Headers

Market data endpoints require X-Api-Key with the trades:view scope. Common 400 failures include unsupported pair_id, unsupported intervals, unaligned candle boundaries, to <= from, or a candle window above 500 theoretical buckets.