Quote USD to VES at the BCV rate
Convert a USD amount to VES using the authoritative BCV rate and a median across available BCV sources.
Request a quote
GET /v1/quote converts a USD amount to VES at the current BCV rate. Pass usdAmount as a query parameter and authenticate with your tenant x-api-key.
curl "${API_URL}/v1/quote?usdAmount=25" \
--header "x-api-key: ${VEXPAY_API_KEY}"const response = await fetch(
`${process.env.API_URL}/v1/quote?usdAmount=25`,
{ headers: { 'x-api-key': process.env.VEXPAY_API_KEY } }
);
if (!response.ok) throw new Error(`API error: ${response.status}`);
const quote = await response.json();Response fields
| Field | Meaning |
|---|---|
| bcvRate | Authoritative VEX FX BCV rate used when creating payments |
| vesAmount | usdAmount converted at bcvRate |
| medianRate | Median of available BCV sources (sources.vexFx and sources.bank when configured) |
| medianVesAmount | usdAmount converted at medianRate |
| sources.vexFx | VEX FX Official BCV rate (same as bcvRate) |
| sources.bank | Bank BCV rate when configured, or { error: "BANK_NOT_CONFIGURED" } |
| fetchedAt | ISO timestamp when the authoritative rate was fetched |
{
"usdAmount": 25,
"bcvRate": 36.5,
"vesAmount": 912.5,
"medianRate": 36.55,
"medianVesAmount": 913.75,
"source": "bcv",
"fetchedAt": "2026-07-20T15:00:00.000Z",
"sources": {
"vexFx": { "bcvRate": 36.5, "fetchedAt": "2026-07-20T15:00:00.000Z" },
"bank": { "bcvRate": 36.6, "fechavalor": "2026-07-20", "fetchedAt": "2026-07-20T15:00:00.000Z" }
}
}How the median is calculated
- Successful numeric BCV rates from available sources are collected.
- One rate → that rate is the median.
- Two rates → the average of the two (median of an even set).
- If sources.bank is unavailable, medianRate equals bcvRate.