Exchange Rate
The endpoint allows users to obtain real-time exchange rates for cryptocurrency pairs supported by OxaPay. This feature is particularly useful for applications that require up-to-date cryptocurrency prices.
POST
https://api.oxapay.com/exchange/rate
Request Body
fromCurrency*
string
toCurrency*
string
{
"result": integer, // The result code indicates the success or failure of the request.
"message": string, // A message providing additional information about the result.
"rate": string // The real-time exchange rate representing the number of units of `fromCurrency` equivalent to `toCurrency`.
}
Example codes
curl -X POST https://api.oxapay.com/exchange/rate \
-d '{
"fromCurrency": "USDT",
"toCurrency": "TRX"
}'
Usage
By providing the `fromCurrency` and `toCurrency` parameters, you can retrieve the exchange rate between the specified cryptocurrencies. For example, if you set `fromCurrency` to "BTC" and `toCurrency` to "USDT," the response will provide the real-time exchange rate for converting Bitcoin (BTC) to Tether (USDT).
Please note that the exchange rate provided in the response may fluctuate over time due to the volatile nature of cryptocurrency markets.
Last updated