¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Re: Symbol in API Market Data Callbacks


 

Thanks, Nick.

Is this id limited by size or type at all?
Since it's a request id and not a contract id
(or whatever), do they need to increment /
be unique, and over what timeframe (per login)?



On Fri, Dec 11, 2020 at 8:49 AM Nick <news1000@...> wrote:

Using the reqid is the only way.

In a simple case of a stock the symbol alone may have meaning. But IB has many financial instruments, identified by what they call a contract, and it would be inefficient to send the entire contract definition with each price quote.

That leaves you to keep track of request id's and what contract they correspond to.


On 12/11/2020 10:12 AM, bunbun tigery wrote:
I've been toying with the tws api.

When I request a quote, I call req.MktData with a reqId.
This appears to be something of magic number, but I can
find no other way to see what the actual SYMBOL is for
the request unless I map the symbols to reqIds and somehow
verify this id == symbol in tickPrice and / or tickSize.

Is this how people handle the problem of determining
what price and size are associated with which symbols?


Thanks!

Join [email protected] to automatically receive all group messages.