- Joined
- 10 August 2008
- Posts
- 2,136
- Reactions
- 315
IB requires a $100,000US minimum portfolio to have an account that allows for lower margins. It's called a Margin portfolio account.
Is this your experience Cutz?
Hi Sails,... it looks like TWS only gives the first line of market depth.
From post #45
Hi Sails,
I have found a non trivial way of getting market depth info from TWS. You may have heard of the TWS API. IB provides this API so that end users can customise or extend their TWS capabilities. I experimented with the Java version of the TWS API and managed to get the MD for options.
There are quite a few steps involved eg. setting up the Java Development Environment, enabling the API in your TWS etc. It can be quite tedious. If you are interested, please feel free to ask me for details.
I've attached a sample MD of CBA Oct 50 call options.
Fox.
I'm assuming that you are running the windows operating system.I have API enabled in TWS, but not familiar with the JDE so might need some help there.
Dynamic MD updates.Once it's set up, does the MD update dynamically - or do you need to keep refreshing?
I think level 1 only. The TWS API provides functions to request for level 2 as well, but it did not seem to be invoked by the sample application. To be honest, I don't know what level 2 depth looks like. So, I'm not really sure if it is provided or not.Also, is it only level 1 depth?
My Java Development Kit, JDK was installed in C:\Program Files\Java\jdk1.6.0_101. Download and install JDK 6 Update 16 from http://java.sun.com/javase/downloads/index.jsp
http://www.interactivebrokers.com/download/JavaAPIGettingStarted.pdf is helpful if you need a guide.2. Download the TWS API from http://www.interactivebrokers.com/en...&ib_entity=llc . Go to the Proprietary API tab and download the API. I'm using the latest windows version.
This web page will help you with setting the PATH variable: http://www.computerhope.com/issues/ch000549.htm3. Step 1 should have installed the java compiler javac somewhere in C:\ProgramFiles\Java\jdk .... But you'll need to get javac to run from a DOS command line. To do this, you'll need to set the PATH environment variable to point to the location of where javac.exe resides. I'll send you another post as to how to do this if you are stuck.
When you invoke javac from the DOS command line, you should see:4. With javac correctly setup, look for a batch file named run.bat in the Java sub-directory of where the TWS API was installed. Type run from the command line. This should compile and invoke the sample java application that gives you the MD. I'll send more details if you need more assistance.
C:\Documents and Settings\LS>javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
If I'm not mistaken, the java you are referring to is probably the Java Runtime Environment (JRE). What you need to build and run the sample application is the Java Development Kit (JDK). By installing the JDK, you will get the file C:\Program Files\Java\jdk1.6.0_10\bin\javac.exe. This is the java compiler, which is the tool you need, to build the sample java application that gives us the MD. Hope I'm making sense.Is this the correct java version (build 1.6.0_15-b03)? If so, that's already installed and running.
If I'm not mistaken, the java you are referring to is probably the Java Runtime Environment (JRE). What you need to build and run the sample application is the Java Development Kit (JDK). By installing the JDK, you will get the file C:\Program Files\Java\jdk1.6.0_10\bin\javac.exe. This is the java compiler, which is the tool you need, to build the sample java application that gives us the MD. Hope I'm making sense.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?