# Get a Quote

Retrieve current pricing for a crypto transaction before creating an order. Always call this endpoint immediately before displaying a price to the customer — do not cache responses.

## Endpoint


```
GET /{partnerRef}/v2/quotes/{orderType}
```

| Path parameter | Description |
|  --- | --- |
| `orderType` | `buy` or `sell` |


## Query parameters

| Parameter | Required | Description |
|  --- | --- | --- |
| `fiat` | Yes | Fiat currency code (e.g., `AUD`, `USD`, `EUR`). Must be a value from `GET /v2/fiats`. |
| `crypto` | Yes | Cryptocurrency code (e.g., `ETH`, `BTC`, `USDT`). Must be a value from `GET /v2/crypto`. |
| `blockchain` | Yes | Blockchain network (e.g., `ETH`, `BNB`). Required for multi-chain assets. |
| `paymentMethodId` | Yes | Payment method identifier. See supported values below. |
| `fiatAmount` | Conditional | Fiat amount the customer wants to spend. Either `fiatAmount` or `cryptoAmount` must be provided. |
| `cryptoAmount` | Conditional | Crypto amount the customer wants to receive. Either `fiatAmount` or `cryptoAmount` must be provided. |
| `externalCustomerId` | No | Your stable customer identifier. Used to return more accurate pricing based on order history. |
| `ipAddress` | No | Customer's IP address. Used to determine regional availability and pricing. |
| `discountCode` | No | Discount code to apply to the quote. |


## Payment method IDs

`debit-credit-card` · `apple-pay` · `sepa-bank-transfer` · `gbp-bank-transfer` · `ach-bank-transfer` · `payid-bank-transfer` · `upi` · `pix` · `paypal`

## Example request


```bash
curl -X GET "https://api.banxa-sandbox.com/{partnerRef}/v2/quotes/buy" \
  -H "x-api-key: YOUR_API_KEY" \
  -G \
  --data-urlencode "fiat=AUD" \
  --data-urlencode "crypto=ETH" \
  --data-urlencode "blockchain=ETH" \
  --data-urlencode "paymentMethodId=debit-credit-card" \
  --data-urlencode "fiatAmount=200"
```

## Response

A successful response returns pricing for the requested combination.


```json
{
  "paymentMethodId": "debit-credit-card",
  "cryptoAmount": "0.03564700",
  "fiatAmount": "200.00",
  "processingFee": "0.92",
  "networkFee": "1.67"
}
```

| Field | Description |
|  --- | --- |
| `paymentMethodId` | Payment method the quote applies to |
| `cryptoAmount` | Crypto amount the customer will receive |
| `fiatAmount` | Fiat amount the customer will spend |
| `processingFee` | Banxa processing fee in fiat |
| `networkFee` | Blockchain network fee in fiat |


### Response with discount code

When a `discountCode` is provided, the response is an array. Each item includes a `discount` object with the original (pre-discount) quote values alongside the discounted result:


```json
[
  {
    "paymentMethodId": "debit-credit-card",
    "cryptoAmount": "0.03564700",
    "fiatAmount": "200.00",
    "processingFee": "0.92",
    "networkFee": "1.67",
    "discount": {
      "originalQuote": {
        "originalCryptoAmount": "0.235214",
        "orginalNetworkFee": "0.00",
        "originalProcessingFee": "0.00",
        "originalFiatAmount": "500.00"
      },
      "discountCode": "XMAS"
    }
  }
]
```

## Usage notes

- Call this endpoint for every order — pricing changes frequently.
- If `cryptoAmount` is provided, the response will include the equivalent `fiatAmount` and vice versa.
- Use the returned values to populate your quote UI before creating an order.
- The quote is not a guarantee of price. The final price is confirmed at checkout.