According to the Interactive Brokers TWS API documentation on "Requesting Historical Bar Data":
keepUpToDate, Whether a subscription is made to return updates of unfinished real time bars as they are available (True), or all data is returned on a one-time basis (False). Available starting with API v973.03+ and TWS v965+. If True, and endDateTime cannot be specified.
I don't understand exactly what this means. Logically, I had assumed that this function would start a "5 Second Real Time Bars" subscription and close the "Historical Bar Data" subscription after historical bars were sent to the present.
However, this is not what happens. The post "Historical Bar Data" messages received appear randomly, sometimes a couple of seconds apart, sometimes milliseconds apart. The messages almost appear to be Ticks, except that most of these "Ticks" have identical price data.