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 orders API lets you interact with the Dubu trading engine. You can place limit or market orders for any supported trading pair, track their lifecycle from open through to filled or cancelled, and view the individual trades that make up each fill. All endpoints require authentication via API key or JWT bearer token.

Order statuses

StatusDescription
OPENOrder is resting in the orderbook, awaiting a match.
PARTIALLY_FILLEDPart of the order quantity has been matched; the remainder is still open.
FILLEDThe full order quantity has been matched.
CANCELLEDThe order was cancelled before it could be fully filled.

Place an order

POST /trading/orders
Submit a new buy or sell order. For limit orders you must provide a price. For market orders the price field is ignored and the order executes at the best available price.

Request body

symbol
string
required
The trading pair symbol. Supported values: USDT-NGN, USDC-NGN, USD-NGN.
side
string
required
Order direction. One of buy or sell.
type
string
required
Order type. One of limit or market.
quantity
string
required
The quantity of the base asset to buy or sell. Provided as a decimal string, e.g. "100.00".
price
string
The limit price per unit of the base asset. Required when type is limit. Omit for market orders.

Example

curl -X POST https://api.dubupay.com/api/v1/trading/orders \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "symbol": "USDT-NGN",
    "side": "buy",
    "type": "limit",
    "quantity": "50.00",
    "price": "1580.00"
  }'

Response

Returns 201 Created with the new order object.
id
string
Unique order identifier (UUID).
symbol
string
The trading pair, e.g. USDT-NGN.
side
string
buy or sell.
type
string
limit or market.
quantity
string
The original requested quantity.
filled_quantity
string
How much of the quantity has been matched so far.
price
string
The limit price. null for market orders.
status
string
Current order status: OPEN, PARTIALLY_FILLED, FILLED, or CANCELLED.
created_at
string
ISO 8601 timestamp when the order was placed.

List orders

GET /trading/orders
Returns a paginated list of your orders, optionally filtered by status, symbol, or side.

Query parameters

symbol
string
Filter to a specific trading pair, e.g. USDT-NGN.
status
string
Filter by order status. One of OPEN, PARTIALLY_FILLED, FILLED, or CANCELLED.
side
string
Filter by side. One of buy or sell.
page
number
Page number (1-indexed). Defaults to 1.
limit
number
Number of results per page. Maximum 100. Defaults to 20.

Example

curl "https://api.dubupay.com/api/v1/trading/orders?symbol=USDT-NGN&status=OPEN" \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

Get an order

GET /trading/orders/:id
Retrieve a single order by its ID.

Path parameters

id
string
required
The UUID of the order to retrieve.

Example

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

Cancel an order

DELETE /trading/orders/:id
Cancel an open or partially-filled order. You cannot cancel a fully FILLED order.

Path parameters

id
string
required
The UUID of the order to cancel.

Example

curl -X DELETE https://api.dubupay.com/api/v1/trading/orders/ord_abc123 \
  -H "X-Api-Key: dubu_sk_live_YOUR_API_KEY"

List trade history

GET /trading/trades
Returns a paginated list of all executed trades — the individual fills that result from matched orders. Each trade record represents one match event with a quantity and execution price.

Example

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

Response fields

id
string
Unique trade identifier.
order_id
string
The order this trade belongs to.
symbol
string
Trading pair, e.g. USDT-NGN.
side
string
buy or sell.
quantity
string
Quantity filled in this trade.
price
string
Execution price for this fill.
created_at
string
ISO 8601 timestamp of when the trade was executed.