# Calculate exchange quote

Calculates an exchange quote for a given operation, currencies, amount and payment method. Requires merchant authentication (x-api-key, x-client-id).

Endpoint: POST /exchange/quotes
Version: 1.0.0

## Header parameters:

  - `x-api-key` (string, required)
    Your merchant API key (must be kept secure, never expose in client-side code)
    Example: "your-api-key"

  - `x-client-id` (string, required)
    Your merchant client identifier (must be kept secure, never expose in client-side code)
    Example: "your-client-id"

## Request fields (application/json):

  - `operationType` (string, required)
    Type of operation (e.g. S = Sell, B = Buy, FF = Fiat to Fiat, CC = Crypto to Crypto)
    Example: "B"

  - `baseCurrencyId` (integer, required)
    Base (spend) currency identifier
    Example: 22

  - `baseAmount` (number, required)
    Amount in base (spend) currency
    Example: 100

  - `targetCurrencyId` (integer, required)
    Target (receive) currency identifier
    Example: 1

  - `paymentMethodId` (integer, required)
    Payment method identifier
    Example: 7

  - `deliveryMethodId` (integer)
    Optional delivery method identifier
    Example: 1

## Response 200 fields (application/json):

  - `success` (boolean)
    Example: true

  - `code` (string)
    Example: "ok"

  - `data` (object)
    Quote details for an exchange

  - `data.spend` (object)

  - `data.spend.amount` (number)
    Example: 100

  - `data.spend.currencyCode` (string)
    Example: "CAD"

  - `data.spend.currencyReference` (string,null)

  - `data.transactionFee` (object)

  - `data.transactionFee.amount` (number)
    Example: 8.1

  - `data.transactionFee.currencyCode` (string)
    Example: "USDT"

  - `data.receive` (object)

  - `data.receive.amount` (number)
    Example: 65.56

  - `data.receive.currencyCode` (string)
    Example: "USDT"

  - `data.receive.currencyReference` (string)
    Example: "tether-omni-coinpayments"

  - `data.delivery` (object)

  - `data.delivery.fee` (object)

  - `data.delivery.fee.amount` (number)

  - `data.delivery.fee.currencyCode` (string)
    Example: "USDT"

  - `data.delivery.time` (object)

  - `data.delivery.time.minDays` (integer,null)

  - `data.delivery.time.maxDays` (integer,null)

  - `data.paymentMethod` (object)

  - `data.paymentMethod.id` (integer)
    Example: 7

  - `data.paymentMethod.name` (string)
    Example: "Interac E-Transfer"

  - `data.paymentMethod.reference` (string)
    Example: "interac"

  - `data.receivePaymentMethod` (object)

  - `data.receivePaymentMethod.id` (integer)
    Example: 7

  - `data.receivePaymentMethod.name` (string)
    Example: "Interac E-Transfer"

  - `data.receivePaymentMethod.reference` (string)
    Example: "interac"

  - `data.rate` (number)
    Effective exchange rate (target/base)
    Example: 0.74

## Response 400 fields (application/json):

  - `code` (string)
    Error code
    Example: "INVALID_INPUT"

  - `message` (string)
    Error message
    Example: "Invalid JSON in request body"

## Response 401 fields (application/json):

  - `code` (string)
    Error code
    Example: "INVALID_INPUT"

  - `message` (string)
    Error message
    Example: "Invalid JSON in request body"

## Response 500 fields (application/json):

  - `code` (string)
    Error code
    Example: "INVALID_INPUT"

  - `message` (string)
    Error message
    Example: "Invalid JSON in request body"


