Skip to main content
GET
/
public
/
v1
/
orders
/
history
Order History
curl --request GET \
  --url https://api.pro.daya.co/public/v1/orders/history \
  --header 'X-Api-Key: <x-api-key>'
{
  "success": true,
  "message": "Order history retrieved successfully",
  "data": {
    "orders": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "user_id": "user_abc123",
        "symbol": "USD-NGN",
        "side": "buy",
        "type": "limit",
        "status": "filled",
        "price": "1545.00",
        "quantity": "100.00000000",
        "filled_quantity": "100.00000000",
        "remaining_quantity": "0.00000000",
        "executed_price": "1545.00",
        "total_value": "154500.00",
        "filled_value": "154500.00",
        "base_currency": "USD",
        "quote_currency": "NGN",
        "created_at": "2024-01-15T10:35:00Z",
        "updated_at": "2024-01-15T10:35:05Z"
      },
      {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "user_id": "user_abc123",
        "symbol": "USD-NGN",
        "side": "sell",
        "type": "market",
        "status": "filled",
        "price": "",
        "quantity": "50.00000000",
        "filled_quantity": "50.00000000",
        "remaining_quantity": "0.00000000",
        "executed_price": "1546.50",
        "total_value": "77325.00",
        "filled_value": "77325.00",
        "base_currency": "USD",
        "quote_currency": "NGN",
        "created_at": "2024-01-14T15:20:00Z",
        "updated_at": "2024-01-14T15:20:01Z"
      }
    ],
    "total_count": 156,
    "limit": 20,
    "offset": 0,
    "has_more": true
  },
  "timestamp": "2024-01-15T10:35:00Z"
}

Overview

Retrieve order history for the authenticated user. This endpoint returns orders regardless of status, with optional filtering and pagination. For active orders, use the List Active Orders endpoint.

Authentication

X-Api-Key
string
required
Your API key with Read or Trade scope
X-Api-Key: daya_sk_YOUR_API_KEY

Query Parameters

status
string
Filter by order statusAllowed values: filled, cancelled, rejected, partially_filled
symbol
string
Filter by trading pair symbolExample: USDT-NGN
side
string
Filter by order sideAllowed values: buy, sell
type
string
Filter by order typeAllowed values: market, limit
start_time
string
Filter orders created after this time (RFC3339 format)Example: 2024-01-01T00:00:00Z
end_time
string
Filter orders created before this time (RFC3339 format)Example: 2024-12-31T23:59:59Z
limit
integer
Maximum number of orders to returnDefault: 50Range: 1 to 100
offset
integer
Number of orders to skip for paginationDefault: 0

Request Examples

curl --request GET \
  --url 'https://api.pro.daya.co/public/v1/orders/history?symbol=USDT-NGN&status=filled&limit=20' \
  --header 'X-Api-Key: daya_sk_YOUR_API_KEY'

Response

success
boolean
required
Indicates if the request was successful
message
string
required
Human-readable response message
data
object
required
Paginated order data
timestamp
string
ISO 8601 timestamp of the response

Success Response

{
  "success": true,
  "message": "Order history retrieved successfully",
  "data": {
    "orders": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "user_id": "user_abc123",
        "symbol": "USD-NGN",
        "side": "buy",
        "type": "limit",
        "status": "filled",
        "price": "1545.00",
        "quantity": "100.00000000",
        "filled_quantity": "100.00000000",
        "remaining_quantity": "0.00000000",
        "executed_price": "1545.00",
        "total_value": "154500.00",
        "filled_value": "154500.00",
        "base_currency": "USD",
        "quote_currency": "NGN",
        "created_at": "2024-01-15T10:35:00Z",
        "updated_at": "2024-01-15T10:35:05Z"
      },
      {
        "id": "550e8400-e29b-41d4-a716-446655440001",
        "user_id": "user_abc123",
        "symbol": "USD-NGN",
        "side": "sell",
        "type": "market",
        "status": "filled",
        "price": "",
        "quantity": "50.00000000",
        "filled_quantity": "50.00000000",
        "remaining_quantity": "0.00000000",
        "executed_price": "1546.50",
        "total_value": "77325.00",
        "filled_value": "77325.00",
        "base_currency": "USD",
        "quote_currency": "NGN",
        "created_at": "2024-01-14T15:20:00Z",
        "updated_at": "2024-01-14T15:20:01Z"
      }
    ],
    "total_count": 156,
    "limit": 20,
    "offset": 0,
    "has_more": true
  },
  "timestamp": "2024-01-15T10:35:00Z"
}

Error Responses

{
  "success": false,
  "message": "Unauthorized",
  "error": {
    "code": "API_KEY_INVALID",
    "message": "The provided API key is invalid"
  },
  "timestamp": "2024-01-15T10:35:00Z"
}

Pagination

Use limit and offset for pagination. The response includes total_count and has_more to help navigate pages.

Rate Limits

  • 100 requests per minute per API key

Next Steps

List Active Orders

View your active orders

List Trades

View individual trade executions

Get Order

Get details of a specific order

Place Order

Place a new order