diff --git a/libcryptomarket/__init__.py b/libcryptomarket/__init__.py index 732f132..d3dab23 100644 --- a/libcryptomarket/__init__.py +++ b/libcryptomarket/__init__.py @@ -5,8 +5,6 @@ """Top-level package for libcryptomarket.""" from libcryptomarket.exchange import * -from libcryptomarket.instrument import instruments -from libcryptomarket.order_book import order_book from libcryptomarket.candle import ( candles, latest_candles, FREQUENCY_TO_SEC_DICT) import libcryptomarket.candle.inject diff --git a/libcryptomarket/cli/candles.py b/libcryptomarket/cli/candles.py index 307881c..f7da54e 100644 --- a/libcryptomarket/cli/candles.py +++ b/libcryptomarket/cli/candles.py @@ -5,10 +5,12 @@ import pandas as pd # pylint: disable-msg=W0401 from libcryptomarket.exchange import * # flake8: noqa -from libcryptomarket import FREQUENCY_TO_SEC_DICT LOG_FORMAT = '%(asctime)s - %(name)s - %(levelname)s - %(message)s' +FREQUENCIES = ['1m', '5m', '15m', '30m', '1h', '3h', '6h', '12h', '1d', + '1w', '2w', '1M', ] + def get_args(): """Get input arguments. @@ -22,7 +24,7 @@ def get_args(): type=str, nargs='+', required=True) parser.add_argument('--frequency', action='store', dest='frequency', help='Frequency.', - choices=list(FREQUENCY_TO_SEC_DICT.keys()), + choices=list(FREQUENCIES), required=True) parser.add_argument('--start-time', action='store', dest='start_time', help='Start time in format of \'YYYY-MM-DD\'',