cURL
curl --request POST \ --url https://api.example.com/currencies/conversion \ --header 'Content-Type: application/json' \ --data ' { "from": "XRP", "to": "NGN", "amount": 1 } '
{ "success": true, "message": "Operation successful", "data": [ { "from": "XRP", "to": "NGN", "fromAmount": 1, "toAmount": 0.85, "rate": 0.85, "value": 0.85, "fromAmountInUSD": 1.1764705882352942, "fromAmountInUSDRate": 1.1764705882352942, "id": "j8bq9pw3ir", "expiration": 60 } ], "meta": {} }
Use this to convert one currency to another
Source currency code
"XRP"
Target currency code
"NGN"
Amount to convert
1
Conversion successful
true
"Operation successful"
Show child attributes