Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: IB tws is sending back a null/empty field when it should be a float
I am not saying there is no issue, cp. We just did not encounter any, but then we monitor only a very small fraction of all instruments and only on a few large exchanges here in the US. Would be interesting to hear whether others do experience a recent increase in "lack of a value" indications for market data by the TWS API. Also, visitors may find it helpful to learn about the different approaches how TWS API represents the lack of a value for numerical fields, so I'd be inclined to keep the thread. ´³¨¹°ù²µ±ð²Ô |
Re: IB tws is sending back a null/empty field when it should be a float
Hi Jurgen I think I'm fine with your data and thanks for running that. It seems that I'll have to learn a LOT more about julia as the problem is clearly mine. Can't argue with facts. Can you delete this whole message thread as it's going to cause more problems than it's worth. Thanks again for going the extra mile. cp |
Re: IB tws is sending back a null/empty field when it should be a float
I'll take the topic off moderation then, but I think it would be helpful if you could focus the question a little more (so we don't try to boil the ocean). Can you identify a few instruments that you experience issues with as well as the kind of market data tick types you subscribe to?
toggle quoted message
Show quoted text
I ran a quick report on the market data we received within the last 27 hours (since 17:00 central time on Sunday) and found no issues or missing data. We subscribe to about 80 US instruments (STK,, IND, ETF, FUT) and receive everything that can be requested including tick-by-tick data and Level II for three futures. That's shy of 44 million market data items. ´³¨¹°ù²µ±ð²Ô On Mon, Feb 7, 2022 at 07:26 PM, comicpilsen wrote:
|
Re: IB tws is sending back a null/empty field when it should be a float
I asked the question in an incorrect manner. Here's another ( non language specific) way to get an answer. Has anyone on the forum experienced a RECENT degradation in the feed stimulated by the call
I am aware of the Jib documentation and have considered that but this is a SPURIOUS event and I want to know if anyone else is experiencing it. It can be coded out but that's not the first recourse here. If TWS is flaky then it's whack a mole time. I don't want the forum to try to fix a problem in a completely different language using a Pkg that they don't use. I would feel bad about trying that. I just want a read on the quality of the data across the members of the forum. Sorry to have asked the question so poorly. |
Re: IB tws is sending back a null/empty field when it should be a float
I hear you, but what you are experiencing is related to the Julia library implementation, not the TWS API. The TWS API does not return "null" values but it does occasionally indicate that a certain value is missing. From Missing Values
Occasionally there is the need for numerical types to represent the lack of a value.
The IB API does not adopt a uniform solution for all situations, but rather various sentinel values are used. They can be either the plain
0 or the largest representable value of a given type such as 2147483647 and 9223372036854775807 for 32 and 64 bit integers respectively or 1.7976931348623157E308 for 64 bit floating point.Within this package an effort is made to replace all these values with Julia built-in
Nothing .The Julia library implementer(s) took a very reasonable approach to present missing numerical values in a uniform way and to return Nothing objects in these cases. But it's not the TWS API that does that. Can you pinpoint the callback method that cases the return of the Nothing object? We could then take a look at why TWS API indicates that a value is missing. ´³¨¹°ù²µ±ð²Ô |
Re: IB tws is sending back a null/empty field when it should be a float
Hi Jurgen It's not the language the question is addressing but the data flow. The language is fine and normally the data works but I am asking if anyone on this forum ( which I have been on for some years) has been experiencing these null values. You'd see them in C, c#, java and Python. So I'd still like the question asked unless you still see an issue with julia. |
Re: IB tws is sending back a null/empty field when it should be a float
The Julia client is not one of the IBKR provided APIs we are discussing here. You will be better off asking your question in a group or forum that focuses on that implementation. If you are using the library at take a look at the discussion of missing values in README.md. ´³¨¹°ù²µ±ð²Ô On Mon, Feb 7, 2022 at 06:06 PM, comicpilsen wrote:
|
Re: IB tws is sending back a null/empty field when it should be a float
Hi there thanks for the intervention. I'm using julia and here's the call
|
Re: IB tws is sending back a null/empty field when it should be a float
Which API/language are you using? Also, your log does not clearly show which API call-back method throws the exception.
toggle quoted message
Show quoted text
´³¨¹°ù²µ±ð²Ô PS. I have put this thread onto moderation for now so that we can focus on your question. On Mon, Feb 7, 2022 at 05:44 PM, comicpilsen wrote:
|
Re: IB tws is sending back a null/empty field when it should be a float
I guess that's my point, that it doesn't "roll over immediately after rth." Every other quote service I've used gives an OHLCV quote as soon as available (usually a few minutes after the close, depending on whom they poll for volume figures). I simply want to enter a valid trade after hours. "Valid" means the limit price I set should be marketable. Perhaps I will find that when IB gave -1 for the bid and ask that trades were no longer marketable. But this is robotrading. I need to programmatically set a trade that should execute as soon as available. |
Re: IB tws is sending back a null/empty field when it should be a float
here's my request contract = Jib.Contract(symbol=s, secType="STK", exchange="SMART", currency="USD") Jib.reqMktData(ib, idx, contract, "", false) and I'm getting spurious
|
Re: IB tws is sending back a null/empty field when it should be a float
Nick: Perhaps I should have been more clear. I am trying to use marketPrice() to get a valid price from which to enter an after-hours order. marketPrice() returns the following:
So, if there is not a bid and ask available, it provides a 3-day-old close quote. That is unusable. That they tell us this in the docs does not make it any better. It is still a worthless quote. last would be best, as long as it is not from some after-hours book cleanup, meaning it is the last actual open-market tick. I guess I could compare to Last RTH Trade to see if it makes sense. |
Re: IB tws is sending back a null/empty field when it should be a float
Nick
P.S. If the Close field is not advancing properly upon session close then you could submit a ticket with IB.
toggle quoted message
Show quoted text
The docs don't say how 'previous' is defined. Whether it is calendar day only or rolls over immediately after rth. On 2/7/2022 6:18 PM, Nick wrote:
Are you talking about tickPrice type 9 - Close Price? |
Re: IB tws is sending back a null/empty field when it should be a float
Nick
¿ªÔÆÌåÓýAre you talking about tickPrice type 9 - Close Price? If so, From the docs:
The last available closing price for the previous day. For US Equities, we use corporate action processing to get the closing price, so the close price is adjusted to reflect forward and reverse splits and cash and stock dividends.This is the closing price for the previous day. The day before Monday is Friday. The api is behaving as documented. Maybe read the docs to know what data you are getting.
On 2/7/2022 6:00 PM, Bennie wrote:
|
Re: IB tws is sending back a null/empty field when it should be a float
Yeah, I am finding IB's quotes to be completely unreliable. Here is a quote I just received after hours:
When trying to set a limit order after hours, one needs to know a valid current price. Entering a trade with a 3-day-old quotation is ridiculous. I guess I have to rely on a 3rd-party quote service, which is shameful. |