%this is the main implementation file for TMP007
clc
clear all
close all

ticker = input('Enter the ASX ticker: ','s');

disp(['Beginning Realtime Streaming at ',datestr(now)]);
data = [];
i = 1;

while(1)
tic
last_trade = getLastData(['ASX:',ticker]);
data(i) = last_trade;
time = toc;
disp(' ');
disp(['Last trade for ',ticker,': ',num2str(last_trade)]);
disp([num2str(time),' seconds, arrived: ',datestr(now)]);
i = i + 1;
end