Initiate fiat withdrawal
const url = 'https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 10,
currency: 'USD',
withdrawalAddressId: '392cf015-5045-4615-a226-df3543d9c15f'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal"
payload = {
"amount": 10,
"currency": "USD",
"withdrawalAddressId": "392cf015-5045-4615-a226-df3543d9c15f"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"currency\": \"USD\",\n \"withdrawalAddressId\": \"392cf015-5045-4615-a226-df3543d9c15f\"\n}")
.asString();CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": 10,\n \"currency\": \"USD\",\n \"withdrawalAddressId\": \"392cf015-5045-4615-a226-df3543d9c15f\"\n}");
CURLcode ret = curl_easy_perform(hnd);package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal"
payload := strings.NewReader("{\n \"amount\": 10,\n \"currency\": \"USD\",\n \"withdrawalAddressId\": \"392cf015-5045-4615-a226-df3543d9c15f\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}curl --request POST \
--url https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10,
"currency": "USD",
"withdrawalAddressId": "392cf015-5045-4615-a226-df3543d9c15f"
}
'{
"status": "success",
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2024-10-10T07:15:44.030Z",
"amount": 1000000,
"currency": "USD",
"network": "FIAT",
"status": "PENDING",
"transactionHash": null,
"withdrawalAddressId": "123e4567-e89b-12d3-a456-426614174001",
"orgId": "123e4567-e89b-12d3-a456-426614174002",
"actorId": "123e4567-e89b-12d3-a456-426614174003",
"actorEmail": "[email protected]",
"comments": "Client initiated the withdrawal via API"
}
}
Initiate fiat withdrawal
Initiates a fiat withdrawal to an approved bank account.
POST
/
v1
/
brokerage
/
{orgId}
/
fiat_withdrawal
Initiate fiat withdrawal
const url = 'https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal';
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 10,
currency: 'USD',
withdrawalAddressId: '392cf015-5045-4615-a226-df3543d9c15f'
})
};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal"
payload = {
"amount": 10,
"currency": "USD",
"withdrawalAddressId": "392cf015-5045-4615-a226-df3543d9c15f"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)HttpResponse<String> response = Unirest.post("https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 10,\n \"currency\": \"USD\",\n \"withdrawalAddressId\": \"392cf015-5045-4615-a226-df3543d9c15f\"\n}")
.asString();CURL *hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_WRITEDATA, stdout);
curl_easy_setopt(hnd, CURLOPT_URL, "https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal");
struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "Authorization: Bearer <token>");
headers = curl_slist_append(headers, "Content-Type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n \"amount\": 10,\n \"currency\": \"USD\",\n \"withdrawalAddressId\": \"392cf015-5045-4615-a226-df3543d9c15f\"\n}");
CURLcode ret = curl_easy_perform(hnd);package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal"
payload := strings.NewReader("{\n \"amount\": 10,\n \"currency\": \"USD\",\n \"withdrawalAddressId\": \"392cf015-5045-4615-a226-df3543d9c15f\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}curl --request POST \
--url https://api.openfx.com/v1/brokerage/{orgId}/fiat_withdrawal \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 10,
"currency": "USD",
"withdrawalAddressId": "392cf015-5045-4615-a226-df3543d9c15f"
}
'{
"status": "success",
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2024-10-10T07:15:44.030Z",
"amount": 1000000,
"currency": "USD",
"network": "FIAT",
"status": "PENDING",
"transactionHash": null,
"withdrawalAddressId": "123e4567-e89b-12d3-a456-426614174001",
"orgId": "123e4567-e89b-12d3-a456-426614174002",
"actorId": "123e4567-e89b-12d3-a456-426614174003",
"actorEmail": "[email protected]",
"comments": "Client initiated the withdrawal via API"
}
}
v1 sunsets December 31, 2026. Migrate to v2 — see the migration guide.
Idempotency is supported on v2 and v3 for this endpoint. v1 does not support idempotency keys — see Migration guide.
Errors
| Status | Message | Notes |
|---|---|---|
| 400 | Query validation failed | Request didn’t match schema (missing fields, bad amount format, etc.) |
| 400 | Checksum verification failed for withdrawal address | Destination bank account record failed its server-side integrity check; re-fetch the account ID and retry |
| 400 | Insufficient balance for this withdraw. | Available balance is less than the requested amount (verbatim from the spec, including the typo) |
| 400 | Withdrawal account is not active or verified | Fiat account exists but isn’t activated/verified; have ops approve it before retrying |
| 401 | The authorization key provided is either invalid or expired, please try again | Mint a fresh JWT — see Authentication |
| 500 | An internal error has occurred | Server fault. Writes are non-idempotent in v1 — fetch the withdrawal by ID before retrying to avoid double-submission |
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
⌘I