With interactive brokers you typically can't trade futures that have physical delivery after the "first notice" date, I know in grains first notice is typicall the last business day of the month prior to expiry.   The link is the example from IB.   The example shows that longs and shorts are treated differently but on the futures physical delivery tab, IB shows that long and shorts are both cutoff 1 day prior to first notice.   So my questions would be: does algoseek's data account for this?(guessing no) and does the expiry filter go off of last trade or first notice? 

One could liquidate or roll any positoins at month end if they have less than 30 days to expiry,  but as the rules can be different for softs, metals, grains, etc... you need lots of rules to trade mulitple types of futures