List Order Trades
curl --request GET \
--url https://api.pro.daya.co/public/v1/orders/{order_id}/trades \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/orders/{order_id}/trades"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/v1/orders/{order_id}/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pro.daya.co/public/v1/orders/{order_id}/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/orders/{order_id}/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pro.daya.co/public/v1/orders/{order_id}/trades")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/orders/{order_id}/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Order trades retrieved successfully",
"data": [
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"symbol": "USD-NGN",
"side": "buy",
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"price": "1545.00",
"quantity": "60.00000000",
"total_value": "92700.00",
"fee": "0.09270000",
"is_maker": false,
"created_at": "2024-01-15T10:35:01Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"symbol": "USD-NGN",
"side": "buy",
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"price": "1545.50",
"quantity": "40.00000000",
"total_value": "61820.00",
"fee": "0.06182000",
"is_maker": false,
"created_at": "2024-01-15T10:35:01Z"
}
],
"timestamp": "2024-01-15T10:35:01Z"
}
Trades
List Order Trades
List all trades (fills) for a specific order
GET
/
public
/
v1
/
orders
/
{order_id}
/
trades
List Order Trades
curl --request GET \
--url https://api.pro.daya.co/public/v1/orders/{order_id}/trades \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/orders/{order_id}/trades"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/v1/orders/{order_id}/trades', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pro.daya.co/public/v1/orders/{order_id}/trades",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/orders/{order_id}/trades"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pro.daya.co/public/v1/orders/{order_id}/trades")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/orders/{order_id}/trades")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Order trades retrieved successfully",
"data": [
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"symbol": "USD-NGN",
"side": "buy",
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"price": "1545.00",
"quantity": "60.00000000",
"total_value": "92700.00",
"fee": "0.09270000",
"is_maker": false,
"created_at": "2024-01-15T10:35:01Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"symbol": "USD-NGN",
"side": "buy",
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"price": "1545.50",
"quantity": "40.00000000",
"total_value": "61820.00",
"fee": "0.06182000",
"is_maker": false,
"created_at": "2024-01-15T10:35:01Z"
}
],
"timestamp": "2024-01-15T10:35:01Z"
}
Overview
Retrieve all trades (fills) associated with a specific order. This is useful for seeing how a partially filled or fully filled order was executed across multiple trades. This endpoint requires authentication with an API key that has Read scope.Authentication
Your API key with Read or Trade scope
X-Api-Key: daya_sk_YOUR_API_KEY
Path Parameters
The unique order identifier (UUID)Example:
550e8400-e29b-41d4-a716-446655440000Request Examples
curl --request GET \
--url https://api.pro.daya.co/public/v1/orders/550e8400-e29b-41d4-a716-446655440000/trades \
--header 'X-Api-Key: daya_sk_YOUR_API_KEY'
const orderId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.pro.daya.co/public/v1/orders/${orderId}/trades`,
{
headers: { 'X-Api-Key': 'daya_sk_YOUR_API_KEY' }
}
);
const data = await response.json();
console.log('Order trades:', data.data);
import requests
order_id = '550e8400-e29b-41d4-a716-446655440000'
headers = {'X-Api-Key': 'daya_sk_YOUR_API_KEY'}
response = requests.get(
f'https://api.pro.daya.co/public/v1/orders/{order_id}/trades',
headers=headers
)
data = response.json()
print(f"Order trades: {data['data']}")
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
orderID := "550e8400-e29b-41d4-a716-446655440000"
url := fmt.Sprintf("https://api.pro.daya.co/public/v1/orders/%s/trades", orderID)
req, _ := http.NewRequest("GET", url, nil)
req.Header.Set("X-Api-Key", "daya_sk_YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println("Order trades:", result["data"])
}
Response
Indicates if the request was successful
Human-readable response message
Array of trade objects for the order
Show trade properties
Show trade properties
Unique trade identifier (UUID)
Trading pair symbolExample:
USD-NGNTrade side relative to the authenticated user (
"buy" or "sell")The authenticated user’s order identifier (UUID)
Execution price
Trade quantity in base asset
Trade value in quote asset (price x quantity)
Fee charged to the authenticated user for this trade
Whether the authenticated user was the maker (resting order) in this trade
ISO 8601 trade execution timestamp
ISO 8601 timestamp of the response
Success Response
{
"success": true,
"message": "Order trades retrieved successfully",
"data": [
{
"id": "660e8400-e29b-41d4-a716-446655440000",
"symbol": "USD-NGN",
"side": "buy",
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"price": "1545.00",
"quantity": "60.00000000",
"total_value": "92700.00",
"fee": "0.09270000",
"is_maker": false,
"created_at": "2024-01-15T10:35:01Z"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"symbol": "USD-NGN",
"side": "buy",
"order_id": "550e8400-e29b-41d4-a716-446655440000",
"price": "1545.50",
"quantity": "40.00000000",
"total_value": "61820.00",
"fee": "0.06182000",
"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"
}
{
"success": false,
"message": "Order not found",
"error": {
"code": "ORDER_NOT_FOUND",
"message": "The specified order does not exist"
},
"timestamp": "2024-01-15T10:35:00Z"
}
Notes
- You can only view trades for your own orders. Attempting to access trades for another user’s order will return a 404 response.
- An order may have zero trades (if still open or cancelled before any fills), one trade, or many trades (if filled in multiple partial fills).
- Trades are returned in chronological order.
Rate Limits
- 100 requests per minute per API key
Next Steps
Get Order
View the order details
List Trades
View all your trades across orders
⌘I