Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.dubupay.com/llms.txt

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

The market data endpoints give you real-time and historical price information for all supported trading pairs. Use these endpoints to build trading dashboards, calculate order impact, or power charting interfaces. All market data routes require authentication via API key or JWT bearer token.

Supported trading pairs

Dubu currently supports the following pairs:
SymbolDescription
USDT-NGNTether USD vs Nigerian Naira
USDC-NGNUSD Coin vs Nigerian Naira
USD-NGNUS Dollar vs Nigerian Naira

List trading pairs

GET /trading/market/pairs
Returns metadata for all active trading pairs, including minimum order sizes and precision settings.

Example

curl https://api.dubupay.com/api/v1/trading/market/pairs \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

Response fields

symbol
string
The trading pair identifier, e.g. USDT-NGN.
base_asset
string
The asset being bought or sold, e.g. USDT.
quote_asset
string
The asset used for pricing, e.g. NGN.
status
string
Whether the pair is active or inactive.

Get the orderbook

GET /trading/market/orderbook
Returns the current state of the live orderbook for a given pair, showing aggregated bid and ask price levels up to the requested depth.

Query parameters

symbol
string
required
The trading pair to query. One of USDT-NGN, USDC-NGN, or USD-NGN.
depth
number
Number of price levels to return for each side (bids and asks). Defaults to 20.

Example

curl "https://api.dubupay.com/api/v1/trading/market/orderbook?symbol=USDT-NGN&depth=5" \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

Response fields

symbol
string
The trading pair.
bids
array
Array of [price, quantity] pairs for the buy side, sorted from highest to lowest price.
asks
array
Array of [price, quantity] pairs for the sell side, sorted from lowest to highest price.
timestamp
string
ISO 8601 timestamp of when the snapshot was taken.

Example response

{
  "success": true,
  "data": {
    "symbol": "USDT-NGN",
    "bids": [
      ["1579.00", "200.00"],
      ["1578.50", "500.00"]
    ],
    "asks": [
      ["1580.00", "150.00"],
      ["1580.50", "300.00"]
    ],
    "timestamp": "2024-01-15T10:30:00.000Z"
  }
}

Get ticker

GET /trading/market/ticker
Returns the latest price and 24-hour rolling statistics for one or all trading pairs. If you omit symbol, ticker data for all pairs is returned.

Query parameters

symbol
string
The trading pair to query, e.g. USDT-NGN. Omit to get tickers for all pairs.

Example

curl "https://api.dubupay.com/api/v1/trading/market/ticker?symbol=USDT-NGN" \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

Response fields

symbol
string
The trading pair.
price
string
Current best price for the pair.
volume_24h
string
Total base asset volume traded in the last 24 hours.
change_24h
string
Absolute price change over the last 24 hours.
change_pct_24h
string
Percentage price change over the last 24 hours.
high_24h
string
Highest price in the last 24 hours.
low_24h
string
Lowest price in the last 24 hours.

Get candlestick data (klines)

GET /trading/market/klines
Returns OHLCV (open, high, low, close, volume) candlestick data for charting. You can specify a time interval, limit the number of candles returned, and optionally filter by a start and end timestamp.

Query parameters

symbol
string
required
The trading pair. One of USDT-NGN, USDC-NGN, or USD-NGN.
interval
string
required
Candle interval. Examples: 1m, 5m, 15m, 1h, 4h, 1d.
limit
number
Maximum number of candles to return. Defaults to 100.
start
number
Start of the time range as a Unix timestamp in milliseconds. Optional.
end
number
End of the time range as a Unix timestamp in milliseconds. Optional.

Example

curl "https://api.dubupay.com/api/v1/trading/market/klines?symbol=USDT-NGN&interval=1h&limit=24" \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

Response fields

Each element in the data array represents one candle.
open_time
number
Unix timestamp in milliseconds for the start of this candle.
open
string
Opening price.
high
string
Highest price during the interval.
low
string
Lowest price during the interval.
close
string
Closing price.
volume
string
Base asset volume traded during the interval.
close_time
number
Unix timestamp in milliseconds for the end of this candle.