コード例 #1
0
 def create_ExecutionFilter(self):
     filter = ExecutionFilter()
     filter.clientId = 999
     filter.acctCode = self.account
     yesterday = datetime.datetime.now() - datetime.timedelta(1)
     filter.time = yesterday.strftime('%Y%m%d-18:00:00')
     return filter
コード例 #2
0
ファイル: ib.py プロジェクト: weiguang-zz/stratege_engine
 def do_sync():
     if len(self.get_open_orders()) > 0:
         logging.info("开始同步订单的执行详情")
         req = Request.new_request()
         exec_filter = ExecutionFilter()
         exec_filter.clientId = self.cli.cli.clientId
         self.cli.cli.reqExecutions(req.req_id, exec_filter)
コード例 #3
0
    def _download_account_details(self):
        exec_filter = ExecutionFilter()
        exec_filter.clientId = self.client_id
        self.reqExecutions(self.next_request_id, exec_filter)

        self.reqManagedAccts()
        while self.managed_accounts is None:
            sleep(_poll_frequency)

        for account in self.managed_accounts:
            self.reqAccountUpdates(subscribe=True, acctCode=account)
        while self.accounts_download_complete is False:
            sleep(_poll_frequency)