Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem in placing future order #21

Open
BenCHANCH opened this issue Jan 10, 2020 · 2 comments
Open

Problem in placing future order #21

BenCHANCH opened this issue Jan 10, 2020 · 2 comments

Comments

@BenCHANCH
Copy link

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
@joshuaulrich
Copy link
Owner

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

@BenCHANCH
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants