| | |
| | | # 是否有涨停 |
| | | import copy |
| | | import json |
| | | import random |
| | | import time |
| | | |
| | | from code_attribute import gpcode_manager |
| | | |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(LatestMaxVolumeManager, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | 股票代码管理器 |
| | | """ |
| | | import json |
| | | import random |
| | | import time |
| | | |
| | | import constant |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(FirstGPCodesManager, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | # 计算范围到申报时间的那一秒 |
| | | import json |
| | | import logging |
| | | import random |
| | | import time |
| | | |
| | | import constant |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(SecondCancelBigNumComputer, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(HourCancelBigNumComputer, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(DCancelBigNumComputer, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(LCancelBigNumComputer, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(FastCancelBigNumComputer, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(LatestCancelIndexManager, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | 代码价格管理 |
| | | """ |
| | | import json |
| | | import random |
| | | import time |
| | | |
| | | from code_attribute import gpcode_manager |
| | | from db.redis_manager_delegate import RedisUtils |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(Buy1PriceManager, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | import logging |
| | | import random |
| | | import time as t |
| | | |
| | | from code_attribute import big_money_num_manager, code_volumn_manager, code_data_util, industry_codes_sort, \ |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(L2BigNumForMProcessor, cls).__new__(cls, *args, **kwargs) |
| | | t.sleep(random.randint(0,2000)/1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | __SecondCancelBigNumComputer = SecondCancelBigNumComputer() |
| | | __HourCancelBigNumComputer = HourCancelBigNumComputer() |
| | | __LCancelBigNumComputer = LCancelBigNumComputer() |
| | | __DCancelBigNumComputer = DCancelBigNumComputer() |
| | | __TradeStateManager = trade_manager.TradeStateManager() |
| | | __CodesTradeStateManager = trade_manager.CodesTradeStateManager() |
| | | __PauseBuyCodesManager = gpcode_manager.PauseBuyCodesManager() |
| | |
| | | L2卖管理 |
| | | """ |
| | | import json |
| | | import random |
| | | import time |
| | | |
| | | from db import redis_manager |
| | | from db.redis_manager import RedisUtils |
| | |
| | | def __new__(cls, *args, **kwargs): |
| | | if not cls.__instance: |
| | | cls.__instance = super(L2MarketSellManager, cls).__new__(cls, *args, **kwargs) |
| | | time.sleep(random.randint(0, 2000) / 1000) |
| | | cls.__load_datas() |
| | | return cls.__instance |
| | | |
| | |
| | | logger_debug.error(e) |
| | | |
| | | def OnSystemLog(self, client_id, request_id, data): |
| | | logger_debug.debug(f"OnSystemLog") |
| | | try: |
| | | start_index = data["start_index"] |
| | | count = data["count"] |