Hi everybody. I'm new to the forums. Google landed me on elitetrader.com quite a couple of time.
I'm quite new to the IB API and as I could notice, there are many users around here.
I was able to use the API (within my vb app!) to retrieve live data feed for my watchlist (stocks + options). I've ended up understanding that each of those "mkt data requests" must be done under their own Id (and it's my job to remember which id corresponds to which conid in, example, my watchlist).
I've then started today to test placing orders. It works good but there's one thing I think I do not understand with the IB API.
Ex.:
a) I've submitted an order and it was refused (done intentionally)
b) I'm trying to resubmit the same order and it says "Duplicate order with id=x"
My question is: when an order is placed/executed/refused/whatever, is the Id "banned" for the rest of this api lifecycle? Why can't I reuse it right now? "Cancelling the order" won't help as it was already refused anyway. Must I jump to the next Id?
My INITIAL plan was to use Ids 2 to xxx for my watchlist-to-update, and always use id=1 for placing orders, or querying contract data or whatever is done once, as a snapshot, if you will.
Hope I was clear enough for someone to hopefully share his 2 cents.. any info greatly appreciated.
I'm quite new to the IB API and as I could notice, there are many users around here.
I was able to use the API (within my vb app!) to retrieve live data feed for my watchlist (stocks + options). I've ended up understanding that each of those "mkt data requests" must be done under their own Id (and it's my job to remember which id corresponds to which conid in, example, my watchlist).
I've then started today to test placing orders. It works good but there's one thing I think I do not understand with the IB API.
Ex.:
a) I've submitted an order and it was refused (done intentionally)
b) I'm trying to resubmit the same order and it says "Duplicate order with id=x"
My question is: when an order is placed/executed/refused/whatever, is the Id "banned" for the rest of this api lifecycle? Why can't I reuse it right now? "Cancelling the order" won't help as it was already refused anyway. Must I jump to the next Id?
My INITIAL plan was to use Ids 2 to xxx for my watchlist-to-update, and always use id=1 for placing orders, or querying contract data or whatever is done once, as a snapshot, if you will.
Hope I was clear enough for someone to hopefully share his 2 cents.. any info greatly appreciated.