News Quotes & Futures Index Arbitrage Program Trading Values Calendars Briefing.com: Economic Calendar MarketWatch: Economic Calendar Market Analysis Blogs Papers Other |
Alpha Transport |
|
Code
Pure Java Client for Interactive Brokers - compiled from IB API
source - added DataFeed class |
|
Matlab sample code Shows how to download
historical quotes from IB in Matlab |
% connect to
IB TWS App javaaddpath(['TwsJavaClient.jar']); df = com.ib.client.DataFeed; ip_address = '192.168.1.1'; %
host running IB TWS port = 7496; df.connect(ip_address, port, randi(1e6)); % download 1
year of daily bars (that is max) days_back = 252; bars = df.backfill_daily_bars('XLF',
days_back); T = datenum(cell(bars.datetime)); Pc = bars.close; Po = bars.open; V = bars.volume; % download 10
days of minute bars days_back = 10; bars = df.backfill_1min_bars('XLF', days_back); T = datenum(cell(bars.datetime)); Pc = bars.close; Po = bars.open; V = bars.volume; % disconnect df.disconnect(); |
Contact |
|
|
Server |