Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: Error. Id: -1, Code: 509, Msg: Exception caught while reading socket
What programming language are you using?
Generally speaking the errors 509 and 504 "exception caught while reading socket" happen when your program stomps on the memory space in error. The fastest way to fix that is to remember exactly what you changed recently, if it was working fine before. But, I have encountered situations where it was not a recent mistake, but an old one that took a long time to appear. Fun, right? Hopefully you can figure out what's wrong by looking at your code closely. But, another way is to periodically exercise your code in extreme situations if need be, to try to make it break. If it takes weeks to figure out where the problem is and you're still stuck, that's when I have turned to 3rd party tools (one example was a program called deleaker) which pad your program with protected memory space and will tell you when that space becomes violated, and then you can set breakpoints at memory addresses and trace backwards. |
Re: realtimeBar subscription stops during the trading session
Just FYI, I've contacted the API Support and here the answer I've got: ''' The existing request may not have terminated. When bust event occurs please try using cancelRealTimeBars() then call reqRealTimeBars() again. ''' Will update my application and test it for few days - will update after that. |
FYI: C++ multi-threaded crash in eConnectImpl - gethostbyname (linux)
Hello, this is just FYI.? ? My process started crashing recently when it tried to connect to TWS.? I have two threads each running its own instance of the ib client.? To fix, I had modified EClientSocket::eConnectImpl()? from using gethostbyname() call to using gethostbyname_r() call to resolve the issue.? To be clear -? If you only have a single instance of ib client, you don't need to worry about this. Hope it will be helpful to someone.?
|
Error. Id: -1, Code: 509, Msg: Exception caught while reading socket
Any idea what causes this?
I also get this one: Error. Id: -1, Code: 509, Msg: Exception caught while reading socket - Numerical result out of range I found this similar thread: /g/twsapi/topic/4047617#33752 But I couldn't follow it to a solution. |
Re: TWS API earning dates..
Robbo: still valid if subscribed to Horizon Wall Streets as Josh pointed out.
C# example: public void fundamentalData(int reqId, string data)
{
try
{
string ticker = XMLstringExtract(data, "Ticker");
data = XMLstringExtract(data, "EarningsList");
string date = XMLstringExtract(data, "Date");
string confirmed = XMLstringExtract(data, "Etype");
Log("Next " + ticker + " Earnings: " + date + " " + confirmed); } |
Can you call macros in one spreadsheet from another workbook using C#/.Net?
For some years I have been running two ActiveX Excel spreadsheets in VBA simultaneously and have been able to run one spreadsheet as a kind of slave from the other using the "Application.Run" function eg. ? Application.Run "OtherWorkbook.xls!Sheet1.RunMacro" ? However just recently I have needed to convert the VBA macros to C#/.Net which I know very little about. ? Is there a function in C#/.Net whereby I can replicate the Application.Run function? In other words initiate a macro from another worksheet. ? Amy help would be very much appreciated.... ? |
Re: reqHistoricalData - Stock Tickers
Jacky
I take over 1k end of day quotes from yahoo. There is a yahoo finance library/api that can be used from .net.
toggle quoted message
Show quoted text
Sent from ProtonMail mobile -------- Original Message -------- On Feb 9, 2020, 9:41 PM, Robbo < hairobinson@...> wrote:
|
Re: reqHistoricalData - Stock Tickers
Nick
开云体育To be clear, reqHistoricalData works - within the context of what
data IB provides. It may be that you need more data than IB
provides or need it faster, but to make a blanket statement that
IB's historical doesn't work just is not the case. On 2/9/2020 3:42 PM, Robbo wrote:
|
Re: reqHistoricalData - Stock Tickers
I am still trying to get some sense from this?
reqHistoricalData. Sure I shall as soon as I have some sensible data getting populated using IB. At this stage I do not recommend IB. I do not know about Yahoo Finance. need to explore.? On Sun, 9 Feb 2020 at 14:15, Rational-IM <ds@...> wrote: Robinson: would you mind pasting the code you use to download monthly historical data using reqHistoricalData? The smaller the amount of code to read basic data, the better. I was thinking about using IB (vs. Yahoo finance) but your answer re: the time to download is discouraging - so I don't want to reinvent the wheel in case this turns out to be useless. Thanks. --
Cheers, Robinson ? |
Re: reqHistoricalData - Stock Tickers
Thanks Adam. Could you please suggest a historical?data provider?? Yes I agree, I am facing lots of issues if I wish to develop?a strategy with the help from reqHistoricalData. I require close, open and low prices for NASDAQ, NYSE and LSE stocks, so that I can compute and screen On Sun, 9 Feb 2020 at 15:55, Adam <arahbee@...> wrote: It is not worth using IB for historical data for a large number of symbols if you want to do backtesting analysis, unless you are trying to use some unusual international exchanges where the historical data is not easily available. It's much easier to buy US equities data from a historical data provider.? --
Cheers, Robinson ? |
Re: reqHistoricalData - Stock Tickers
It is not worth using IB for historical data for a large number of symbols if you want to do backtesting analysis, unless you are trying to use some unusual international exchanges where the historical data is not easily available. It's much easier to buy US equities data from a historical data provider.?
|
Re: reqHistoricalData - Stock Tickers
Nick
开云体育IB is a broker and supplies data for 'typical' retail use. If you
have needs beyond what IB provides then you'll have to find a
dedicated data provider that has what you need. On 2/9/2020 8:02 AM, Robbo wrote:
|
Re: reqHistoricalData - Stock Tickers
Robinson: would you mind pasting the code you use to download monthly historical data using reqHistoricalData? The smaller the amount of code to read basic data, the better. I was thinking about using IB (vs. Yahoo finance) but your answer re: the time to download is discouraging - so I don't want to reinvent the wheel in case this turns out to be useless. Thanks.
|
Re: reqHistoricalData - Stock Tickers
Thanks, just the downside is that it takes almost 3 hours to just run NASDAQ stocks with?reqHistoricalData I require for different time frames such as monthly, weekly and daily time frames. The hours would add up if I add NYSE and LSE on top. IB should come up with some innovative interface to overcome?this limitation. ? --
Cheers, Robinson ? |