diff --git a/pyupbit/quotation_api.py b/pyupbit/quotation_api.py index 5fcc065..bef0e8b 100644 --- a/pyupbit/quotation_api.py +++ b/pyupbit/quotation_api.py @@ -26,7 +26,7 @@ def get_tickers(fiat="", is_details=False, limit_info=False, verbose=False): detail = "true" if is_details else "false" markets, req_limit_info = _call_public_api(url, isDetails=detail) - if verbose: + if verbose or is_details: tickers = [x for x in markets if x['market'].startswith(fiat)] else: tickers = [x['market'] for x in markets if x['market'].startswith(fiat)] diff --git a/tests/test_quotation_api.py b/tests/test_quotation_api.py index ca6c749..4a52e29 100644 --- a/tests/test_quotation_api.py +++ b/tests/test_quotation_api.py @@ -24,6 +24,12 @@ def test_get_tickers_with_limit_info(): assert isinstance(limit_info, dict) +def test_get_tickers_with_market_warning(): + tickers = get_tickers(is_details=True) + for ticker in tickers: + assert ticker["market_warning"] in ["NONE", "CAUTION"] + + def test_get_ohlcv_defaults(): resp = get_ohlcv() assert isinstance(resp, pd.DataFrame)