| | |
| | | @classmethod |
| | | def get_cancel_rate(cls, code, buy_exec_time, is_up=False): |
| | | # 下单10s内撤单比例为设置为29% |
| | | if tool.trade_time_sub(tool.get_now_time_str(), buy_exec_time) <= 10: |
| | | if not is_up and tool.trade_time_sub(tool.get_now_time_str(), buy_exec_time) <= 15: |
| | | return 0.29, False |
| | | try: |
| | | must_buy_cancel_rate = cls.__MustBuyCodesManager.get_cancel_rate_cache(code) |
| | |
| | | if transaction_data[2] > buy_data["val"]["num"] * 100 * 0.5: |
| | | return True, "快速成交了50%以上" |
| | | else: |
| | | return False, "" |
| | | return False, "快速成交了50%以下" |
| | | |
| | | # 设置真实的下单位置,返回是否需要撤单 |
| | | def set_real_order_index(self, code, index): |