curl --request PATCH \
--url https://crypto.westminister.tech/api/v1/auth/otc/deposits/{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",
"requested_crypto_amount": "<string>"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/otc/deposits/{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",
"requested_crypto_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',
requested_crypto_amount: '<string>'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/otc/deposits/{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/deposits/{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',
'requested_crypto_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/deposits/{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 \"requested_crypto_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/deposits/{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 \"requested_crypto_amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/otc/deposits/{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 \"requested_crypto_amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deposit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"payment_reference": "<string>",
"proof_url": "/otc-deposits-proof/ce6e4186-16fe-4e0d-a97d-7638f11c6063/8251c719-0941-46da-8792-5acce5e5efc8.pdf",
"transfer_date": "2023-11-07T05:31:56Z",
"merchant_request_id": "<string>",
"checkout_request_id": "<string>",
"mpesa_receipt_number": "<string>",
"mpesa_phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "<string>",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_asset": "<string>",
"requested_network": "<string>",
"requested_crypto_amount": "<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",
"confirmed_at": "2023-11-07T05:31:56Z",
"confirmed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"internal_note": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"credited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"usdt_amount": "<string>",
"credited_asset": "<string>",
"credited_crypto_amount": "<string>",
"credited_to_address": "TJyF42dRr18tSiXV9Cf7JtYUtTbqAGZg94",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_to_address": "<string>",
"payout_to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_network": "<string>",
"payout_asset": "<string>",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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 Draft (B2B Tab 2)
Reads the draft from otc_deposits by path id (status must be draft). Use either the standard quote path (pricing_profile_id + fx_rate_quote_id + requested crypto fields) or the treasury-negotiated path (negotiated_fx_reference or reference_code only). The negotiated path consumes a single-use reference from otc_negotiated_fx_references, sets fiat and crypto amounts from the agreed terms, applies fees from a matching b2b otc_type: deposit pricing profile, clears fx_rate_quote_id, and transitions draft → priced. 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/deposits/{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",
"requested_crypto_amount": "<string>"
}
'import requests
url = "https://crypto.westminister.tech/api/v1/auth/otc/deposits/{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",
"requested_crypto_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',
requested_crypto_amount: '<string>'
})
};
fetch('https://crypto.westminister.tech/api/v1/auth/otc/deposits/{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/deposits/{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',
'requested_crypto_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/deposits/{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 \"requested_crypto_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/deposits/{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 \"requested_crypto_amount\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://crypto.westminister.tech/api/v1/auth/otc/deposits/{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 \"requested_crypto_amount\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"deposit": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"merchant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"fiat_amount": "<string>",
"fiat_currency": "<string>",
"payment_reference": "<string>",
"proof_url": "/otc-deposits-proof/ce6e4186-16fe-4e0d-a97d-7638f11c6063/8251c719-0941-46da-8792-5acce5e5efc8.pdf",
"transfer_date": "2023-11-07T05:31:56Z",
"merchant_request_id": "<string>",
"checkout_request_id": "<string>",
"mpesa_receipt_number": "<string>",
"mpesa_phone_number": "<string>",
"sender_account_name": "<string>",
"sender_account_number_last4": "<string>",
"sender_bank_name": "<string>",
"sender_bank_branch": "<string>",
"receipt_number": "<string>",
"receipt_uploaded_at": "2023-11-07T05:31:56Z",
"proof_file_name": "<string>",
"proof_mime_type": "<string>",
"proof_size_bytes": 123,
"proof_file_sha256": "<string>",
"requested_asset": "<string>",
"requested_network": "<string>",
"requested_crypto_amount": "<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",
"confirmed_at": "2023-11-07T05:31:56Z",
"confirmed_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejected_at": "2023-11-07T05:31:56Z",
"rejected_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"rejection_reason": "<string>",
"internal_note": "<string>",
"credited_at": "2023-11-07T05:31:56Z",
"credited_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"usdt_amount": "<string>",
"credited_asset": "<string>",
"credited_crypto_amount": "<string>",
"credited_to_address": "TJyF42dRr18tSiXV9Cf7JtYUtTbqAGZg94",
"to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_to_address": "<string>",
"payout_to_wallet_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"payout_network": "<string>",
"payout_asset": "<string>",
"transfer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"idempotency_key": "<string>",
"submitted_at": "2023-11-07T05:31:56Z",
"assigned_to_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"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, and requested crypto fields.
Negotiated quote. Send only negotiated_fx_reference or reference_code (mutually exclusive with the standard fields).
Treasury-issued code (e.g. NFX-20260609-A1B2). Consumes the reference atomically.
Alias for negotiated_fx_reference. When set, triggers the negotiated quote path and marks the reference consumed.
USDT, USDC tron, ethereum, solana