Anyone ever had this issue where the API doesn't accept an order but TWS does, and only has an issue in the live account?
Through the API, I put in an order for USDCAD:
I get the message
I put in the same exact order in TWS manually, no problems. Order goes through. I put the same order in the paper account through the API and it's fine, no problems. It's only live trading where I have the problem, and even then, only through the API.
Any ideas?
Thanks!
Through the API, I put in an order for USDCAD:
Code:
contract = Contract()
contract.symbol="USD"
contract.secType="CASH"
contract.currency="CAD"
contract.exchange="IDEALPRO"
order = Order()
order.action="SELL"
order.orderType="LMT"
order.totalQuantity=50000
minTick = 5e-05
order.lmtPrice=1.41675
self.placeOrder(orderId,contract,order)
I get the message
ERROR 19 463 You must enter a valid price.
Error. Id: 19 Code: 463 Msg: You must enter a valid price.
I put in the same exact order in TWS manually, no problems. Order goes through. I put the same order in the paper account through the API and it's fine, no problems. It's only live trading where I have the problem, and even then, only through the API.
Any ideas?
Thanks!
Last edited: