Place order
curl --request POST \
--url https://api.daya.co/coins/v1/orders \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"quote_id": "eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl"
}
'import requests
url = "https://api.daya.co/coins/v1/orders"
payload = { "quote_id": "eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quote_id: 'eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl'})
};
fetch('https://api.daya.co/coins/v1/orders', 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.daya.co/coins/v1/orders",
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([
'quote_id' => 'eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-API-Key: <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.daya.co/coins/v1/orders"
payload := strings.NewReader("{\n \"quote_id\": \"eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-API-Key", "<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.daya.co/coins/v1/orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/coins/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"base_amount": "0.00153846",
"base_asset": "BTC",
"created_at": "2026-01-15T10:30:05Z",
"executed_price": "65000.00",
"failure_reason": "trade failed",
"fee": "0.50",
"fee_asset": "USD",
"filled_quantity": "0.00153846",
"id": "7b1204e1-4f89-41d3-9a0c-0305e82c3302",
"quote_amount": "100.00",
"quote_asset": "USD",
"side": "buy",
"status": "filled"
},
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": {
"base_amount": "0.00153846",
"base_asset": "BTC",
"created_at": "2026-01-15T10:30:05Z",
"executed_price": "65000.00",
"failure_reason": "trade failed",
"fee": "0.50",
"fee_asset": "USD",
"filled_quantity": "0.00153846",
"id": "7b1204e1-4f89-41d3-9a0c-0305e82c3302",
"quote_amount": "100.00",
"quote_asset": "USD",
"side": "buy",
"status": "filled"
},
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}Trading
Place order
POST
/
orders
Place order
curl --request POST \
--url https://api.daya.co/coins/v1/orders \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--header 'X-API-Key: <api-key>' \
--data '
{
"quote_id": "eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl"
}
'import requests
url = "https://api.daya.co/coins/v1/orders"
payload = { "quote_id": "eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl" }
headers = {
"Idempotency-Key": "<idempotency-key>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({quote_id: 'eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl'})
};
fetch('https://api.daya.co/coins/v1/orders', 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.daya.co/coins/v1/orders",
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([
'quote_id' => 'eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>",
"X-API-Key: <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.daya.co/coins/v1/orders"
payload := strings.NewReader("{\n \"quote_id\": \"eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("X-API-Key", "<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.daya.co/coins/v1/orders")
.header("Idempotency-Key", "<idempotency-key>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quote_id\": \"eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.daya.co/coins/v1/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quote_id\": \"eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"base_amount": "0.00153846",
"base_asset": "BTC",
"created_at": "2026-01-15T10:30:05Z",
"executed_price": "65000.00",
"failure_reason": "trade failed",
"fee": "0.50",
"fee_asset": "USD",
"filled_quantity": "0.00153846",
"id": "7b1204e1-4f89-41d3-9a0c-0305e82c3302",
"quote_amount": "100.00",
"quote_asset": "USD",
"side": "buy",
"status": "filled"
},
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": {
"base_amount": "0.00153846",
"base_asset": "BTC",
"created_at": "2026-01-15T10:30:05Z",
"executed_price": "65000.00",
"failure_reason": "trade failed",
"fee": "0.50",
"fee_asset": "USD",
"filled_quantity": "0.00153846",
"id": "7b1204e1-4f89-41d3-9a0c-0305e82c3302",
"quote_amount": "100.00",
"quote_asset": "USD",
"side": "buy",
"status": "filled"
},
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}{
"data": "<unknown>",
"error": {
"code": "<string>",
"details": "<unknown>",
"fields": {},
"message": "<string>"
},
"message": "<string>",
"success": true,
"timestamp": "<string>"
}Authorizations
Your Daya API key, sent in the X-API-Key header. Issue and scope keys in the Daya dashboard.
Headers
Stable key for this logical operation; reuse it for every retry
Body
application/json
Trade order request
Example:
"eyJxaWQiOiIzZjI1MDRlMCJ9.c2lnbmF0dXJl"
⌘I