Skip to main content
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.

Supported trading pairs

Dubu Pay currently offers three trading pairs: To list all currently available pairs and their metadata programmatically:

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: For limit orders, price is required. For market orders, omit price.

Placing an order

Call POST /trading/orders with your chosen symbol, side, type, and quantity. All quantities are strings to avoid floating-point precision issues.
Order fields:

Order lifecycle

An order moves through states from the moment it is placed until it is fully resolved.
For time-sensitive conversions, use a market order rather than a limit order. Limit orders can remain open indefinitely if the market does not reach your price.

Managing orders

You can filter listed orders by 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:
Trade records include the matched price, quantity, and timestamp for each fill. If a single order is partially filled across multiple matches, each match appears as a separate trade.

Market data

Dubu Pay exposes three market data endpoints you can call without placing any orders.
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.
The ticker gives you a real-time snapshot of the last traded price, 24-hour volume, and price change for all pairs.
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.

Use cases

After accumulating USDT from customer deposits, you can sell it for NGN:
1

Check your trading balance

Call GET /trading/balances to confirm the available USDT balance in the trading account.
2

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.
3

Place a sell order

Submit POST /trading/orders with side: "sell", symbol: "USDT-NGN", and your chosen type and quantity.
4

Monitor until filled

Poll GET /trading/orders/{id} or subscribe to webhooks to detect when the order status changes to filled.
Trading involves market risk. Limit orders are not guaranteed to fill, and market orders execute at the prevailing price which may differ from the last quoted price. Test your order logic in sandbox mode before going live.

Endpoint overview