# Get Current Price

**All pricing information can be retrieved with a POST request.**

URL: <https://widget.swapped.com/api/v1/merchant/pricing>

#### Request Data:

```json
{
    "api_key": "",
    "payment_method": "creditcard",
    "fiat_currency": "USD",
    "fiat_amount": 500,
    "crypto_currency": "ETH",
    "crypto_amount": 1,
    "region": "BE"
}
```

**Note:** The <mark style="color:red;">`crypto_amount`</mark> and <mark style="color:red;">`fiat_amount`</mark> fields are optional. If only one is provided, the other is calculated based on the current exchange rate.

**Note:** <mark style="color:red;">`payment_method`</mark> value must be a valid [payment group](https://widget.swapped.com/api/v1/merchant/get_payment_methods), and <mark style="color:red;">`region`</mark> is required, or the request will fail.

#### Markup Parameter

Optionally, the <mark style="color:red;">`markup`</mark> parameter can be used to apply a different markup on a per-request basis without modifying your merchant default.

#### Request Data with Markup:

```json
{
    "api_key": "",
    "payment_method": "creditcard",
    "fiat_currency": "USD",
    "fiat_amount": 500,
    "crypto_currency": "ETH",
    "crypto_amount": 1,
    "markup": 3,
    "region": "BE"
}
```

### Request Definition:

* `api_key`: The merchant's public key. Identifies the requesting merchant.
* `payment_method`: Payment method to use (e.g., `creditcard`).
  * &#x20;[Get valid methods via the payment methods endpoint.](https://docs.swapped.com/swapped-ramp/endpoints/onramp-endpoints/get-payment-methods)
* `fiat_currency`: The fiat currency you want to query. For the full list of supported currencies, see [here](https://docs.swapped.com/swapped-ramp/readme/supported-fiat-currencies).
* `fiat_amount`: The fiat amount you want to convert.
* `crypto_currency`: The cryptocurrency you want to convert to. For the full list of supported currencies, see [here](https://docs.swapped.com/swapped-ramp/readme/supported-cryptocurrencies).
* `crypto_amount`: The cryptocurrency amount you want to convert to.
* `region`: The 2-letter ISO-3166 code of the country the method is available in.
* `markup`: An additional fee applied to the cryptocurrency purchase price. Value must be between 0 and 5.

## Response data:

```json
{
    "success": true,
    "data": {
        "crypto_amount": 0.12284,
        "crypto_currency": "ETH",
        "crypto_unit_price": 4070.34,
        "network_fee": 0.2,
        "network_fee_local": 0.24,
        "fiat_amount_incl_fees": 440.85,
        "fiat_amount_excl_fees": 424.61,
        "fiat_amount_incl_fees_local": 519.12,
        "fiat_amount_excl_fees_local": 500,
        "fiat_currency": "USD",
        "markup_fiat_value": 20,
        "processing_fee": 19.11,
        "payment_method": "creditcard-extra",
        "payment_group": "creditcard"
    }
}
```

### Response Definition:

* `crypto_amount`: Amount of crypto the user will receive (e.g., 0.14137 ETH).
* `crypto_currency`: The crypto token used (e.g., "ETH").
* `crypto_unit_price`: Price per 1 unit of crypto in the given fiat (e.g., 3536.82 EUR per ETH).
* `network_fee`: Network fee in EUR.
* `network_fee_local`: Provides the network fee amount converted to the user's local fiat currency.
* `fiat_amount_incl_fees`: Fiat value the user is paying, including fees, in EUR.
* `fiat_amount_excl_fees`: Fiat value the user is paying, excluding fees, in EUR.
* `fiat_amount_incl_fees_local`: Total fiat paid, including fees, in user’s fiat currency (e.g., USD).
* `fiat_amount_excl_fees_local`: Total fiat paid, excluding fees, in user’s fiat currency (e.g., USD).
* `fiat_currency`: The local fiat currency (e.g., "USD").
* `markup_fiat_value`: Additional markup displayed in fiat.
  * **Merchants can add a markup via** <mark style="color:blue;">`dashboard.swapped.com > Settings > Affiliate Fee`</mark>.
  * Only the **workspace owner** can configure this.
* `processing_fee`: Total processing fee in local fiat (e.g., 19.21 EUR).
* `payment_method`: The payment method used for the order.
* `payment_group`: The payment group the method belongs to.

{% hint style="danger" %}
All <kbd><mark style="color:red;">/merchant/<mark style="color:red;"></kbd> endpoints are subject to a global rate limit of **100 requests per second**. Exceeding this limit may result in throttling.
{% endhint %}
