Quotes
Execute quote
Execute a pending quote. The quote must not be expired or already executed. On success, the trade is completed atomically and the balances are updated.
POST
/
v1
/
quotes
/
{quoteId}
/
execute
cURL
curl --request POST \
--url https://api.nxos.io/v1/quotes/{quoteId}/execute \
--header 'Authorization: <authorization>'import requests
url = "https://api.nxos.io/v1/quotes/{quoteId}/execute"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.nxos.io/v1/quotes/{quoteId}/execute', 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.nxos.io/v1/quotes/{quoteId}/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.nxos.io/v1/quotes/{quoteId}/execute"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.nxos.io/v1/quotes/{quoteId}/execute")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nxos.io/v1/quotes/{quoteId}/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"object": "trade",
"transactionId": "txn_b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5",
"quoteId": "quote_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"fromAsset": "USD",
"toAsset": "USDC",
"fromAmount": "10000.00",
"toAmount": "9997.000000",
"status": "COMPLETED",
"createdAt": "2025-03-15T14:31:00.000Z"
}
Headers
Response
The request has succeeded.
Result of executing a quote.
⌘I
cURL
curl --request POST \
--url https://api.nxos.io/v1/quotes/{quoteId}/execute \
--header 'Authorization: <authorization>'import requests
url = "https://api.nxos.io/v1/quotes/{quoteId}/execute"
headers = {"Authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: '<authorization>'}};
fetch('https://api.nxos.io/v1/quotes/{quoteId}/execute', 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.nxos.io/v1/quotes/{quoteId}/execute",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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.nxos.io/v1/quotes/{quoteId}/execute"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "<authorization>")
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.nxos.io/v1/quotes/{quoteId}/execute")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.nxos.io/v1/quotes/{quoteId}/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"object": "trade",
"transactionId": "txn_b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5",
"quoteId": "quote_a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
"fromAsset": "USD",
"toAsset": "USDC",
"fromAmount": "10000.00",
"toAmount": "9997.000000",
"status": "COMPLETED",
"createdAt": "2025-03-15T14:31:00.000Z"
}