| | |
| | | try: |
| | | referer_volume = code_volumn_manager.CodeVolumeManager().get_radical_buy_refer_volume( |
| | | code, limit_up_price) |
| | | today_volumn = code_volumn_manager.CodeVolumeManager().get_today_volumn(code) |
| | | expire_rate = f"{round(100 * total_left_num * 100 / (referer_volume - today_volumn), 2)}%" |
| | | today_volumn = code_volumn_manager.CodeVolumeManager().get_today_volumn_cache(code) |
| | | if referer_volume == today_volumn: |
| | | expire_rate = "100%" |
| | | else: |
| | | expire_rate = f"{100 - round(100 * total_left_num * 100 / (referer_volume - today_volumn), 2)}%" |
| | | except: |
| | | pass |
| | | |
| | |
| | | "zyltgb": constant.RADICAL_BUY_ZYLTGB_AS_YI_RANGES, |
| | | "top_block_count_by_market_strong": constant.RADICAL_BUY_TOP_IN_COUNT_BY_MARKET_STRONG, |
| | | "special_codes_max_block_in_rank": constant.RADICAL_BUY_TOP_IN_INDEX_WITH_SPECIAL, |
| | | "ignore_block_in_money_market_strong": constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG |
| | | "ignore_block_in_money_market_strong": constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG, |
| | | "buy_first_limit_up": 1 if constant.CAN_BUY_FIRST_LIMIT_UP else 0 |
| | | }} |
| | | self.send_response({"code": 0, "data": data, "msg": f""}, |
| | | client_id, |
| | |
| | | if radical_buy.get('ignore_block_in_money_market_strong') is not None: |
| | | constant.IGNORE_BLOCK_IN_MONEY_MARKET_STRONG = radical_buy.get( |
| | | 'ignore_block_in_money_market_strong') |
| | | if radical_buy.get('buy_first_limit_up') is not None: |
| | | constant.CAN_BUY_FIRST_LIMIT_UP = True if radical_buy.get( |
| | | 'buy_first_limit_up') else False |
| | | |
| | | self.send_response({"code": 0, "data": {}, "msg": f""}, |
| | | client_id, |
| | | request_id) |