Execute FX Quote
curl --request POST \
--url https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/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.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/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 => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"account_id": "<string>",
"quote_id": "<string>",
"source_currency": "<string>",
"target_currency": "<string>",
"amount_type": "<string>",
"source_amount": "<string>",
"target_amount": "<string>",
"platform_fee": {},
"all_in_rate": "<string>",
"status": "<string>",
"trade_type": "<string>",
"executed_at": "<string>",
"voided_at": "<string>",
"voided_reason": "<string>",
"voided_by_trade_id": "<string>",
"note": "<string>",
"created": "<string>",
"updated": "<string>",
"created_by": "<string>",
"updated_by": "<string>"
}Foreign Exchange
Execute FX Quote
Execute a foreign exchange quote to perform the currency conversion
POST
/
v1
/
accounts
/
{account_id}
/
fx
/
quotes
/
{quote_id}
/
execute
Execute FX Quote
curl --request POST \
--url https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/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.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/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 => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
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.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hopnow.io/v1/accounts/{account_id}/fx/quotes/{quote_id}/execute")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"object": "<string>",
"account_id": "<string>",
"quote_id": "<string>",
"source_currency": "<string>",
"target_currency": "<string>",
"amount_type": "<string>",
"source_amount": "<string>",
"target_amount": "<string>",
"platform_fee": {},
"all_in_rate": "<string>",
"status": "<string>",
"trade_type": "<string>",
"executed_at": "<string>",
"voided_at": "<string>",
"voided_reason": "<string>",
"voided_by_trade_id": "<string>",
"note": "<string>",
"created": "<string>",
"updated": "<string>",
"created_by": "<string>",
"updated_by": "<string>"
}Executes a quote at the price it was issued with: the source currency is debited from the account and the target currency credited, less any
platform_fee. The endpoint takes no request body, and requires write access on the fx scope.
Execution requires that the quote exists on this account, has not expired, has not been executed, and that the account is active. Any other case, including an unknown quote_id, returns 422 FX_QUOTE_INVALID.
Unlike other endpoints, an unknown id here returns 422, not 404. Branch on error.code.
Execution is not replayable. A successful execute marks the quote executed, so retrying the same call returns FX_QUOTE_INVALID. Treat the first 2xx as authoritative, and request a new quote to trade again.
When execution fails after the quote is accepted, the request still returns HTTP 200 with status: "failed" and the source funds released. No conversion happened. Always check status in the response body; a 2xx alone does not mean the trade completed.
Path Parameters
Response
The executed quote’s ID. On the trade object it is
null for trades Hop books manually; an execute always returns the quote you executed.Platform fee deducted from
target_amount (currency, amount). Always present, and null when there is no fee.All-in rate including spread, expressed as
target_amount / source_amount: target units per one source unit, quantised to the pair’s rate precision (commonly 8 decimal places)Trade status:
processing, completed, failed, or voided. An execute returns completed or failed; voided only ever appears on a trade Hop has reversed.market, manual, or reversal. An execute always returns market; the other two belong to trades Hop books on your behalf and show up in List FX Trades.Errors
| Status | code | When |
|---|---|---|
422 | INSUFFICIENT_FUNDS | The account’s available balance in the source currency is below source_amount |
422 | FX_QUOTE_INVALID | The quote is unknown, expired, already executed, belongs to another account, or the account is not active |
422 | CREDIT_LIMIT_EXCEEDED | The account trades on credit and this trade would take it past its limit |
503 | CREDIT_CHECK_UNAVAILABLE | The credit check could not be completed. Nothing was debited; retry shortly |
Response Example
{
"id": "fxt_fm6up8zlisdyi438gg5v2swe",
"object": "fx_trade",
"account_id": "acct_q47hcaye8ar4rx8qj8xjcxpq",
"quote_id": "fxq_03waws7m8sdxkvogg6wq42c3",
"source_currency": "USD",
"target_currency": "EUR",
"amount_type": "source",
"source_amount": "1000.00",
"target_amount": "855.69",
"platform_fee": null,
"all_in_rate": "0.85569000",
"status": "completed",
"trade_type": "market",
"executed_at": "2026-01-15T10:00:12Z",
"voided_at": null,
"voided_reason": null,
"voided_by_trade_id": null,
"note": null,
"created": "2026-01-15T10:00:12Z",
"updated": "2026-01-15T10:00:12Z",
"created_by": "ak_9a3yfd2ro3jeoqqalbx8jew1",
"updated_by": null
}