Fetching Sell Price

Overview

The Sell Quote API provides merchants with a real-time conversion quote for users during the on-ramp process. This API helps merchants display accurate pricing information to their users without directly linking to the order creation process. It ensures users have a clear understanding of the conversion rates, fees, and final amounts before initiating a transaction.


Endpoint

URL: https://mudrex.com/api/v2/wallet/s/quote
Method: GET


Purpose

  • User Transparency: Allows merchants to show users the current conversion rate and fees for crypto-to-fiat conversions.
  • Informative Only: The API is independent of the order creation process and is used solely for providing a pricing overview.

Request Parameters

ParameterTypeDescriptionExample Value
from_currencyStringThe cryptocurrency being sold.USDT
from_amountFloatThe amount of cryptocurrency to convert.1
to_currencyStringThe fiat currency the user wants to receive.INR

Headers

HeaderDescription
X-TimestampUNIX timestamp for the request.
X-Client-IdUnique identifier for the merchant.
X-Request-IdA unique identifier for the request (optional but recommended).
X-Secret-KeyAPI secret key for authenticating the request.
X-User-IdThe unique ID of the user making the request.

Sample Request

curl --location 'https://mudrex.com/api/v2/wallet/s/quote?from_currency=USDT&from_amount=1&to_currency=INR' \
--header 'X-Timestamp: 1732265171' \
--header 'X-Client-Id: CLIENT_ID_HERE' \
--header 'X-Request-Id: CC' \
--header 'X-Secret-Key: SECRET_KEY_HERE' \
--header 'X-User-Id: USER_ID_HERE'

Sample Response

{
  "success": true,
  "data": {
    "from_currency": "USDT",
    "to_currency": "INR",
    "from_amount": 1,
    "pre_fee_to_amount": 87.11,
    "to_amount": 86.24,
    "base_price": 87.11,
    "final_price": 86.24,
    "total_fee": 0.87,
    "fee_currency": "INR",
    "fee_breakup": {
      "platform_fee": 0,
      "network_fee": 0,
      "client_fee": 0,
      "discount": 0,
      "tax_on_fee": 0,
      "tds": 0.87
    }
  }
}

Key Response Fields

FieldDescriptionExample Value
from_currencyThe cryptocurrency being converted.USDT
to_currencyThe fiat currency being received.INR
from_amountAmount of cryptocurrency being sold.1
pre_fee_to_amountThe amount in fiat before fees are applied.87.11
to_amountFinal amount in fiat after deducting fees.86.24
base_priceConversion rate before fees.87.11
final_priceConversion rate after fees.86.24
total_feeTotal fee applied to the transaction.0.87
fee_currencyThe currency in which the fee is charged.INR
fee_breakupDetailed breakdown of the fees, including platform, network, and taxes.{...}

Use Cases

  1. Pricing Transparency:

    • Merchants can display real-time conversion rates and fees to their users.
  2. User Awareness:

    • Enables users to make informed decisions before proceeding with a transaction.
  3. Fee Breakdown:

    • Provides a clear understanding of applicable fees, enhancing trust and user experience.

Important Notes

  1. Independent of Order Creation:

    • The Sell Quote API does not create an order or transaction. It is used solely for informational purposes.
  2. Real-Time Rates:

    • The rates returned by the API reflect the current market conditions and are subject to change.
  3. Fee Breakdown:

    • Includes detailed components such as platform fees, network fees, and taxes.

This API is a critical tool for enhancing user experience and transparency during the on-ramp process. For detailed documentation, visit the API Reference Guide.