"{last_time}""sql+=f"orderbycreate_timedesc;"ret_d"/>
fromfunctionimport*importtimeimportmathimportwarningswarnings.filterwarningspd.set_optionpd.set_optionfromlark_bot_msgimportLarkBotMsgclassAutoLarkBot:status_map={"0":"等待触发","1":"已触发","2":"已手动终止","3":"系统止盈","4":"系统止损","5":"等待终止结算"}@classmethoddefrun:url="XXX"_,dbc,_=list.values)whileTrue:cur_time=datetime.nowlast_time=cur_time.strftimesql=f"SELECT*FROM`wp_fin_author_recommend`WHERE`create_time`>"{last_time}""sql+=f"orderbycreate_timedesc;"ret_df=pd.read_sqlforindex,rowinret_df.iterrows:title=f"股票推荐更新:{row["author_name"]}-{row["stock_name"]}"content=cls.__get_stock_author_recommendcontent+=" "LarkBotMsg.md_msgtime.sleep@classmethoddef__get_stock_author_recommend:content=f"类型:{row_data["position_type"]}单]})"content+=" "content+=f"买入价:{row_data["order_price"]}"content+=" "content+=f"目标价:{row_data["target_price"]}"content+=" "ifmath.isnan:content+=f"总天数:0天"else:content+=f"总天数:{str)}天"content+=" "content+=f"推荐说明:{row_data["start_reason"]}"ifrow_data["end_reason"]isnotNone:content+=" "content+=f"终止说明:{row_data["end_reason"]}"returncontentif__name__=="__main__":AutoLarkBot.run
文章为作者独立观点,不代表股票交易接口观点