IBrokers icon indicating copy to clipboard operation
IBrokers copied to clipboard

Problem in placing future order

Open BenCHANCH opened this issue 5 years ago • 2 comments
trafficstars

Description

i try to place a future order on a future but it keeps popping error "2 10 200 No security definition has been found for the request ". It indicates problems with my contract specification. However, i can pull historical data and real time data successfully from the same contract.

Expected behavior

[Describe the behavior/output you expected]

Minimal, reproducible example

> placeOrder(tws,twsFuture("HSI",exch= "HKFE",expiry = "20190130"),twsOrder(reqIds(tws),orderType = "MKT",action = "SELL",totalQuantity = 1))
> reqMktData(tws,HSI,snapshot = T)

Session Info

2 10 200 No security definition has been found for the request 
        lastTimeStamp symbol bidSize bidPrice askPrice askSize lastPrice Volume  Open  High   Low Close
1 2020-01-10 17:20:10    HSI       5    28656    28659       4     28658    151 28662 28663 28646 28658

BenCHANCH avatar Jan 10 '20 09:01 BenCHANCH

Thanks for the report! Can you replicate this with the demo account, or does it only happen with your live/paper account?

joshuaulrich avatar Jan 14 '20 12:01 joshuaulrich

After i logged in with the demo account, the code worked for both demo and paper account. But still i have no idea why the code didn't work previously even if i restart the workstation.

BenCHANCH avatar Jan 14 '20 14:01 BenCHANCH