| | |
| | | |
| | | |
| | | def __get_buy_money(): |
| | | time_str = tool.get_now_time_str().replace(":","") |
| | | time_str = tool.get_now_time_str().replace(":", "") |
| | | if int(time_str) < int("103000"): |
| | | return 40000 |
| | | elif int(time_str) < int("113000"): |
| | | return 30000 |
| | | elif int(time_str) < int("140000"): |
| | | elif int(time_str) < int("140000"): |
| | | return 20000 |
| | | else: |
| | | return 10000 |
| | |
| | | market_info = code_market_manager.get_market_info(cb_code) |
| | | limit_up_price = target_codes_manager.get_limit_up_price(cb_code) |
| | | if market_info: |
| | | volume = int(__get_buy_money()/ float(limit_up_price)) |
| | | if market_info.rate > 0.139: |
| | | async_log_util.info(logger_trade, f"可转债涨幅过高::{cb_code}-{market_info.rate}") |
| | | continue |
| | | |
| | | volume = int(__get_buy_money() / float(limit_up_price)) |
| | | volume = (volume // 10) * 10 |
| | | buy_price = round(min(float(market_info.price * 1.02), float(limit_up_price)), 3) |
| | | async_log_util.info(logger_trade, f"准备下单:{cb_code}-{buy_price}") |