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
Parameter | Type | Description | Example Value |
---|---|---|---|
from_currency | String | The cryptocurrency being sold. | USDT |
from_amount | Float | The amount of cryptocurrency to convert. | 1 |
to_currency | String | The fiat currency the user wants to receive. | INR |
Headers
Header | Description |
---|---|
X-Timestamp | UNIX timestamp for the request. |
X-Client-Id | Unique identifier for the merchant. |
X-Request-Id | A unique identifier for the request (optional but recommended). |
X-Secret-Key | API secret key for authenticating the request. |
X-User-Id | The 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
Field | Description | Example Value |
---|---|---|
from_currency | The cryptocurrency being converted. | USDT |
to_currency | The fiat currency being received. | INR |
from_amount | Amount of cryptocurrency being sold. | 1 |
pre_fee_to_amount | The amount in fiat before fees are applied. | 87.11 |
to_amount | Final amount in fiat after deducting fees. | 86.24 |
base_price | Conversion rate before fees. | 87.11 |
final_price | Conversion rate after fees. | 86.24 |
total_fee | Total fee applied to the transaction. | 0.87 |
fee_currency | The currency in which the fee is charged. | INR |
fee_breakup | Detailed breakdown of the fees, including platform, network, and taxes. | {...} |
Use Cases
-
Pricing Transparency:
- Merchants can display real-time conversion rates and fees to their users.
-
User Awareness:
- Enables users to make informed decisions before proceeding with a transaction.
-
Fee Breakdown:
- Provides a clear understanding of applicable fees, enhancing trust and user experience.
Important Notes
-
Independent of Order Creation:
- The Sell Quote API does not create an order or transaction. It is used solely for informational purposes.
-
Real-Time Rates:
- The rates returned by the API reflect the current market conditions and are subject to change.
-
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.
Updated 10 days ago