# Retrieve quoted price

Retrieves cryptocurrency quotes based on fiat currency amount and present exchange rate. And returns a map with a `data` property that contains a `CryptoCurrencyQuote` object.

## Retrieve quoted price

<mark style="color:blue;">`GET`</mark> `https://api.ramp.fatpay.xyz/open/api/onramp/price`

Query cryptocurrency quotes based on fiat currency amount and present exchange rateObject definition

#### Query Parameters

| Name                                                 | Type    | Description                                                                                                                                                         |
| ---------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| fiatCurrency<mark style="color:red;">\*</mark>       | String  | <p>ISO code of fiat currency from \[<a data-mention href="../../../appendix/fiat-currencies">fiat-currencies</a>]<br>e.g. USD</p>                                   |
| currencyAmount<mark style="color:red;">\*</mark>     | Decimal | <p>Fiat currency amount, up to two decimal places<br>e.g 199</p>                                                                                                    |
| cryptoCurrencyCode<mark style="color:red;">\*</mark> | String  | <p>Cryptocurrency code from \[<a data-mention href="../../../appendix/cryptocurrencies-on-ramp">cryptocurrencies-on-ramp</a>]<br>e.g. USDT\_ERC20</p>               |
| payment                                              | String  | <p>Payment method from  \[<a data-mention href="../list-all-fiat-currencies-and-payment-methods#paymentoption">#paymentoption</a>]<br>e.g. BANK\_CARD\_TRANSFER</p> |
| buyType                                              | String  | <p>buyType=nft：nft quoted price</p><p>buyType=fiat：on-ramp quoted price</p>                                                                                         |

#### Headers

| Name                                              | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Content-Type<mark style="color:red;">\*</mark>    | String  | application/json                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| X-Fp-Version<mark style="color:red;">\*</mark>    | String  | <p>FaTPay API version <br>e.g. v1.0</p>                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| X-Fp-Timestamp<mark style="color:red;">\*</mark>  | Integer | <p>Unix timestamp in second <br>e.g. 1661346861</p>                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| X-Fp-Nonce<mark style="color:red;">\*</mark>      | Integer | <p>Random integer <br>e.g. 868964</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| X-Fp-Partner-Id<mark style="color:red;">\*</mark> | String  | <p>Partner ID assigned by FaTPay as Premium Partner <br>e.g. 2yQrS9A0xmM8xpfa</p>                                                                                                                                                                                                                                                                                                                                                                                                    |
| X-Fp-Signature<mark style="color:red;">\*</mark>  | String  | <p><a href="../../verification#signature-for-api-request">Signature</a> generated by <code>APIPrivateKey</code><br>e.g. zbBQ+1nv/5up9riH1wbTSSMmkb26LQj3g1cNWsutOordOrtpk8agcA5D5bdYaGeVlHK0qZ2MlUV+ZfOK9cXMuficeIm5fnEjMEm7s1IZtSivMt5te7EFqe52dtVFafE4hUgwqH6QBZB0yZ1FSqHs2dOCI0e8RKJQBDitxtHkibStl1Jt5wulzzq96qWbbVnwoBqGDT52OtwwEcDqMI4SIAzUAdBhAuLqUig1U4Ne9ufT8B1aAohEk5fvn/Sbom21bEjLdgbt5PwH2wmmuBx4tq31IgcP4V+qEBILY2eMAFzkvxNXaX3PsLbj9NpgyIc3HQl0FtRq3gdN7FsSvyvcWA==</p> |

{% tabs %}
{% tab title="200: OK Successful response" %}

```javascript
{
    "code": 10000,
    "msg": "Succeess",
    "data": {
        "fiatCurrency": "USD",
        "currencyAmount": 199,
        "cryptoCurrency": "USDT",
        "network": "ethereum_rinkeby",
        "cryptoCurrencyCode": "USDT_ERC20" 
        "cryptoCurrencyAmount": 182.0,
        "gasFee": 1.32,
        "cryptoCurrencyUnitPrice": 1.03,
        "platformFee": 5.0,
        "totalFee": 6.32,
        "paymentOptions": {
            "name": "CREDIT_DEBIT_CARD",
            "processingTime": "3 - 7Min",
            "icon": "https://fatpay.xyz/img/1.png",
            "maxAmount": 4000,
            "minAmount": 1
        }
    }
}
```

{% endtab %}
{% endtabs %}

## Object definition

### `CryptoCurrencyQuote`

<table><thead><tr><th>Key</th><th width="127">Format</th><th width="114">Required</th><th>Description</th></tr></thead><tbody><tr><td>fiatCurrency</td><td>String</td><td>Y</td><td>ISO code of fiat currency, e.g. USD, THB, etc.</td></tr><tr><td>currencyAmount</td><td>Decimal</td><td>Y</td><td>Fiat currency amount, up to two decimal places.<br>e.g. 199</td></tr><tr><td>cryptoCurrency</td><td>String</td><td>Y</td><td>Cryptocurrency name, e.g. USDT</td></tr><tr><td>network</td><td>String</td><td>Y</td><td>Cryptocurrency blockchain, e.g. ethereum_mainnet</td></tr><tr><td>cryptoCurrencyCode</td><td>String</td><td>Y</td><td>Cryptocurrency code, e.g. USDT_ERC20</td></tr><tr><td>cryptoCurrencyAmount</td><td>Decimal</td><td>Y</td><td>The amount of cryptocurrency, up to two decimal places.<br>e.g. 182</td></tr><tr><td>cryptoCurrencyUnitPrice</td><td>Decimal</td><td>Y</td><td>Unit price of cryptocurrency, up to two decimal places.<br>e.g. 1.03</td></tr><tr><td>gasFee</td><td>Decimal</td><td>Y</td><td>Gas fee, up to two decimal places.<br>e.g. 1.32</td></tr><tr><td>platformFee</td><td>Decimal</td><td>Y</td><td>Processing fee charged by FaTPay, up to two decimal places.<br>e.g. 11.94</td></tr><tr><td>totalFee</td><td>Decimal</td><td>Y</td><td>Total fee = Gas fee + Processing fee,  up to two decimal places.<br>e.g. 13.26</td></tr><tr><td>paymentOptions</td><td>Object</td><td>Y</td><td>Array of <a href="../list-all-fiat-currencies-and-payment-methods#paymentoption"><code>PaymentOption</code></a></td></tr></tbody></table>
