getSwapRate method
Implementation
Future<Coin> getSwapRate(Coin offerCoin, String askDenom) async {
var rootPath =
"${TerraClientConfiguration.blockchainResourcePath}${CosmosBaseConstants.COSMOS_MARKET_SWAP}?offer_coin=${offerCoin.amount}${offerCoin.denom}&ask_denom=${askDenom}";
var response = await apiRequester.getAsync<MarketingSwaps>(rootPath);
if (response.successful!) {
var result = MarketingSwaps.fromJson(response.result!);
return Coin.fromJSON(result.return_coin);
}
throw Exception("");
}