No, we are not assuming it's closed. The Kepler equation for the ``orbit'', is valid even for unbound ``orbits'' (or rather, trajectories.) You only get a bound orbit for , or .