Skip to main content
GET
/
public
/
v1
/
trades
/
{id}
Get Trade
curl --request GET \
  --url https://api.pro.daya.co/public/v1/trades/{id} \
  --header 'X-Api-Key: <x-api-key>'
{
  "success": true,
  "message": "Trade retrieved successfully",
  "data": {
    "id": "660e8400-e29b-41d4-a716-446655440000",
    "symbol": "USD-NGN",
    "side": "buy",
    "order_id": "550e8400-e29b-41d4-a716-446655440000",
    "price": "1545.50",
    "quantity": "100.00000000",
    "total_value": "154550.00",
    "fee": "0.15455000",
    "is_maker": false,
    "created_at": "2024-01-15T10:35:01Z"
  },
  "timestamp": "2024-01-15T10:35:01Z"
}

Overview

Retrieve details for a specific trade by its ID. Only trades where you are the buyer or seller are accessible. This endpoint requires authentication with an API key that has Read scope.

Authentication

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

Path Parameters

id
string
required
The unique trade identifier (UUID)Example: 660e8400-e29b-41d4-a716-446655440000

Request Examples

curl --request GET \
  --url https://api.pro.daya.co/public/v1/trades/660e8400-e29b-41d4-a716-446655440000 \
  --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
Trade details
timestamp
string
ISO 8601 timestamp of the response

Success Response

{
  "success": true,
  "message": "Trade retrieved successfully",
  "data": {
    "id": "660e8400-e29b-41d4-a716-446655440000",
    "symbol": "USD-NGN",
    "side": "buy",
    "order_id": "550e8400-e29b-41d4-a716-446655440000",
    "price": "1545.50",
    "quantity": "100.00000000",
    "total_value": "154550.00",
    "fee": "0.15455000",
    "is_maker": false,
    "created_at": "2024-01-15T10:35:01Z"
  },
  "timestamp": "2024-01-15T10:35:01Z"
}

Error Responses

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

Notes

  • You can only access trades where you are either the buyer or the seller. Attempting to access a trade you are not party to will return a 404 response.
  • The side and order_id fields are relative to your user. If you were the buyer, side is "buy" and order_id is your buy order’s ID.

Rate Limits

  • 100 requests per minute per API key

Next Steps

List Trades

View all your trades

List Order Trades

View trades for a specific order