Example #1
0
def test_query_realtime_price_apis(inquirer):
    result = _query_currency_converterapi('USD', 'EUR')
    assert result and isinstance(result, FVal)
    result = _query_exchanges_rateapi('USD', 'GBP')
    assert result and isinstance(result, FVal)
    result = inquirer.query_historical_fiat_exchange_rates('USD', 'CNY', 1411603200)
    assert result == FVal('6.1371932033')
Example #2
0
def test_query_realtime_price_apis(inquirer):
    """Query some of the exchange rates APIs we use.

    For x-rates.com we already have a test in externalapis directory
    """
    result = _query_currency_converterapi(A_USD, A_EUR)
    assert result and isinstance(result, FVal)
    result = inquirer.query_historical_fiat_exchange_rates(A_USD, A_CNY, 1411603200)
    assert result == FVal('6.133938')