IB data

Here is the Java (1.5) code:

Code:
    public void tickString(int id, int tickType, String value) {

        printf("%-26s    %d  %s\n", TickType.getField(tickType), id, value);
    }

    public void tickGeneric(int id, int tickType, double value) {

        printf("%-26s    %d  %f\n", TickType.getField(tickType), id, value);
    }

    public void tickPrice(int id, int field, double price, int auto) {

        printf("%-26s    %d  %f  %d\n", TickType.getField(field), id, price, auto);
    }

    public void tickSize(int id, int field, int size) {

        printf("%-26s    %d  %d\n", TickType.getField(field), id, size);
    }

These functions -- er, methods -- are called by the API. Forgive the use of 'printf', too.

Note: this will 'printf' the realtime intraday data. Redirect it to a file, if it should be saved.

'printf' should be 'System.out.printf'. My %-26s lets the logger prepend a timestamp. Whoops! the logger calls System.out.printf. I was simplifying in the code, but the idea is sound. Where 'printf' is shown, above, there is actually a call to 'myLog', with 'printf' like arguments -- you'll get the idea.
 
Quote from jimrockford:

Yes, using the API for historical data, and using Quotetracker for real-time current data.

You can also do it with real-time data through the API, but if you do it through Quotetracker, it is easier and requires no programming.
 
Quote from ProgrammerGuy:

thanks trader for the reply... funny thing is that I called IB tech and said it couldn't be done

if you are programmer, you should check their website first, to see, what API is capable of. just go thru release notes and API documentation, methods and events speaks for themselves

http://www.interactivebrokers.com/en/software/apiReleaseNotes/index.php?ib_entity=llc

http://www.interactivebrokers.com/en/software/apiReleaseNotes/api_84.php?ib_entity=llc#84_intraday

http://www.interactivebrokers.com/html/webhelp/Interoperability/ActiveX_Other/activexevents.htm

http://www.interactivebrokers.com/html/webhelp/Interoperability/ActiveX_Other/activexmethods.htm

average IB CS know close to nothing about their API.ask them about is always bad idea, cause they may put you in totally wrong direction with their answers. better to try it, playing with demo or paper account.

to OP-forget about data for bunch of tickers. Not going to work after first 10-50 requests.
 
Back
Top