> ## Documentation Index
> Fetch the complete documentation index at: https://docs.primevault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an FX Quote

> Request priced quotes to convert one fiat currency to another by describing the source, destination, assets, and exactly one amount.

**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

<ParamField body="intent" type="TransactionIntentRequest" required>
  Quote criteria for the requested FX conversion. See [TransactionIntentRequest](/api-basics/data-models#transactionintentrequest).

  <Expandable title="Properties">
    <ParamField body="intent.input" type="IntentAsset" required>
      What you spend. See [IntentAsset](/api-basics/data-models#intentasset).

      <Expandable title="Properties">
        <ParamField body="intent.input.asset" type="string" required>
          Fiat currency code, such as `NGN` or `GBP`.
        </ParamField>

        <ParamField body="intent.input.amount" type="string">
          Decimal amount to spend. Provide either this or `intent.output.amount`, not both.
        </ParamField>

        <ParamField body="intent.input.vaultId" type="string">
          Vault that holds the input currency.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="intent.output" type="IntentAsset" required>
      What you receive. See [IntentAsset](/api-basics/data-models#intentasset).

      <Expandable title="Properties">
        <ParamField body="intent.output.asset" type="string" required>
          Fiat currency code, such as `USD` or `EUR`.
        </ParamField>

        <ParamField body="intent.output.amount" type="string">
          Decimal amount to receive. Provide either this or `intent.input.amount`, not both.
        </ParamField>

        <ParamField body="intent.output.vaultId" type="string">
          Vault that receives the output currency.
        </ParamField>
      </Expandable>
    </ParamField>

    <ParamField body="intent.source" type="TransferPartyData" required>
      Source endpoint, typically a `BANK_ACCOUNT`. Set its `paymentRail` and omit `chain`. See [TransferPartyData](/api-basics/data-models#transferpartydata).
    </ParamField>

    <ParamField body="intent.destination" type="TransferPartyData" required>
      Destination endpoint, typically a `BANK_ACCOUNT`. Set its `paymentRail` and omit `chain`. See [TransferPartyData](/api-basics/data-models#transferpartydata).
    </ParamField>
  </Expandable>
</ParamField>

<Note>
  Both `input.asset` and `output.asset` must be fiat currencies. If one side is a digital asset such as USDC, use [Ramps](/transactions/ramps/get-quote) instead. Supply exactly one non-null amount. The input and output vaults must belong to the same sub-org.
</Note>

## Response

<ResponseField name="quotes" type="QuoteResponseItem[]">
  Available quotes for the intent. See [QuoteResponseItem](/api-basics/data-models#quoteresponseitem).

  <Expandable title="Properties">
    <ResponseField name="quoteId" type="string">
      Quote identifier. Pass it to [Execute Quote](/transactions/fx/execute-quote).
    </ResponseField>

    <ResponseField name="rate" type="string | null">
      Quoted conversion rate.
    </ResponseField>

    <ResponseField name="fees" type="Fees | null">
      Fee `amount`, `asset`, and optional `amountInFiat`. See [Fees](/api-basics/data-models#fees).
    </ResponseField>

    <ResponseField name="input" type="IntentAsset">
      Quoted input currency and amount. See [IntentAsset](/api-basics/data-models#intentasset).
    </ResponseField>

    <ResponseField name="output" type="IntentAsset">
      Quoted output currency and amount. See [IntentAsset](/api-basics/data-models#intentasset).
    </ResponseField>

    <ResponseField name="source" type="TransferPartyData">
      Source endpoint for the conversion. See [TransferPartyData](/api-basics/data-models#transferpartydata).
    </ResponseField>

    <ResponseField name="destination" type="TransferPartyData">
      Destination endpoint for the conversion. See [TransferPartyData](/api-basics/data-models#transferpartydata).
    </ResponseField>

    <ResponseField name="expiresAt" type="string">
      ISO 8601 time when the quote expires. Execute the quote before this time.
    </ResponseField>
  </Expandable>
</ResponseField>

<RequestExample dropdown>
  ```json Request example theme={null}
  {
    "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" }
    }
  }
  ```

  ```bash cURL theme={null}
  # 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" }
      }
    }'
  ```

  ```typescript JavaScript SDK theme={null}
  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);
  ```
</RequestExample>

<ResponseExample>
  ```json JSON example theme={null}
  {
    "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"
      }
    ]
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.