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>",
"use_max": true,
"client_order_id": "<string>"
}
'import requests
url = "https://api.pro.daya.co/public/v1/orders/quote"
payload = {
"symbol": "<string>",
"side": "<string>",
"type": "<string>",
"price": "<string>",
"quantity": "<string>",
"use_max": True,
"client_order_id": "<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>',
use_max: true,
client_order_id: '<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>',
'use_max' => true,
'client_order_id' => '<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 \"use_max\": true,\n \"client_order_id\": \"<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 \"use_max\": true,\n \"client_order_id\": \"<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 \"use_max\": true,\n \"client_order_id\": \"<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": "18000.00",
"price": "1382.164456",
"estimated_price": "1382.164456",
"total_value": "24878960.21",
"estimated_fee": "12439.48",
"estimated_hold_buffer": "94512.93",
"estimated_total": "24985912.62",
"cash_available": "30000000.00",
"cash_to_use": "24985912.62",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"quantity": "100.00",
"price": "1545.00",
"estimated_price": "1545.00",
"total_value": "154500.00",
"estimated_fee": "0.00",
"estimated_hold_buffer": "0.00",
"estimated_total": "154500.00",
"cash_available": "200000.00",
"cash_to_use": "154500.00",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "sell",
"type": "market",
"quantity": "100.00",
"price": "1545.00",
"estimated_price": "1545.00",
"total_value": "154500.00",
"estimated_fee": "30.90",
"estimated_hold_buffer": "0.00",
"estimated_total": "154500.00",
"cash_available": "250.00",
"cash_to_use": "100.00",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"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>",
"use_max": true,
"client_order_id": "<string>"
}
'import requests
url = "https://api.pro.daya.co/public/v1/orders/quote"
payload = {
"symbol": "<string>",
"side": "<string>",
"type": "<string>",
"price": "<string>",
"quantity": "<string>",
"use_max": True,
"client_order_id": "<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>',
use_max: true,
client_order_id: '<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>',
'use_max' => true,
'client_order_id' => '<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 \"use_max\": true,\n \"client_order_id\": \"<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 \"use_max\": true,\n \"client_order_id\": \"<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 \"use_max\": true,\n \"client_order_id\": \"<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": "18000.00",
"price": "1382.164456",
"estimated_price": "1382.164456",
"total_value": "24878960.21",
"estimated_fee": "12439.48",
"estimated_hold_buffer": "94512.93",
"estimated_total": "24985912.62",
"cash_available": "30000000.00",
"cash_to_use": "24985912.62",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"quantity": "100.00",
"price": "1545.00",
"estimated_price": "1545.00",
"total_value": "154500.00",
"estimated_fee": "0.00",
"estimated_hold_buffer": "0.00",
"estimated_total": "154500.00",
"cash_available": "200000.00",
"cash_to_use": "154500.00",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "sell",
"type": "market",
"quantity": "100.00",
"price": "1545.00",
"estimated_price": "1545.00",
"total_value": "154500.00",
"estimated_fee": "30.90",
"estimated_hold_buffer": "0.00",
"estimated_total": "154500.00",
"cash_available": "250.00",
"cash_to_use": "100.00",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"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
string
required
Your API key with Trade scope
X-Api-Key: daya_sk_YOUR_API_KEY
Request Body
string
required
Trading pair symbolExample:
USDT-NGNAllowed values: USDT-NGN, USDC-NGN, USD-NGNstring
required
Order sideAllowed values:
buy, sellstring
required
Order typeAllowed values:
limit, marketstring
Order price (required for limit orders)Example:
1545.00Required when
type is limit. Not allowed for market orders.string
Order quantity in the base asset. This field is required when
use_max is false or omitted.Example: 100.00boolean
Set this field to
true to let the server resolve all usable cash and active trading credit to an order quantity. use_max takes precedence when the request also contains quantity.The server does not reduce the quantity to fit the orderbook or a trading limit. It returns the normal liquidity or guardrail error if the full quantity is not valid.string
Optional client idempotency key. For a limit order, use the same value when you place the quoted order. The server uses this value when it simulates self-trade prevention and calculates the limit-order fee authorization.Example:
order-20260903-001Request 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",
"client_order_id": "order-20260903-001"
}'
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',
client_order_id: 'order-20260903-001'
})
});
const quote = await response.json();
console.log('Estimated price:', quote.data.estimated_price);
console.log('Estimated fee:', quote.data.estimated_fee);
console.log('Maximum buy reserve:', quote.data.estimated_total);
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',
'client_order_id': 'order-20260903-001'
}
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']}")
print(f"Maximum buy reserve: {quote['data']['estimated_total']}")
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",
"client_order_id": "order-20260903-001",
}
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"])
fmt.Println("Maximum buy reserve:", data["estimated_total"])
}
Use all available funding
The following request keepsquantity as a compatibility fallback for an older server. A server that supports use_max ignores the fallback and calculates the quantity from the API-key owner’s current usable funding.
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": "sell",
"type": "market",
"quantity": "100.00",
"use_max": true,
"client_order_id": "order-20260903-002"
}'
Quote and place a limit order
Use oneclient_order_id for the quote and the placement. Send the quote’s estimated_fee, including 0.00, unchanged as max_taker_fee when you place the limit order. This value is a fee authorization cap. The server charges only the realized fee.
const clientOrderId = crypto.randomUUID();
const quoteResponse = 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: 'limit',
price: '1545.00',
quantity: '100.00',
client_order_id: clientOrderId
})
});
const quote = (await quoteResponse.json()).data;
await fetch('https://api.pro.daya.co/public/v1/orders', {
method: 'POST',
headers: {
'X-Api-Key': 'daya_sk_YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
symbol: 'USDT-NGN',
side: 'buy',
type: 'limit',
price: '1545.00',
quantity: quote.quantity,
max_taker_fee: quote.estimated_fee,
client_order_id: clientOrderId
})
});
Response
boolean
required
Indicates if the request was successful
string
required
Human-readable response message
object
required
Order quote details
quantity, total_value, estimated_fee, estimated_hold_buffer, estimated_total, and the cash and credit fields are decimal strings with two fractional digits. price and estimated_price can contain additional execution-price precision.Use
estimated_total for buy affordability and percentage sizing. Earlier server versions can omit estimated_hold_buffer; in those responses, estimated_fee can include both the simulated fee and the temporary hold buffer. When estimated_hold_buffer is present, estimated_fee contains the simulated trading fee only.Show data properties
Show data properties
string
Trading pair symbolExample:
USD-NGNstring
Order side:
buy or sellstring
Order type:
limit or marketstring
Order quantity in base assetExample:
100.00string
Quoted execution price based on the current order bookExample:
1545.50string
Estimated execution price based on the current order book. This field currently contains the same value as
price.Example: 1545.50string
required
Simulated gross trade value in the quote asset. This value does not include the trading fee or the temporary hold buffer.Example:
24878960.21string
required
Simulated trading fee. When
estimated_hold_buffer is present, this value does not include the temporary hold buffer. Earlier responses that omit the buffer field can include the buffer in this value.Example: 12439.48string
Additional amount temporarily reserved for a buy to cover price protection. This value excludes the simulated trading fee and is
0.00 for a sell. Earlier server versions can omit this field.Example: 94512.93string
required
Complete amount reserved for a buy, shown with two fractional digits. Use this field for buy affordability and quantity sizing. When
estimated_hold_buffer is present on a buy, estimated_total = total_value + estimated_fee + estimated_hold_buffer. For a sell, this field is the simulated gross trade value and the fee is not added to it.Example: 24985912.62string
Cash balance available in the asset that the order reserves.
string
Cash amount allocated to the order when the quote has sufficient funding.
string
Credit available in the asset that the order reserves.
string
Credit amount allocated to the order when the quote has sufficient funding.
boolean
Indicates whether the quoted order uses credit.
boolean
Indicates whether the available cash and credit can fund the required reserve.
array
Conditions that prevent or affect order submission.
array
Informational messages about the quote and its funding plan.
string
ISO 8601 timestamp of the response
Success Response
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "market",
"quantity": "18000.00",
"price": "1382.164456",
"estimated_price": "1382.164456",
"total_value": "24878960.21",
"estimated_fee": "12439.48",
"estimated_hold_buffer": "94512.93",
"estimated_total": "24985912.62",
"cash_available": "30000000.00",
"cash_to_use": "24985912.62",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "buy",
"type": "limit",
"quantity": "100.00",
"price": "1545.00",
"estimated_price": "1545.00",
"total_value": "154500.00",
"estimated_fee": "0.00",
"estimated_hold_buffer": "0.00",
"estimated_total": "154500.00",
"cash_available": "200000.00",
"cash_to_use": "154500.00",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"timestamp": "2024-01-15T10:35:00Z"
}
{
"success": true,
"message": "Order quote retrieved successfully",
"data": {
"symbol": "USD-NGN",
"side": "sell",
"type": "market",
"quantity": "100.00",
"price": "1545.00",
"estimated_price": "1545.00",
"total_value": "154500.00",
"estimated_fee": "30.90",
"estimated_hold_buffer": "0.00",
"estimated_total": "154500.00",
"cash_available": "250.00",
"cash_to_use": "100.00",
"credit_available": "0.00",
"credit_to_use": "0.00",
"will_use_credit": false,
"has_sufficient_balance": true,
"warnings": [],
"info": ["Order will be fully funded with cash"]
},
"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"
}
{
"success": false,
"message": "Insufficient liquidity within slippage cap",
"error": {
"code": "INSUFFICIENT_LIQUIDITY",
"message": "Insufficient liquidity within slippage cap",
"details": {
"requested_qty": "45001.00",
"fillable_qty": "20000.00",
"min_price": "1293.5"
}
},
"timestamp": "2026-09-03T09: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.
- A successful
use_maxquote still does not reserve funds. Submit the returned explicitquantity. The placement can fail if funding, liquidity, or a trading limit changes after the quote. - For a limit order, keep the same
client_order_idfrom quote to placement. Send the quote’sestimated_feeasmax_taker_fee. If the realized taker fee would exceed this cap, the server rejects the order withTAKER_FEE_CAP_EXCEEDED.
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