interactive brokers - Placing orders without transmitting them with IBpy? -


i new ibpy , wondering if there way place order without transmitting , waiting human input transmit order?

i using placeorder place orders can't find way of placing them without transmitting them.

any appreciated.

set m_transmit false in order.

from ib.ext.contract import contract ib.ext.order import order ib.opt import ibconnection, message time import sleep  def watchall(msg):     print(msg)  con = ibconnection(clientid=1) con.registerall(watchall) con.connect() sleep(1)  fx = contract() fx.m_sectype = "cash"  fx.m_symbol = "usd" fx.m_currency = "cad" fx.m_exchange = "idealpro" con.reqmktdata(1,fx,"",false)  ord = order() ord.m_ordertype = 'mkt' ord.m_totalquantity = 100000 ord.m_action = 'buy' ord.m_transmit = false con.placeorder(1234,fx,ord) 

your tws have row enter image description here notice transmit button if want transmit tws.

then can resend same order using same orderid set m_transmit true.

ord.m_transmit = true con.placeorder(1234,fx,ord) 

then get's transmitted , tws show fill, order message callbacks printed in simple def watchall(msg) enter image description here


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -