The Dubu Pay trading API gives you access to a live crypto/fiat order book where you can place, cancel, and monitor orders on NGN-paired markets. Trading is particularly useful when you want to convert accumulated USDT earnings back to NGN, take a position on exchange rate movements, or execute programmatic hedging strategies. All trading activity is scoped to your merchant account.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.
Supported trading pairs
Dubu Pay currently offers three trading pairs:| Pair | Base asset | Quote asset | Description |
|---|---|---|---|
USDT-NGN | USDT | NGN | Trade Tether against the Nigerian Naira |
USDC-NGN | USDC | NGN | Trade USD Coin against the Nigerian Naira |
USD-NGN | USD | NGN | Trade US Dollar against the Nigerian Naira |
Balances
Before placing an order, check your per-asset balance. The balances endpoint returns how much of each currency you hold in the trading account.Your trading balance is separate from your payments merchant balance. To move USDT from the payments system into trading, call
POST /payments/merchant/balance/transfer first. See Payments, deposits, and withdrawals for details.Order types
Dubu Pay supports two order types:| Type | Description |
|---|---|
limit | Execute at a specific price or better. Your order sits on the book until matched or cancelled. |
market | Execute immediately at the best available price. No price guarantee. |
price is required. For market orders, omit price.
Placing an order
CallPOST /trading/orders with your chosen symbol, side, type, and quantity. All quantities are strings to avoid floating-point precision issues.
| Field | Type | Required | Description |
|---|---|---|---|
symbol | string | Yes | Trading pair, e.g. USDT-NGN. |
side | string | Yes | buy or sell. |
type | string | Yes | limit or market. |
quantity | string | Yes | Amount of the base asset to trade. |
price | string | For limit orders | Limit price in quote currency (NGN). |
Order lifecycle
An order moves through states from the moment it is placed until it is fully resolved.| Status | Description |
|---|---|
open | Order is on the book, waiting to be matched. |
partially_filled | Some of the quantity has been matched; the remainder is still open. |
filled | The full quantity has been matched. The order is complete. |
cancelled | The order was cancelled before it was fully filled. Any unfilled quantity is released. |
Managing orders
symbol, status, side, page, and limit (max 100).
Trade history
Each matched order produces one or more trades — individual fill records. Retrieve your full trade history:Market data
Dubu Pay exposes three market data endpoints you can call without placing any orders.Order book
Order book
The order book shows the current bid and ask sides of a market, sorted by price. Use
depth to control how many price levels are returned.| Parameter | Required | Description |
|---|---|---|
symbol | Yes | Trading pair, e.g. USDT-NGN. |
depth | No | Number of price levels to return per side. |
Ticker
Ticker
The ticker gives you a real-time snapshot of the last traded price, 24-hour volume, and price change for all pairs.
Klines (candlestick data)
Klines (candlestick data)
Klines return OHLCV (open, high, low, close, volume) candlestick data for a symbol over a time range. This is useful for charting or calculating technical indicators.
| Parameter | Required | Description |
|---|---|---|
symbol | Yes | Trading pair. |
interval | Yes | Candle interval, e.g. 1m, 5m, 1h, 1d. |
limit | No | Number of candles to return. |
start | No | Unix timestamp (ms) for the start of the range. |
end | No | Unix timestamp (ms) for the end of the range. |
Use cases
- Convert USDT earnings to NGN
- Buy USDT at a target rate
After accumulating USDT from customer deposits, you can sell it for NGN:
Check your trading balance
Call
GET /trading/balances to confirm the available USDT balance in the trading account.Fetch the order book or ticker
Call
GET /trading/market/ticker to see the current USDT-NGN market price and decide whether a limit or market order is appropriate.Place a sell order
Submit
POST /trading/orders with side: "sell", symbol: "USDT-NGN", and your chosen type and quantity.Endpoint overview
| Method | Path | Description |
|---|---|---|
GET | /trading/balances | Get per-asset balances in the trading account |
POST | /trading/orders | Place a new order |
GET | /trading/orders | List orders (filterable by symbol, status, side) |
GET | /trading/orders/:id | Get a specific order |
DELETE | /trading/orders/:id | Cancel an open order |
GET | /trading/trades | List trade history |
GET | /trading/market/pairs | List all available trading pairs |
GET | /trading/market/orderbook | Get the live order book for a symbol |
GET | /trading/market/ticker | Get 24-hour ticker data for all pairs |
GET | /trading/market/klines | Get OHLCV candlestick data |