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
Tick Encoding/Decoding
Hi All,
I'm trying to encode tick data from IB, and wanted to use TickUtils.jar contributed here. But it seems to work with standard tick formats for example a Trade tick would have format (%time %price %trade size). IB data shows up as (%time %tick type %value), so IB would send two tick responses for a trade tick, instead of one. I was wondering if anyone was using the encoding utility for IB and if they would have a converter for IB tick data into the the format the encoder needs and are willing to share it. Thanks S |
Re: C# Option Contract Details
In the file section of this group
toggle quoted message
Show quoted text
I wrote a option chain getter I included the source.it in vb and conversion is easy to c# i had very little problems with it it get the chain of any stock ticker gets all the quotes and draws vertical spread graphs nick On 7/14/2013 6:23 AM, andrewcmeier wrote:
Oops, Tester and A1 were meant to be the same variable in the options lines, change Tester to A1 and that is what I have. |
Re: C# Option Contract Details
Peter Gum
Should '20130719' be '20130720'? I.e. 19 -> 20 to match the tws market line. (Although IB will expire the option on the 19th. Confusing.)
toggle quoted message
Show quoted text
Pete On 07/14/13, andrewcmeier<andrewcmeier@...> wrote:
Oops, Tester and A1 were meant to be the same variable in the options lines, change Tester to A1 and that is what I have. --- In TWSAPI@..., "andrewcmeier" <andrewcmeier@...> wrote:
|
Re: C# Option Contract Details
You're running an older version of ib-csharp.
toggle quoted message
Show quoted text
The latest code is now hosted here: Download that and give it a try. Shane On Sunday, July 14, 2013, andrewcmeier wrote:
Oops, Tester and A1 were meant to be the same variable in the options |
Re: C# Option Contract Details
andrewcmeier
Oops, Tester and A1 were meant to be the same variable in the options lines, change Tester to A1 and that is what I have.
toggle quoted message
Show quoted text
--- In TWSAPI@..., "andrewcmeier" <andrewcmeier@...> wrote:
|
C# Option Contract Details
andrewcmeier
Hi there,
I've started using the Krs.Ats.IBNet software () to develop TWS software in C#. Setting up equities is easy enough: Equity Google = new Equity("GOOG"); client.RequestMarketData(14, Google, null, true, false); But when I try to adapt it to options, I can't get it to work. This is what I'm using: Option A1 = new Option("AA", "AA", "20130719", RightType.Call, 8.0m); client.RequestMarketData(15, Tester, null, false, false); This is what it has in its class): public Option(string equitySymbol, string optionSymbol, string expiry, RightType right, decimal strike) This is the error I get when I raise e.ErrorCode: "No security definition has been found for the request" Does anyone know what I'm entering wrong, or just how to set up an option in C#? I also then wan't to be able to leave fields out to do things such as return all the contracts in a month, does anyone have any examples how to do this? I'm finding that C# should be a good way to download and analyse data but don't have any documentation, I've only worked out what to do from searching through lots of the code. Thanks for your help. |
Re: TWS API child order questions
Ray Salem
IN the demo account it was minutes, not sure if this would be true with real account
thanks ray ________________________________ From: cf16r <piter@...> To: TWSAPI@... Sent: Friday, July 12, 2013 11:23 AM Subject: [TWS API] Re: TWS API child order questions ? @raysalem619 did you really mean "minutes"? can somebody tell this is not true in a real account? I would like to see rather something less than second. |
Re: Upcoming stock earnings dates
Robert
I use
toggle quoted message
Show quoted text
" Let me know if anyone is interested in the VB.Net code that parses the downloaded html. It works well for me. r4 --- In TWSAPI@..., "rwk2095" <r@...> wrote:
|
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. |
to navigate to use esc to dismiss