getting rates from api