/widget/buy/rate

Get currency rate

Query Parameters
  • from
    Type: string
    required

    Currency to convert from

  • to
    Type: string
    required

    Currency to convert to

  • type
    Type: string
    required

    Transactions type

  • amount
    Type: string
    required

    Amount to convert

  • is_total
    Type: boolean

    Is passed amount with fee.

  • widget_id
    Type: string
    required

    Widget id

  • network
    Type: string

    Cryptocurrency network

  • payment_method
    Type: string

    Payment method. Available: card, volt, apple, google, pix, invoice, spend_card.

  • address
    Type: string

    User wallet address. Available only if feature enabled for widget

  • card_bin
    Type: string

    User card bin

  • card_id
    Type: string

    Mercuryo card id

  • ip_address
    Type: string

    User IP address. Feature must be enabled for widget.

  • card_type
    Type: string

    Card payment system. Feature must be enabled for widget. Note that parameter can be used only with ip_address

  • country
    Type: string

    User country. Feature must be enabled for widget. Note that ip_address takes precedence over country

  • method_code
    Type: string

    Payment method code for invoice payment. Applies when the value of payment_method = invoice. Available values: EightBWorld_bri, EightBWorld_bni, EightBWorld_qris , EightBWorld_ovo

  • merchant_transaction_id
    Type: string

    Id, which is issued by the merchant at the beginning of interaction with the user

  • flow
    Type: string

    Payment flow. Available: buy, top_up, top_up_spend, spend, partial_top_up_spend

  • transaction_speed_type
    Type: string

    Transaction speed type. Available: standard, fast

  • voe_option
    Type: stringenum

    VOE option. Default: boost. Available: boost, non-boost

    values
    • boost
    • non-boost
Responses
  • application/json
  • application/json
  • 403

    Forbidden

  • 500

    Internal server error

Request Example for get/widget/buy/rate
curl 'https://sandbox-api.mrcr.io/v1.6/widget/buy/rate?from=&to=&type=&amount=&is_total=true&widget_id=&network=&payment_method=&address=&card_bin=&card_id=&ip_address=&card_type=&country=&method_code=&merchant_transaction_id=&flow=&transaction_speed_type=&voe_option=boost'
{
  "status": 200,
  "data": {
    "buy_token": "2e9a8afe7707983fd1f213f75decd33ee3a06dd6837a81835179e8aeb2a1c218eyJ0IjoiMTY3NTE3MzgxOCIsInR0Ijp0cnVlLCJjIjoiQlRDIiwiYSI6IjAuMDAxNzU1MTUiLCJmYyI6IkVVUiIsImZhIjoiNDIuNTgiLCJmIjoiNS4yMiIsInRmIjoiMC4xIiwic2YiOiIxLjQ3ODA2NDUxNTciLCJyIjoiMjEyODIuNjYzNTY3OTEiLCJjaWQiOiJlNjFiNTA1ZTIxYmM4NDUwZmZmNzk0MTM5NjBkNDMyNyIsInciOiIyMzM1YzZkMC05ZTM5LTQ3MmYtYTkzNi0wYzY5Y2U2MTgzMDMiLCJvcCI6ImJ1eSIsInBhIjoiY2FyZCIsInB0IjpudWxsLCJwcyI6bnVsbCwibiI6IkJJVENPSU4iLCJmaSI6bnVsbH0=",
    "currency": "BTC",
    "amount": "0.02000000",
    "fiat_amount": "432.50",
    "fiat_currency": "EUR",
    "rate": "51801.09",
    "reverse_rate": "0.00001930",
    "fee": {
      "BTC": "0.00075999",
      "EUR": "17.09"
    },
    "subtotal": {
      "BTC": "0.01924001",
      "EUR": "432.50"
    },
    "total": {
      "BTC": "0.02000000",
      "EUR": "449.59"
    },
    "kyc_limit_exceeded": false,
    "kyc_limits": false,
    "dca": true,
    "is_native_available": false
  }
}