def get_date(exchange, symbol, freq, start_date, end_date): date = API(Config.tushare_token()).get_data(exchange, symbol, freq, start_date, end_date) return date
import os from matplotlib.font_manager import FontProperties from vitu.data_api import API from vitu.configuration import Config from vitu.utils.log_utils import logger api = API(Config.tushare_token()) log = logger font = None dirName = os.path.dirname(os.path.abspath(__file__)) font = FontProperties(fname=os.path.join(dirName, 'wqy-microhei.ttc'), size=10)
def get_price(exchange, symbol, freq, date): price = API(Config.tushare_token()).get_price(exchange, symbol, freq, date) return price