Skip to main content

Documentation Index

Fetch the complete documentation index at: https://stabyl.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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.
EndpointUse
GET /partner/exchange/marketsSupported pairs, precision, and order constraints
GET /partner/exchange/ticker/24hCurrent best bid/ask and 24h statistics
GET /partner/exchange/orderbook/{pair_id}/snapshotBid and ask depth for a pair
GET /partner/exchange/orderbook/{pair_id}/levelsOne-side depth for focused quote displays
GET /partner/exchange/candlesOHLCV candles for charting and historical checks
GET /partner/exchange/tradesRecent public executions
GET /partner/exchange/fillsAccount execution history where available

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
  • accepted order types
  • amount and price precision
  • minimum and maximum order sizes
  • trading status
Do not submit an order for a pair that is missing, disabled, or outside the returned limits. The currently supported exchange pair is USD/NGN. Future pairs should be discovered from this endpoint when they become available.
curl https://api-staging.stabyl.com/v1/partner/exchange/markets \
  -H "X-Api-Key: $STABYL_API_KEY"

Pricing Before Order Submission

Use ticker data for lightweight quote displays. Use order book snapshots before sending a large or price sensitive order, because the top-of-book price alone does not show how much size is available.
curl "https://api-staging.stabyl.com/v1/partner/exchange/ticker/24h?pair_id=USD/NGN" \
  -H "X-Api-Key: $STABYL_API_KEY"
curl https://api-staging.stabyl.com/v1/partner/exchange/orderbook/USD%2FNGN/snapshot \
  -H "X-Api-Key: $STABYL_API_KEY"

Historical Reads

Candles and trades are useful for charts, execution review, and detecting unexpected price movement. Always page through historical data using the documented query parameters instead of requesting a large range in one call.
curl "https://api-staging.stabyl.com/v1/partner/exchange/candles?pair_id=USD/NGN&interval=1h&limit=100" \
  -H "X-Api-Key: $STABYL_API_KEY"

Operational Guidance

PatternRecommendation
StartupFetch markets before enabling trading automation
Quote displayRefresh ticker data on a short interval
Order entryRead market metadata and current price before validation
ReconciliationStore order IDs, then join order reads with fills
CachingCache product metadata longer than live price data

Required Headers

Market data endpoints require X-Api-Key enabled for exchange reads. Common failures include unsupported pair_id, invalid time windows, malformed intervals, or requesting too many records in one call.