Get Order
curl --request GET \
--url https://api.pro.daya.co/public/v1/orders/{order_id} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/orders/{order_id}"
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}', 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}",
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}"
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}")
.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}")
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 retrieved successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user_abc123",
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"status": "open",
"price": "1545.00",
"quantity": "100.00000000",
"filled_quantity": "0.00000000",
"remaining_quantity": "100.00000000",
"executed_price": "",
"total_value": "154500.00",
"filled_value": "0.00",
"base_currency": "USD",
"quote_currency": "NGN",
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:00Z"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order retrieved successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"user_id": "user_abc123",
"symbol": "USD-NGN",
"side": "buy",
"type": "market",
"status": "filled",
"price": "",
"quantity": "100.00000000",
"filled_quantity": "100.00000000",
"remaining_quantity": "0.00000000",
"executed_price": "1545.50",
"total_value": "154550.00",
"filled_value": "154550.00",
"base_currency": "USD",
"quote_currency": "NGN",
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:01Z"
},
"timestamp": "2024-01-15T10:35:01Z"
}
Orders
Get Order
Get details of a specific order
GET
/
public
/
v1
/
orders
/
{order_id}
Get Order
curl --request GET \
--url https://api.pro.daya.co/public/v1/orders/{order_id} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/orders/{order_id}"
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}', 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}",
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}"
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}")
.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}")
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 retrieved successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user_abc123",
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"status": "open",
"price": "1545.00",
"quantity": "100.00000000",
"filled_quantity": "0.00000000",
"remaining_quantity": "100.00000000",
"executed_price": "",
"total_value": "154500.00",
"filled_value": "0.00",
"base_currency": "USD",
"quote_currency": "NGN",
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:00Z"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order retrieved successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"user_id": "user_abc123",
"symbol": "USD-NGN",
"side": "buy",
"type": "market",
"status": "filled",
"price": "",
"quantity": "100.00000000",
"filled_quantity": "100.00000000",
"remaining_quantity": "0.00000000",
"executed_price": "1545.50",
"total_value": "154550.00",
"filled_value": "154550.00",
"base_currency": "USD",
"quote_currency": "NGN",
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:01Z"
},
"timestamp": "2024-01-15T10:35:01Z"
}
Overview
Retrieve details for a specific order by its ID.Authentication
string
required
Your API key with Read or Trade scope
X-Api-Key: daya_sk_YOUR_API_KEY
Path Parameters
string
required
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 \
--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}`,
{
headers: { 'X-Api-Key': 'daya_sk_YOUR_API_KEY' }
}
);
const order = await response.json();
console.log('Order details:', order.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}',
headers=headers
)
order = response.json()
print(f"Order details: {order['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", 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 details:", result["data"])
}
Response
boolean
required
Indicates if the request was successful
string
required
Human-readable response message
object
required
Order details
Show order properties
Show order properties
string
Unique order identifier (UUID)
string
User identifier
string
Trading pair symbol
string
Order side:
buy or sellstring
Order type:
limit or marketstring
Order statusValues:
pending_settlement, new, open, partially_filled, filled, cancelled, rejected, failedstring
Order price (for limit orders)
string
Original order quantity
string
Quantity that has been filled
string
Remaining quantity to fill
string
Average execution price
string
Total order value in quote currency
string
Value of filled portion
string
Base currency code (e.g.
USD)string
Quote currency code (e.g.
NGN)string
ISO 8601 creation timestamp
string
ISO 8601 last update timestamp
string
ISO 8601 timestamp of the response
Success Response
{
"success": true,
"message": "Order retrieved successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"user_id": "user_abc123",
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"status": "open",
"price": "1545.00",
"quantity": "100.00000000",
"filled_quantity": "0.00000000",
"remaining_quantity": "100.00000000",
"executed_price": "",
"total_value": "154500.00",
"filled_value": "0.00",
"base_currency": "USD",
"quote_currency": "NGN",
"created_at": "2024-01-15T10:35:00Z",
"updated_at": "2024-01-15T10:35:00Z"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order retrieved successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440001",
"user_id": "user_abc123",
"symbol": "USD-NGN",
"side": "buy",
"type": "market",
"status": "filled",
"price": "",
"quantity": "100.00000000",
"filled_quantity": "100.00000000",
"remaining_quantity": "0.00000000",
"executed_price": "1545.50",
"total_value": "154550.00",
"filled_value": "154550.00",
"base_currency": "USD",
"quote_currency": "NGN",
"created_at": "2024-01-15T10:35:00Z",
"updated_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"
}
Rate Limits
- 100 requests per minute per API key
Next Steps
List Trades
View trade history for this order
Cancel Order
Cancel an open order
⌘I