| | |
| | | import time |
| | | |
| | | import qcvalueaddproapi |
| | | from log_module.log import logger_system |
| | | from log_module.log import logger_system, logger_debug |
| | | from utils import tool |
| | | |
| | | global g_userid, g_passwd, g_address, g_port, g_seqnum |
| | |
| | | while True: |
| | | try: |
| | | val = request_queue.get() |
| | | logger_debug.info(f"读取华鑫增值服务请求:{val}") |
| | | type_ = val['type'] |
| | | request_id = val['request_id'] |
| | | data = val.get('data') |
| | |
| | | import time |
| | | |
| | | from huaxin_client import l1_api_client |
| | | from log_module.log import logger_debug |
| | | from utils import tool |
| | | |
| | | __response_data = {} |
| | |
| | | @param end_date: |
| | | @return: |
| | | """ |
| | | logger_debug.info("get_history_k_bars开始") |
| | | load_latest_trade_calendar() |
| | | _count = -1 |
| | | start_date = None |
| | |
| | | start_date = __trade_calendar_list[i] |
| | | if _count >= count: |
| | | break |
| | | logger_debug.info(f"get_history_k_bars 获取到开始日期:{start_date}") |
| | | request_id = __base_request("get_history_k_bars", {"start_date": start_date, "end_date": end_date, "code": code}) |
| | | return __read_response(request_id) |
| | | |