curl --request PATCH \
--url https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"negotiated_fx_reference": "<string>",
"reference_code": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crypto_amount": "<string>",
"fiat_amount": "<string>"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote"
payload = {
"negotiated_fx_reference": "<string>",
"reference_code": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crypto_amount": "<string>",
"fiat_amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
negotiated_fx_reference: '<string>',
reference_code: '<string>',
pricing_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fx_rate_quote_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
crypto_amount: '<string>',
fiat_amount: '<string>'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/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://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'negotiated_fx_reference' => '<string>',
'reference_code' => '<string>',
'pricing_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fx_rate_quote_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'crypto_amount' => '<string>',
'fiat_amount' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote"
payload := strings.NewReader("{\n \"negotiated_fx_reference\": \"<string>\",\n \"reference_code\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"crypto_amount\": \"<string>\",\n \"fiat_amount\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"negotiated_fx_reference\": \"<string>\",\n \"reference_code\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"crypto_amount\": \"<string>\",\n \"fiat_amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"negotiated_fx_reference\": \"<string>\",\n \"reference_code\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"crypto_amount\": \"<string>\",\n \"fiat_amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "<string>",
"crypto_amount": "<string>",
"usdt_amount": "<string>",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"from_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_bank_account": "<string>",
"payout_bank_name": "<string>",
"payout_phone_number": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"negotiated_fx_reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"completed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"internal_note": "<string>",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"negotiated_fx_reference": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_code": "<string>",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_display_name": "<string>",
"agreed_transaction_date": "2023-12-25",
"timezone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"asset": "<string>",
"fiat_currency": "<string>",
"network": "<string>",
"agreed_amount": "<string>",
"reference_fx_rate": "<string>",
"agreed_fx_rate": "<string>",
"narration": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_display_name": "<string>",
"consumed_at": "2023-11-07T05:31:56Z",
"consumed_otc_deposit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consumed_otc_withdrawal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gross_fiat_amount": "<string>",
"gross_crypto_amount": "<string>",
"net_fiat_amount": "<string>",
"net_crypto_amount": "<string>",
"total_fee_amount": "<string>",
"fee_currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Apply Commercial Quote To Withdrawal Draft (B2B step 2)
Use either the standard quote path (pricing_profile_id + fx_rate_quote_id + asset and amounts) or the treasury-negotiated path (negotiated_fx_reference or reference_code only). The negotiated path consumes a single-use otc_type: withdrawal reference, sets crypto debit and net fiat payout from agreed terms, applies fees from a matching b2b otc_type: withdrawal pricing profile, clears fx_rate_quote_id, and transitions draft → priced. Mobile Money KES payouts must be ≤ 500,000 after fees. On the negotiated path, the 200 response includes negotiated_fx_reference with status: consumed.
curl --request PATCH \
--url https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"negotiated_fx_reference": "<string>",
"reference_code": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crypto_amount": "<string>",
"fiat_amount": "<string>"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote"
payload = {
"negotiated_fx_reference": "<string>",
"reference_code": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crypto_amount": "<string>",
"fiat_amount": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
negotiated_fx_reference: '<string>',
reference_code: '<string>',
pricing_profile_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
fx_rate_quote_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
crypto_amount: '<string>',
fiat_amount: '<string>'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/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://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'negotiated_fx_reference' => '<string>',
'reference_code' => '<string>',
'pricing_profile_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'fx_rate_quote_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'crypto_amount' => '<string>',
'fiat_amount' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote"
payload := strings.NewReader("{\n \"negotiated_fx_reference\": \"<string>\",\n \"reference_code\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"crypto_amount\": \"<string>\",\n \"fiat_amount\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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))
}HttpResponse<String> response = Unirest.patch("https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"negotiated_fx_reference\": \"<string>\",\n \"reference_code\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"crypto_amount\": \"<string>\",\n \"fiat_amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/otc/withdrawals/{id}/quote")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"negotiated_fx_reference\": \"<string>\",\n \"reference_code\": \"<string>\",\n \"pricing_profile_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"fx_rate_quote_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"crypto_amount\": \"<string>\",\n \"fiat_amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"withdrawal": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"asset": "<string>",
"crypto_amount": "<string>",
"usdt_amount": "<string>",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"from_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_bank_account": "<string>",
"payout_bank_name": "<string>",
"payout_phone_number": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fx_rate_quote_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"negotiated_fx_reference_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"approved_at": "2023-11-07T05:31:56Z",
"approved_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"completed_at": "2023-11-07T05:31:56Z",
"completed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"internal_note": "<string>",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"negotiated_fx_reference": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reference_code": "<string>",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_display_name": "<string>",
"agreed_transaction_date": "2023-12-25",
"timezone": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"asset": "<string>",
"fiat_currency": "<string>",
"network": "<string>",
"agreed_amount": "<string>",
"reference_fx_rate": "<string>",
"agreed_fx_rate": "<string>",
"narration": "<string>",
"pricing_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by_display_name": "<string>",
"consumed_at": "2023-11-07T05:31:56Z",
"consumed_otc_deposit_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"consumed_otc_withdrawal_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"gross_fiat_amount": "<string>",
"gross_crypto_amount": "<string>",
"net_fiat_amount": "<string>",
"net_crypto_amount": "<string>",
"total_fee_amount": "<string>",
"fee_currency": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Standard quote. Send pricing_profile_id, fx_rate_quote_id, asset, crypto_amount, and fiat_amount.
Negotiated quote. Send only negotiated_fx_reference or reference_code (mutually exclusive with the standard fields). Requires from_wallet_id on the draft.
Treasury-issued withdrawal reference code. Consumes the reference atomically.
Alias for negotiated_fx_reference.
USDT, USDC