520量化编程

标题: 如何使用order_callback账号委托状态函数 [打印本页]

作者: 520量化编程    时间: 2024-7-19 21:36
标题: 如何使用order_callback账号委托状态函数
  1. #encoding:gbk
  2. def init(ContextInfo):
  3.     account = '123456'
  4.     ContextInfo.set_account(account)
  5.     passorder(23,1101, account, '000001.SZ',5,0,200,'',2,'note1',ContextInfo)



  6. def order_callback(ContextInfo, orderInfo):
  7.     print(f"股票代码:{orderInfo.m_strInstrumentID} 市场代码:{orderInfo.m_strExchangeID} 委托号:{orderInfo.m_strOrderSysID}, 成交数量:{orderInfo.m_nVolumeTraded}, 投资备注:{orderInfo.m_strRemark}")


复制代码







欢迎光临 520量化编程 (https://520lhjy.com/) Powered by Discuz! X3.4