Get Order Quote
curl --request POST \
--url https://api.pro.daya.co/public/v1/orders/quote \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"symbol": "<string>",
"side": "<string>",
"type": "<string>",
"price": "<string>",
"quantity": "<string>"
}
'import requests
url = "https://api.pro.daya.co/public/v1/orders/quote"
payload = {
"symbol": "<string>",
"side": "<string>",
"type": "<string>",
"price": "<string>",
"quantity": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
side: '<string>',
type: '<string>',
price: '<string>',
quantity: '<string>'
})
};
fetch('https://api.pro.daya.co/public/v1/orders/quote', 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/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'side' => '<string>',
'type' => '<string>',
'price' => '<string>',
'quantity' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/orders/quote"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": \"<string>\",\n \"quantity\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pro.daya.co/public/v1/orders/quote")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": \"<string>\",\n \"quantity\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/orders/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": \"<string>\",\n \"quantity\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "market",
"quantity": "100.00",
"estimated_price": "1545.50",
"estimated_total": "154550.00",
"estimated_fee": "0.15455000"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"quantity": "100.00",
"estimated_price": "1545.00",
"estimated_total": "154500.00",
"estimated_fee": "0.15450000"
},
"timestamp": "2024-01-15T10:35:00Z"
}
Orders
Get Order Quote
Get a price quote for an order without placing it
POST
/
public
/
v1
/
orders
/
quote
Get Order Quote
curl --request POST \
--url https://api.pro.daya.co/public/v1/orders/quote \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <x-api-key>' \
--data '
{
"symbol": "<string>",
"side": "<string>",
"type": "<string>",
"price": "<string>",
"quantity": "<string>"
}
'import requests
url = "https://api.pro.daya.co/public/v1/orders/quote"
payload = {
"symbol": "<string>",
"side": "<string>",
"type": "<string>",
"price": "<string>",
"quantity": "<string>"
}
headers = {
"X-Api-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
symbol: '<string>',
side: '<string>',
type: '<string>',
price: '<string>',
quantity: '<string>'
})
};
fetch('https://api.pro.daya.co/public/v1/orders/quote', 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/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'symbol' => '<string>',
'side' => '<string>',
'type' => '<string>',
'price' => '<string>',
'quantity' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/orders/quote"
payload := strings.NewReader("{\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": \"<string>\",\n \"quantity\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<x-api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pro.daya.co/public/v1/orders/quote")
.header("X-Api-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": \"<string>\",\n \"quantity\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/orders/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"symbol\": \"<string>\",\n \"side\": \"<string>\",\n \"type\": \"<string>\",\n \"price\": \"<string>\",\n \"quantity\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "market",
"quantity": "100.00",
"estimated_price": "1545.50",
"estimated_total": "154550.00",
"estimated_fee": "0.15455000"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"quantity": "100.00",
"estimated_price": "1545.00",
"estimated_total": "154500.00",
"estimated_fee": "0.15450000"
},
"timestamp": "2024-01-15T10:35:00Z"
}
Overview
Get an estimated price quote for an order without actually placing it. This is useful for previewing the expected execution price and fees before committing to a trade. This endpoint requires authentication with an API key that has Trade scope.Authentication
Your API key with Trade scope
X-Api-Key: daya_sk_YOUR_API_KEY
Request Body
Trading pair symbolExample:
USDT-NGNAllowed values: USDT-NGN, USDC-NGN, USD-NGNOrder sideAllowed values:
buy, sellOrder typeAllowed values:
limit, marketOrder price (required for limit orders)Example:
1545.00Required when
type is limit. Not allowed for market orders.Order quantity in base assetExample:
100.00Request Examples
curl --request POST \
--url https://api.pro.daya.co/public/v1/orders/quote \
--header 'X-Api-Key: daya_sk_YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"symbol": "USDT-NGN",
"side": "buy",
"type": "market",
"quantity": "100.00"
}'
const response = await fetch('https://api.pro.daya.co/public/v1/orders/quote', {
method: 'POST',
headers: {
'X-Api-Key': 'daya_sk_YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: 'USDT-NGN',
side: 'buy',
type: 'market',
quantity: '100.00'
})
});
const quote = await response.json();
console.log('Estimated price:', quote.data.estimated_price);
console.log('Estimated fee:', quote.data.estimated_fee);
import requests
headers = {
'X-Api-Key': 'daya_sk_YOUR_API_KEY',
'Content-Type': 'application/json'
}
data = {
'symbol': 'USDT-NGN',
'side': 'buy',
'type': 'market',
'quantity': '100.00'
}
response = requests.post(
'https://api.pro.daya.co/public/v1/orders/quote',
headers=headers,
json=data
)
quote = response.json()
print(f"Estimated price: {quote['data']['estimated_price']}")
print(f"Estimated fee: {quote['data']['estimated_fee']}")
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
)
func main() {
order := map[string]string{
"symbol": "USDT-NGN",
"side": "buy",
"type": "market",
"quantity": "100.00",
}
body, _ := json.Marshal(order)
req, _ := http.NewRequest("POST", "https://api.pro.daya.co/public/v1/orders/quote", bytes.NewBuffer(body))
req.Header.Set("X-Api-Key", "daya_sk_YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
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)
data := result["data"].(map[string]interface{})
fmt.Println("Estimated price:", data["estimated_price"])
fmt.Println("Estimated fee:", data["estimated_fee"])
}
Response
Indicates if the request was successful
Human-readable response message
Order quote details
Show data properties
Show data properties
Trading pair symbolExample:
USD-NGNOrder side:
buy or sellOrder type:
limit or marketOrder quantity in base assetExample:
100.00Estimated execution price based on current orderbookExample:
1545.50Estimated total value in quote currencyExample:
154550.00Estimated fee for the tradeExample:
0.15455000ISO 8601 timestamp of the response
Success Response
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "market",
"quantity": "100.00",
"estimated_price": "1545.50",
"estimated_total": "154550.00",
"estimated_fee": "0.15455000"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"quantity": "100.00",
"estimated_price": "1545.00",
"estimated_total": "154500.00",
"estimated_fee": "0.15450000"
},
"timestamp": "2024-01-15T10:35:00Z"
}
Error Responses
{
"success": false,
"message": "Validation error",
"error": {
"code": "VALIDATION_ERROR",
"message": "Quantity is required"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": false,
"message": "Forbidden",
"error": {
"code": "ACCOUNT_FROZEN",
"message": "Trading account is frozen"
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": false,
"message": "Symbol not found",
"error": {
"code": "SYMBOL_NOT_FOUND",
"message": "The specified trading pair does not exist"
},
"timestamp": "2024-01-15T10:35:00Z"
}
Notes
- Quotes are estimates based on the current state of the orderbook and may differ from the actual execution price.
- The quote does not reserve liquidity or lock funds.
- For market orders, the estimated price is the volume-weighted average price across the available orderbook depth.
Rate Limits
- 100 requests per minute per API key
Next Steps
Place Order
Place the order after reviewing the quote
Get Orderbook
View the full orderbook depth
⌘I