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

# Fetching Quote

> The buy-quote API returns real-time onramp prices, fees, and amounts from fiat currency, crypto token, network, and amount inputs.

The Fetching Buy Quote API enables merchants to retrieve the buy price for specific crypto assets in real time. This is essential for providing accurate quotes to users during the onramp process.

Merchants can use this API to get the buy price for the required crypto assets in exchange for supported fiat currencies on the required blockchain network.

## Functionality Overview

The API calculates the price based on:

1. The fiat currency (from\_currency).
2. The crypto token to be purchased (to\_currency).
3. The blockchain network (network).
4. Either the fiat amount to be converted (from\_amount) or the crypto amount required (to\_amount).

This flexibility ensures real-time, accurate pricing tailored to merchant and user needs.

## Sample Request

Here’s an example API request.

**Sample request:**

```bash theme={null}
curl --location 'https://api.saber.money/api/v2/wallet/w/quote?from_currency=INR&to_currency=USDT&network=BSC&to_amount=55.38' \
  --header 'X-Timestamp: {{timestamp}}' \
  --header 'X-Client-Id: •••••••' \
  --header 'X-Request-Id: 3456' \
  --header 'X-User-Id: •••••••' \
  --header 'X-Secret-Key: •••••••'
```

**Sample response:**

```json theme={null}
{
  "success": true,
  "data": {
    "from_currency": "INR",
    "to_currency": "USDT",
    "network": "BSC",
    "from_amount": 5036.81,
    "pre_fee_to_amount": 55.49,
    "to_amount": 55.38,
    "base_price": 90.77,
    "final_price": 90.95,
    "total_fee": 0.11,
    "fee_currency": "USDT",
    "fee_breakup": {
      "platform_fee": 0.111,
      "network_fee": 0,
      "client_fee": 0,
      "discount": 0,
      "tax_on_fee": 0,
      "tds": 0
    },
    "transaction_type": "EXTERNAL_BUY"
  }
}
```

> **Note:** For payment methods that incur a banking/partner fee, the `fee_breakup` object may also include an additional `banking_fee` key (a number). It is omitted from the response when zero.

## Required Parameters

| Parameter               | Description                                                                                                                                         | Supported Values                                                                       | Required                             |
| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------ |
| from\_currency          | The fiat currency to be converted                                                                                                                   | INR, EUR, GBP                                                                          | Yes                                  |
| to\_currency            | The crypto asset to be purchased                                                                                                                    | USDT, USDC                                                                             | Yes                                  |
| network                 | The blockchain network for the transaction                                                                                                          | All major networks (Matic preferred for cost-efficiency)                               | Yes                                  |
| from\_amount            | Amount of fiat currency to be converted                                                                                                             | Numeric value                                                                          | Either this or to\_amount required   |
| to\_amount              | Amount of crypto asset to be purchased                                                                                                              | Numeric value                                                                          | Either this or from\_amount required |
| payment\_method         | The payment method used for the transaction; influences spread/fees in the returned price. Should match the payment\_method used at order creation. | A supported payment method code (e.g. sepa\_transfer) — see "Fetching Payment Methods" | No                                   |
| payment\_instrument\_id | The payment instrument used for the transaction                                                                                                     | String                                                                                 | No                                   |
| is\_first\_party        | Whether the transaction is a first-party transaction                                                                                                | Boolean (true/false)                                                                   | No                                   |

## Additional Notes

* Preferred Network: While all major networks are supported, Matic is recommended due to lower costs.
* Mandatory Parameters: Ensure all required parameters are included to avoid errors.

For more details on the quote, refer to the Fetch Buy Quote API Reference [here](https://saber-money.readme.io/reference/fetchbuyprice).


## Related topics

- [Fetching Quote](/offramp/operations/quote.md)
- [Overview](/offramp/overview.md)
- [Fetching Transaction Status](/onramp/operations/fetch-status.md)
