Пример #1
0
def format_date_param(start_date, end_date):
    if end_date is None:
        end_date = get_current_day()

    if start_date is None:
        start_date = get_target_date(-360, '%Y-%m-%d')

    return start_date, end_date
Пример #2
0
def get_trade_rank(market='SHF', date=None):
    if date is None:
        date = get_target_date(-1, "%Y-%m-%d")

    if market == 'SHF':
        return shf_agent.get_trade_rank(date)

    if market == 'DCE':
        return dce_agent.get_trade_rank(date)

    if market == 'CZC':
        return czc_agent.get_trade_rank(date)

    if market == "CFE":
        return cfe_agent.get_trade_rank(date)

    return None, '不支持的市场类型'