mirror of
https://github.com/wassname/libcryptomarket.git
synced 2026-09-09 11:25:52 +08:00
Clean up the frequency options in console command
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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\'',
|
||||
|
||||
Reference in New Issue
Block a user