Skip to main content

Overview

This guide walks you through placing your first order using the Pro API. You’ll learn to fetch market data, check your account, and execute a trade.
Prerequisites: You need a Pro account and an API key with Trade scope. Contact support@daya.co to request access. See Authentication for details.

Step 1: Fetch Available Markets

First, check which markets are available. This endpoint doesn’t require authentication:
curl --request GET \
  --url https://api.pro.daya.co/public/v1/markets
Response:
{
  "success": true,
  "message": "Markets retrieved successfully",
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "symbol": "USD-NGN",
      "base_asset": "USD",
      "quote_asset": "NGN",
      "status": "active",
      "created_at": "2024-01-01T00:00:00Z",
      "updated_at": "2024-01-01T00:00:00Z"
    }
  ],
  "timestamp": "2024-01-15T10:30:00Z"
}

Step 2: Check the Orderbook

View current market depth for your chosen pair:
curl --request GET \
  --url 'https://api.pro.daya.co/public/v1/orderbook/USDT-NGN?depth=10'

Step 3: Place a Limit Order

Now place an order. This requires an API key with Trade scope:
curl --request POST \
  --url https://api.pro.daya.co/public/v1/orders \
  --header 'X-Api-Key: daya_sk_YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "symbol": "USDT-NGN",
    "side": "buy",
    "type": "limit",
    "price": "1545.00",
    "quantity": "100.00"
  }'
Response:
{
  "success": true,
  "message": "Order placed successfully",
  "data": {
    "order_id": "550e8400-e29b-41d4-a716-446655440000",
    "status": "pending_settlement",
    "side": "buy",
    "type": "limit",
    "symbol": "USD-NGN",
    "requested_quantity": "100.00000000",
    "filled_quantity": "0.00000000",
    "remaining_quantity": "100.00000000",
    "avg_fill_price": "",
    "total_fee_charged": "",
    "created_at": "2024-01-15T10:35:00Z",
    "updated_at": "2024-01-15T10:35:00Z"
  },
  "timestamp": "2024-01-15T10:35:00Z"
}

Step 4: Check Your Orders

View your open orders:
curl --request GET \
  --url 'https://api.pro.daya.co/public/v1/orders?symbol=USDT-NGN' \
  --header 'X-Api-Key: daya_sk_YOUR_API_KEY'

Step 5: Cancel an Order

Cancel an open order if needed:
curl --request DELETE \
  --url https://api.pro.daya.co/public/v1/orders/550e8400-e29b-41d4-a716-446655440000 \
  --header 'X-Api-Key: daya_sk_YOUR_API_KEY'

Order Types

TypeDescriptionRequired Fields
limitExecute at specified price or betterprice, quantity
marketExecute immediately at best available pricequantity

Order Status

StatusDescription
pending_settlementOrder is awaiting settlement
newOrder has been created
openOrder is active on the orderbook
partially_filledOrder is partially executed
filledOrder is completely executed
cancelledOrder was cancelled by user
rejectedOrder was rejected by the system
failedOrder failed to execute

Next Steps

Markets API

Full markets and orderbook reference

Orders API

Complete order management reference