Initiate Sell Transaction
To initiate a sell transaction, you will use the fiat/sell endpoint to convert your cryptocurrency into fiat currency.
Initiate Sell Transaction
Endpoint:
POST /api/v1/wallet/conversion/fiat/sell
Description:
This API call allows you to sell cryptocurrency (USDT or USDC) in exchange for fiat currency (currently limited to INR) via a bank transfer.
Request Format:
You need to send a POST request to the endpoint with the necessary headers and the body parameters outlined below.
curl --location '<https://mudrex.com/api/v1/wallet/conversion/fiat/sell'>
--header 'X-Timestamp: {{timestamp}}'
--header 'X-Client-Id: •••••••'
--header 'X-Secret-Key: •••••••'
--header 'X-Request-Id: d'
--header 'X-User-Id: •••••••'
--data '{
"source_id": "65d246fc-6a5b-43d7-89bf-944e95ff2279",
"fiat_symbol": "INR",
"crypto_symbol": "USDT",
"fiat_amount": 100,
"crypto_amount": 1.14,
"payment_method": "bank_transfer"
}'
{
"success": true,
"data": {
"status": "CREATED",
"fiat_amount": 100,
"transaction_type": "SELL",
"fiat_symbol": "INR",
"failure_code": null,
"exchange_rate": 82.56976,
"id": "a892dc4a-aecb-4a22-9de4-2990b4179b77",
"crypto_symbol": "USDT",
"created_at": "2022-10-03 07:51:15",
"bank_transaction_id": null,
"source_id": "65d246fc-6a5b-43d7-89bf-944e95ff2279",
"failure_desc": null,
"crypto_amount": 1.14
}
}
Required Parameters:
- source_id: The unique wallet address ID of the user initiating the transaction.
- fiat_symbol: The fiat currency in which you want to receive the amount. Currently, the only supported fiat currency is INR.
- crypto_symbol: The cryptocurrency you want to sell. Available cryptocurrencies are:
- USDT (Tether)
- USDC (USD Coin)
- Other cryptocurrencies may be available upon request.
- fiat_amount: The amount of fiat currency (INR) you want to receive. You must either specify this or the crypto_amount.
- crypto_amount: The amount of cryptocurrency you are selling. You must either specify this or the fiat_amount.
- payment_method: The payment method used to transfer the fiat currency to the user. This must be set to bank_transfer.
Response Parameters:
- success: Indicates whether the request was successful (true or false).
- status: The current status of the transaction. Possible values include CREATED, PENDING, COMPLETED, etc.
- fiat_amount: The amount of fiat currency being exchanged (INR in this case).
- transaction_type: The type of transaction. In this case, it will be SELL.
- fiat_symbol: The symbol of the fiat currency (INR).
- exchange_rate: The rate at which the cryptocurrency was converted to fiat.
- id: Unique ID for the transaction.
- crypto_symbol: The symbol of the cryptocurrency being sold (e.g., USDT).
- crypto_amount: The amount of cryptocurrency being sold.
- created_at: The timestamp when the transaction was created.
- bank_transaction_id: The bank transaction ID, if applicable (null if not yet processed).
- failure_code: An error code if the transaction failed (null if successful).
- failure_desc: A description of the failure, if any.
Notes
- Currently, INR is the only supported fiat currency for the sell transaction.
- Bank transfer is the only available payment method.
- You can only sell USDT or USDC. Other cryptocurrencies are available upon request.
- Sell transaction can be initiated directly from pool wallet through this API. The request body remains same, but the create transaction and fetch transaction API status API is different as mentioned here.
Check more details about API endpoint here.
Updated 3 days ago