I use a simple CSV text file, one line per tick event, and abbreviate the tick types to save disk space. Example from 5:00:00PM today for SPY. 17:00:00.1239,TP,B,289.69,SPY (e.g. Tick Price, Bid) 17:00:00.1239,TS,b,40,SPY (e.g. Tick Size, bid-size) 17:00:00.1239,TR,BE,QTM,SPY (e.g. Tick stRing, Bid Exchange) 17:00:00.6237,TP,A,289.72,SPY 17:00:00.6237,TS,a,20,SPY 17:00:00.6237,TS,b,20,SPY 17:00:00.6247,TS,a,20,SPY 17:00:00.6247,TR,BE,T,SPY 17:00:00.6247,TR,AE,T,SPY 17:00:01.3751,TS,a,19,SPY 17:00:06.1310,TR,T,1560805205,SPY 17:00:06.1310,TP,L,289.69,SPY (e.g. Tick Price, Last) 17:00:06.1310,TS,LS,1,SPY 17:00:06.1310,TS,V,389618,SPY (e.g. Tick Size, Volume) 17:00:06.1310,TS,b,19,SPY 17:00:07.3832,TR,T,1560805207,SPY 17:00:07.3832,TS,V,389619,SPY 17:00:07.3832,TS,b,18,SPY 17:00:09.6361,TS,b,23,SPY 17:00:09.6361,TR,BE,TM,SPY I use this log: a) For troubleshooting b) Instead of using live tick data, my application can use a previous log file for testing new enhancements or bug fixes.
Here is the workaround after talking to IB support: when the data feed stops responding on IB Gateway: Code: $ windowid=$(xdotool search --onlyvisible "API ACCOUNT: <ACCOUNT NAME>") $ xdotool mousemove --window $windowid 50 10 $ xdotool click --window $windowid 1 $ xdotool key ctrl+alt+r # reset IB connection $ xdotool key ctrl+alt+f # reset data feeds <-- probably this one So I should be able to automate it. Will try it manually next time this happens, and then will automate it. Edit: there's a windowraise missing in here somewhere. Unfortunately, windowfocus does not work since I'm not running a window manager.
Happened again. Saw a curious message: "Out of heap space"... So I increased memory again. Now at 6 gigs. More notes to myself below: Code: $ for win in $(xdotool search --onlyvisible "API ACCOUNT:"); do xdotool windowfocus $win; xdotool windowraise $win; xdotool mousemove --window $win 50 10; xdotool click --window $win 1; xdotool key --window $win ctrl+alt+r; sleep 5; xdotool key --window $win ctrl+alt+f; sleep 5; done;