I don?t have this problem but maybe you can do this:
When you place an order with an order id 12345 and an invalid symbol
(ex. "XYZ") than you get no error message and NO ORDERSTATUS. So if
you don?t get an ORDERSTATUS for the order id 12345 within a certain
time, try to cancel that order with order id 12345. Normally than you
will get an error message "Can't find order with id 12345". This
could be an indicator that the symbol was invalid.
Or another way that could help you:
Call ReqMktData for that symbol. If the symbol does not exist you
will get an error message like "Security definition request returned
0 items for ticker id 123". Check the error message for that text.
That?s what I do when I call ReqMktData.
Greetings from Germany
BeeJay
--- In twsapi@y..., szeyu73 <no_reply@y...> wrote:
hello.
i found some problem in placing invalid symbols. for example, if i
place an order to BUY 100 shares of XYZ, which is not valid.
the TWS API won't tell my program thru the API (such as ErrMsg and
OrderStatus), but just make a popup in the Trader Workstation
program. hence i have no no way to know that the symbol is invalid.
my solution is to keep a list of avaliable symbols. i'll check if
the
symbol is in the list before placing the order.
it works, but i have to update the list from time to time. is there
any better solutions?
thanks
---
dustin