List Trades
curl --request GET \
--url https://api.pro.daya.co/public/v1/trades \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/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/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/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/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/trades")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/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": "Trades 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"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"symbol": "USD-NGN",
"side": "sell",
"order_id": "550e8400-e29b-41d4-a716-446655440001",
"price": "1548.00",
"quantity": "50.00000000",
"total_value": "77400.00",
"fee": "0.05000000",
"is_maker": true,
"created_at": "2024-01-15T10:20:15Z"
}
],
"timestamp": "2024-01-15T10:35:01Z"
}
Trades
List Trades
List trade history for the authenticated user
GET
/
public
/
v1
/
trades
List Trades
curl --request GET \
--url https://api.pro.daya.co/public/v1/trades \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/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/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/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/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/trades")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/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": "Trades 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"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"symbol": "USD-NGN",
"side": "sell",
"order_id": "550e8400-e29b-41d4-a716-446655440001",
"price": "1548.00",
"quantity": "50.00000000",
"total_value": "77400.00",
"fee": "0.05000000",
"is_maker": true,
"created_at": "2024-01-15T10:20:15Z"
}
],
"timestamp": "2024-01-15T10:35:01Z"
}
Overview
Retrieve a list of executed trades for the authenticated user. Trades represent individual fills against orders.Authentication
string
required
Your API key with Read or Trade scope
X-Api-Key: daya_sk_YOUR_API_KEY
Query Parameters
string
Filter by trading pair symbolExample:
USDT-NGNstring
Filter by order IDExample:
550e8400-e29b-41d4-a716-446655440000integer
Maximum number of trades to returnDefault:
50Range: 1 to 100integer
Number of trades to skip for paginationDefault:
0Request Examples
curl --request GET \
--url 'https://api.pro.daya.co/public/v1/trades?symbol=USDT-NGN&limit=20' \
--header 'X-Api-Key: daya_sk_YOUR_API_KEY'
const response = await fetch(
'https://api.pro.daya.co/public/v1/trades?symbol=USDT-NGN&limit=20',
{
headers: { 'X-Api-Key': 'daya_sk_YOUR_API_KEY' }
}
);
const data = await response.json();
console.log('Trade history:', data.data);
import requests
headers = {'X-Api-Key': 'daya_sk_YOUR_API_KEY'}
response = requests.get(
'https://api.pro.daya.co/public/v1/trades',
headers=headers,
params={'symbol': 'USDT-NGN', 'limit': 20}
)
trades = response.json()
print(f"Trade history: {trades['data']}")
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.pro.daya.co/public/v1/trades?symbol=USDT-NGN&limit=20", 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("Trade history:", result["data"])
}
Response
boolean
required
Indicates if the request was successful
string
required
Human-readable response message
array
required
Array of trade objects
Show trade properties
Show trade properties
string
Unique trade identifier (UUID)
string
Trading pair symbol
string
Trade side relative to the authenticated user (
"buy" or "sell")string
The authenticated user’s order identifier (UUID)
string
Execution price
string
Trade quantity in base asset
string
Trade value in quote asset (price x quantity)
string
Fee charged to the authenticated user for this trade
boolean
Whether the authenticated user was the maker (resting order) in this trade
string
ISO 8601 trade execution timestamp
string
ISO 8601 timestamp of the response
Success Response
{
"success": true,
"message": "Trades 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"
},
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"symbol": "USD-NGN",
"side": "sell",
"order_id": "550e8400-e29b-41d4-a716-446655440001",
"price": "1548.00",
"quantity": "50.00000000",
"total_value": "77400.00",
"fee": "0.05000000",
"is_maker": true,
"created_at": "2024-01-15T10:20:15Z"
}
],
"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": "Validation error",
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid order_id format"
},
"timestamp": "2024-01-15T10:35:00Z"
}
Rate Limits
- 100 requests per minute per API key
Next Steps
List Orders
View your orders
Place Order
Place a new order
⌘I