πŸ“ˆGet Current Price

Need help with your integration? Click here to chat with our custom GPT for instant answers.

All pricing information can be retrieved with a POST request.

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

Request Data:

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

Note: The crypto_amount and fiat_amount fields are optional. If you only provide one of them, the other will be calculated based on the current exchange rate.

Request Definition:

  • api_key: The merchant's public key. Identifies the requesting merchant.

  • payment_method: Payment method to use (e.g., creditcard).

  • fiat_currency: The fiat currency you want to query. For the full list of supported currencies, see here.

  • 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.

  • crypto_amount: The cryptocurrency amount you want to convert to.

Response data:

{
    "success": true,
    "data": {
        "crypto_amount": 0.144959,
        "crypto_currency": "ETH",
        "crypto_unit_price": 3449.26,
        "network_fee": 0.25,
        "network_fee_local": 0.28,
        "fiat_amount_incl_fees": 459.71,
        "fiat_amount_excl_fees": 442.75,
        "fiat_amount_incl_fees_local": 519.16,
        "fiat_amount_excl_fees_local": 500,
        "fiat_currency": "USD",
        "markup_fiat_value": 0,
        "processing_fee": 19.16
    }
}

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 dashboard.swapped.com > Settings > Affiliate Fee.

    • Only the workspace owner can configure this.

  • processing_fee: Total processing fee in local fiat (e.g., 19.21 EUR).

Last updated