FX
Get an FX Quote
Request priced quotes to convert one fiat currency to another by describing the source, destination, assets, and exactly one amount.
Request example
{
"intent": {
"input": { "asset": "NGN", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" }
}
}
# Sample only. Generate a new signed token for each request
# (see Authentication). Tokens expire after 120 seconds.
curl --request POST \
--url "https://api.primevault.com/api/external/transactions/v2/quote/" \
--header "Authorization: Bearer <signed JWT>" \
--header "Api-Key: <API key>" \
--header "Content-Type: application/json" \
--data '{
"intent": {
"input": { "asset": "NGN", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" }
}
}'
const quoteResponse = await apiClient.getQuote({
intent: {
input: { asset: "NGN", vaultId: "vault_ngn_business" },
output: { asset: "USD", amount: "10000.00", vaultId: "vault_usd_settlement" },
source: { type: "BANK_ACCOUNT", id: "bank_account_ngn_business", paymentRail: "NIP" },
destination: { type: "BANK_ACCOUNT", id: "bank_account_usd_supplier", paymentRail: "ACH" },
},
});
console.log(quoteResponse.quotes);
{
"quotes": [
{
"quoteId": "quote_fx_invoice_1042",
"fees": { "amount": "22500.00", "asset": "NGN" },
"input": { "asset": "NGN", "amount": "15000000.00", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" },
"expiresAt": "2026-09-30T10:00:30+00:00"
}
]
}
POST
/api/external/transactions/v2/quote/
Example: an FX quote to pay a supplier exactly 10,000 USD over ACH, funded in NGN from a Nigerian business bank account over NIP.
Request body
TransactionIntentRequest
required
Quote criteria for the requested FX conversion. See TransactionIntentRequest.
Show Properties
Show Properties
IntentAsset
required
What you spend. See IntentAsset.
IntentAsset
required
What you receive. See IntentAsset.
TransferPartyData
required
Source endpoint, typically a
BANK_ACCOUNT. Set its paymentRail and omit chain. See TransferPartyData.TransferPartyData
required
Destination endpoint, typically a
BANK_ACCOUNT. Set its paymentRail and omit chain. See TransferPartyData.Both
input.asset and output.asset must be fiat currencies. If one side is a digital asset such as USDC, use Ramps instead. Supply exactly one non-null amount. The input and output vaults must belong to the same sub-org.Response
QuoteResponseItem[]
Available quotes for the intent. See QuoteResponseItem.
Show Properties
Show Properties
string
Quote identifier. Pass it to Execute Quote.
string | null
Quoted conversion rate.
IntentAsset
Quoted input currency and amount. See IntentAsset.
IntentAsset
Quoted output currency and amount. See IntentAsset.
TransferPartyData
Source endpoint for the conversion. See TransferPartyData.
TransferPartyData
Destination endpoint for the conversion. See TransferPartyData.
string
ISO 8601 time when the quote expires. Execute the quote before this time.
Request example
{
"intent": {
"input": { "asset": "NGN", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" }
}
}
# Sample only. Generate a new signed token for each request
# (see Authentication). Tokens expire after 120 seconds.
curl --request POST \
--url "https://api.primevault.com/api/external/transactions/v2/quote/" \
--header "Authorization: Bearer <signed JWT>" \
--header "Api-Key: <API key>" \
--header "Content-Type: application/json" \
--data '{
"intent": {
"input": { "asset": "NGN", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" }
}
}'
const quoteResponse = await apiClient.getQuote({
intent: {
input: { asset: "NGN", vaultId: "vault_ngn_business" },
output: { asset: "USD", amount: "10000.00", vaultId: "vault_usd_settlement" },
source: { type: "BANK_ACCOUNT", id: "bank_account_ngn_business", paymentRail: "NIP" },
destination: { type: "BANK_ACCOUNT", id: "bank_account_usd_supplier", paymentRail: "ACH" },
},
});
console.log(quoteResponse.quotes);
{
"quotes": [
{
"quoteId": "quote_fx_invoice_1042",
"fees": { "amount": "22500.00", "asset": "NGN" },
"input": { "asset": "NGN", "amount": "15000000.00", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" },
"expiresAt": "2026-09-30T10:00:30+00:00"
}
]
}
⌘I
Request example
{
"intent": {
"input": { "asset": "NGN", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" }
}
}
# Sample only. Generate a new signed token for each request
# (see Authentication). Tokens expire after 120 seconds.
curl --request POST \
--url "https://api.primevault.com/api/external/transactions/v2/quote/" \
--header "Authorization: Bearer <signed JWT>" \
--header "Api-Key: <API key>" \
--header "Content-Type: application/json" \
--data '{
"intent": {
"input": { "asset": "NGN", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" }
}
}'
const quoteResponse = await apiClient.getQuote({
intent: {
input: { asset: "NGN", vaultId: "vault_ngn_business" },
output: { asset: "USD", amount: "10000.00", vaultId: "vault_usd_settlement" },
source: { type: "BANK_ACCOUNT", id: "bank_account_ngn_business", paymentRail: "NIP" },
destination: { type: "BANK_ACCOUNT", id: "bank_account_usd_supplier", paymentRail: "ACH" },
},
});
console.log(quoteResponse.quotes);
{
"quotes": [
{
"quoteId": "quote_fx_invoice_1042",
"fees": { "amount": "22500.00", "asset": "NGN" },
"input": { "asset": "NGN", "amount": "15000000.00", "vaultId": "vault_ngn_business" },
"output": { "asset": "USD", "amount": "10000.00", "vaultId": "vault_usd_settlement" },
"source": { "type": "BANK_ACCOUNT", "id": "bank_account_ngn_business", "paymentRail": "NIP" },
"destination": { "type": "BANK_ACCOUNT", "id": "bank_account_usd_supplier", "paymentRail": "ACH" },
"expiresAt": "2026-09-30T10:00:30+00:00"
}
]
}