Skip to main content
GET
/
public
/
v1
/
orderbook
/
{symbol}
Get Orderbook
curl --request GET \
  --url https://api.pro.daya.co/public/v1/orderbook/{symbol}
{
  "success": true,
  "message": "Orderbook retrieved successfully",
  "data": {
    "symbol": "USD-NGN",
    "market_id": "550e8400-e29b-41d4-a716-446655440000",
    "base_asset": "USD",
    "quote_asset": "NGN",
    "bids": [
      {"price": "1545.00", "quantity": "500.00"},
      {"price": "1544.50", "quantity": "1200.00"},
      {"price": "1544.00", "quantity": "800.00"}
    ],
    "asks": [
      {"price": "1546.00", "quantity": "800.00"},
      {"price": "1546.50", "quantity": "350.00"},
      {"price": "1547.00", "quantity": "1500.00"}
    ],
    "stats": {
      "best_bid": "1545.00",
      "best_ask": "1546.00",
      "spread": "1.00",
      "spread_percent": "0.065",
      "mid_price": "1545.50"
    },
    "depth": 10,
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Overview

Get the current orderbook (market depth) for a specific trading pair. This endpoint does not require authentication.

Path Parameters

symbol
string
required
Trading pair symbolExample: USDT-NGNAllowed values: USDT-NGN, USDC-NGN, USD-NGN

Query Parameters

depth
integer
Number of price levels to returnDefault: 20Range: 1 to 100

Request Examples

curl --request GET \
  --url 'https://api.pro.daya.co/public/v1/orderbook/USDT-NGN?depth=10'

Response

success
boolean
required
Indicates if the request was successful
message
string
required
Human-readable response message
data
object
required
Orderbook data

Success Response

{
  "success": true,
  "message": "Orderbook retrieved successfully",
  "data": {
    "symbol": "USD-NGN",
    "market_id": "550e8400-e29b-41d4-a716-446655440000",
    "base_asset": "USD",
    "quote_asset": "NGN",
    "bids": [
      {"price": "1545.00", "quantity": "500.00"},
      {"price": "1544.50", "quantity": "1200.00"},
      {"price": "1544.00", "quantity": "800.00"}
    ],
    "asks": [
      {"price": "1546.00", "quantity": "800.00"},
      {"price": "1546.50", "quantity": "350.00"},
      {"price": "1547.00", "quantity": "1500.00"}
    ],
    "stats": {
      "best_bid": "1545.00",
      "best_ask": "1546.00",
      "spread": "1.00",
      "spread_percent": "0.065",
      "mid_price": "1545.50"
    },
    "depth": 10,
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Error Responses

{
  "success": false,
  "message": "Market not found",
  "error": {
    "code": "SYMBOL_NOT_FOUND",
    "message": "Market not found",
    "symbol": "INVALID-PAIR"
  }
}

Understanding the Orderbook

Bids vs Asks

TypeDescriptionSort Order
BidsBuy orders - users willing to purchase at this priceHighest price first
AsksSell orders - users willing to sell at this priceLowest price first

Reading the Spread

The spread is the difference between the best ask and best bid:
Spread = Best Ask - Best Bid
Spread % = (Spread / Mid Price) × 100
A tighter spread indicates higher liquidity.

Rate Limits

  • 100 requests per minute per IP address
  • No authentication required

Next Steps

Place Order

Execute a trade at current market prices

List Markets

View all available markets