{
"timeStamp": "2021-05-11 23:43:04",
"message": "Fx rate is currently not available for this operator, please try again later or contact support.",
"path": "/operators/fx-rate",
"errorCode": "FX_RATE_NOT_AVAILABLE",
"infoLink": null,
"details": []
}
using System;
using System.Threading.Tasks;
using System.Net.Http;
using System.Text;
using Newtonsoft.Json;
namespace WebAPIClient {
class Program {
static async Task Main(string[] args) {
await ApiCall();
}
private static async Task ApiCall() {
var json = JsonConvert.SerializeObject(new {
operator_id = "1",
amount = "1"
});
var message = new HttpRequestMessage(HttpMethod.Post, "https://topups.reloadly.com/operators/fx-rate");
message.Headers.TryAddWithoutValidation("Authorization", "Bearer YOUR_ACCESS_TOKEN_HERE");
message.Headers.TryAddWithoutValidation("Accept", "application/com.reloadly.topups-v1+json");
message.Headers.TryAddWithoutValidation("Content-Type", "application/json");
using
var httpClient = new HttpClient();
var response = await httpClient.SendAsync(message);
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject < dynamic > (responseBody);
Console.WriteLine(result);
}
}
}
Indicates the exchange rate of the operator's currency to your account's currency. For example, if your account is in Indian Rupees( INR ) and you are making a top-up to a number registered to Natcom Haiti, the exchange rate returned will be 1.16 ( 1 INR = 1.16 HTG )
currencyCode
string
Indicates the currency symbol of the country where the operator is registered