I am having trouble sending a futures order to IB TWS API. Stock order goes through fine, but nothing happens when I send a futures order.
What am I doing wrong here:
order = MarketOrder("BUY",1,account=app.ib.wrapper.accounts[0])
contract1 = Contract();
contract1.Symbol = "ES";
contract1.SecType = "FUT";
contract1.Exchange = "GLOBEX";
contract1.Currency = "USD";
contract1.LastTradeDateOrContractMonth = "202409";
app.ib.placeOrder(contract1, order)
if __name__ == '__main__':
#IB Connection
#Connect to IB on init
app.ib = IB()
app.ib.errorEvent += onError
app.run(port=5000)
If I replace contract with:
contract = Stock('SPY','SMART','USD')
It sends the order fine. Any ideas?