Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Twsapi
- Messages
Search
Re: Upcoming stock earnings dates
rwk2095
I built a short term stock-trading app about ten years ago that excluded stocks with earning releases that day or the next. I used Yahoo!Finance via a screen scraper as my source of earnings release schedule, though it was not always complete. My scraper app was pretty primative, and whenever Yahoo changed the format of the web page, my program failed to deliver the desired data.
toggle quoted message
Show quoted text
There are several other sites that also have earnings release schedules, and interestingly, their lists are usually quite different. I ran the app for 8+ years, but I shelved it about a year and a half ago because the performance had deteriorated. [rwk] --- "ramdukof" <ramdukof@...> wrote: Is there any API request that returns upcoming stock earnings dates? |
Re: The following jar files is missing from the classpath: hsqldb.jar
If you were typing that command in a terminal window it will not work
unless you first make the default directory C:\Jts. Doing that allows you to specify the jar files without specifying the entire path. So to make a long story short, what if you try using the whole path for the jars in your command line. Instead of specifying the jar files like this: -cp jts.jar;total.2012.jar Do this: -cp C:\\Jts\jts.jar;C:\\Jts\total.2012.jar On Fri, Jul 12, 2013 at 6:56 PM, DavidP <af402469@...> wrote: ** [Non-text portions of this message have been removed] |
The following jar files is missing from the classpath: hsqldb.jar
The defaults classpath in the TWS 938.1h shortcut is C:\Windows\system32\javaw.exe -cp jts.jar;total.2012.jar -Dsun.java2d.noddraw=true -Dswing.boldMetal=false -Dsun.locale.formatasdefault=true -Xmx768M -XX:MaxPermSize=128M jclient/LoginFrame C:\Jts
I tried replacing that classpath with this one from earlier in the thread, I was unable to get the shorcut to work after that so I put it back to the default classpath.C:\WINDOWS\system32\javaw.exe -cp jts.jar;total.2012.jar I did also add -hsqldb.jar into the classpath to see what would happen, but it would not run like that. |
Re: Connect to TWS in main not in Thread (Java)
btw12342001
It's just an example so don't expect it to do something else. Your problem isn't really with the threads but the run method (called with .start). That method connects and requests data. If you want more data with the same connection you will have to write it yourself somehow.
toggle quoted message
Show quoted text
You could simply add more lines like Contract contract = createContract..... eClientSocket.reqMktData.... but then you'd have to redo the way it handles returned data. --- In TWSAPI@..., twsapi <no_reply@...> wrote:
|
Connect to TWS in main not in Thread (Java)
twsapi
Hi board,
I have a question regarding the thread programming in Java with the IB API. In the example application (Example 1) you see that first the main class is called and within that class a new thread is called e.g. new Example1(args[0]).start(); If I move the connect call to TWS e.g. connectToTWS(); into the main class the thread will not see/be able to access the open connection to TWS. My question is now, why is the thread not able to use the opened connection within main but need its own connection call? And can I actually use just one connection call in main to be used by multiple threads? What I want to achieve is that the main class opens the initial call to TWS and holds this open while different threads can use this open connection. As every call of connectToTWS(); requires me to allow access in the TWS client I only want to authorize my program once not every time a thread actually opens the connection. Not much of automation when I need to authorize it manually every time :) Thanks so much for your help! Regards |
Re: The following jar files is missing from the classpath: hsqldb.jar
BeeJay (GMX)
I'm using TWS 938.1 which starts and runs flawlessly if I open it bySorry, I dont use IBController. But there are a lot of users here which can help you how to change the classpath for the TWS in IBController. I do see the total.2012.jar file in C:\jts directory.-Dsun.java2d.noddraw=true -Xmx512M -XX:MaxPermSize=128M jclient/LoginFrame C:\jts |
Re: TWS API child order questions
Ed
If I remember right he was talking about a limit order which of course
toggle quoted message
Show quoted text
will sit until the price is met. Market orders in liquid markets are essentially instantaneous. On 7/12/2013 2:23 PM, cf16r wrote:
|
Re: Compiling TestSocketClient
bbbvvgtm
--- In TWSAPI@..., bbbvvgtm <no_reply@...> wrote:
Whoops. Forgot one thing you need to do if you want to disable the "Accept incoming connection attempt" message TWS gives you when you try to connect. (This makes full automation easier.) In Trader Workstation, click on Edit-Global Configuration, then click on "General". Under "Trusted IP Addresses", click "Create" and add "127.0.0.1" then click on "OK" to save it. |
Compiling TestSocketClient
bbbvvgtm
I just downloaded the latest versions from IB. I wanted to compile/run/modify TestSocketClient, but ran into a couple of minor gotchas. So, I decided to document it in case someone else finds it useful.
I started with IB's Getting Started document: I had some troubles in a couple of areas, so this is my getting started HowTo. Download and install the standalone desktop version of IB's Trader Workstation Start Trader Workstation Click on Edit-Global Configuration Make sure "Enable ActiveX and Socket Clients" checkbox is checked Note the number in "Socket port." (Here I will assume it's 7499.) Click "OK" to save the settings Download and install the IB API Create a new folder for your program. (Here I will assume it's C:\MyTestProgram.) Copy the following folders (and sub-folders) from IB's API location: Shared SocketClient TestSocketClient Launch Microsoft Visual Studio 2010 Professional Edition Hopefully 2008 and 2012 also work. I don't believe the Express Edition includes MFC and therefore will not work. Click on File - New - Project From Existing Code... What type of project would you like to create? → Visual C++ Click on "Next" Project file location: Browse to your folder (here C:\MyTestProgram). Project Name: MyTestProgram Click on "Next" Check the checkbox "Add support for MFC" Click on "Finish" Wait until your program is setup Click on Project – Properties (or you can right click on MyTestProgram in the Solution Explorer and choose Properties) Under Configuration Properties – C/C++ - General For "Additional Include Directories", enter "./Shared;./SocketClient/src" Do this for both "Debug" and "Release" (Configuration: at top) Under Configuration Properties – C/C++ - Code Generation For "Runtime Libraries", choose "Multi-Threaded DLL (/MD)" Do this for both "Debug" and "Release" (Configuration: at top) You should now be able to Build both the Debug and Release versions Run the program, (in the debugger or C:\MyTestProgram\Release\MyTestProgram.exe) Click on "Connect..." Change "Port" to the Socket Port noted above (7499). Click on "Req Mkt Data..." Change "Symbol" to "IBM" (or whatever) Click on "OK" You should now see IBM data being displayed You can a lot of what is happening in the file "client2Dlg.cpp" |
Re: problem with contract details
dairen62
i received exactly the same answer... hope for a quick solution :)
toggle quoted message
Show quoted text
--- In TWSAPI@..., clove2hitch <no_reply@...> wrote:
|
Re: The following jar files is missing from the classpath: hsqldb.jar
Thanks for your assistance with this. I tried starting TWS from the IB website. The script seemed to run a litle further after that as the username and password were entered and a log in attempt was made but then the same hsqldb message came up.
toggle quoted message
Show quoted text
I'm using TWS 938.1 which starts and runs flawlessly if I open it by using the TWS icon on the desktop. I'm also using IBControllerV2-9-0 with the default command line. I must admit I don't even know where the command line can be found. I opened various files and did not see anything which looks like what has been posted in this thread. Which file contains the command line? I do see the total.2012.jar file in C:\jts directory. Thanks David --- In TWSAPI@..., "BeeJay (GMX)" <bee_jay61@...> wrote:
|
Re: problem with contract details
clove2hitch
just got an answer from IB API support.
1 minute issue should be solved in near future(when???) Unfortunately IB imposes limitations on the amount of contracts --- In TWSAPI@..., clove2hitch <no_reply@...> wrote:
|
The following jar files is missing from the classpath: hsqldb.jar
btw12342001
Thanks for the info. I'm using 927.7. I don't usually upgrade as long as everything is working and IB doesn't force me to.
toggle quoted message
Show quoted text
--- In TWSAPI@..., "BeeJay (GMX)" <bee_jay61@...> wrote:
|
Re: problem with contract details
clove2hitch
Hi, i experience same issues!
toggle quoted message
Show quoted text
the first request answers quickly then a second after 1 minute then nothing... :-( I updated TWS and API to use latest stuff but even worse with the <>clients.exe crash (previous API clients versions don't crash). I'm going to log the issue to IB. Regards CH --- In TWSAPI@..., dairen62 <no_reply@...> wrote:
|
Re: Need Information Regarding FIll Or Kill Order
If you have the same problem when using TWS alone, it is not an API problem.
toggle quoted message
Show quoted text
You might still get help here but it is technically off-topic. Problems should always be addressed in TWS first before API questions become relevant. Otherwise you look in the wrong place for most problems. It is a common mistake. First try things in TWS. Second if you have problems with your code, try things in the API demo apps if possible. In your own code make sure you are receiving error callbacks (and logging or otherwise recording the information) so you can report all appropriate information when you post a question. You do not explain what you mean by "unable to get FOK value" when using TWS alone. If FOK simply does not show up in the popup list, then you probably have not enabled it in the Features under your TWS configuration. At the moment I'm running IB Gateway so I can only run TWS in demo mode. But there I see what I previously suggested to you. Under Configuration > Features > Order Management > Time-in-Force you must make sure Fill-or-Kill is checked. Is this your problem? The curious thing is that IB Gateway does not seem to provide the Features section. Perhaps this means all such features are turned on in IB Gateway. If so using the Gateway might be something else for you to try, at least to get more information, if necessary. -K On 7/12/13 12:24 AM, "narasingarao_kavali" <no_reply@...> wrote:
|
to navigate to use esc to dismiss