While it’s possible to check the opening and closing times of a station that is operational for less hours than usual (for example Temple, Borough, Bermondsey, etc due to the virus), I cannot find a way to tell when other stations close for the night. If you check the status API at about 1 or 2am, all the lines are reported as closed and that service will resume later in the morning, but if you check the status of any station on that line, they’re all reported as open.
While this seems correct when you’re only looking for disruptions to normal service so it would make sense to get this result, is there any way to find out when a station opens and closes on a normal day without any incidents?
That endpoint only reports a closure if it’s due to some sort of disruption, but continues to say stations are open during the night when there is no service and the stations are actually closed.
Same goes for the TrackerNet feed at http://cloud.tfl.gov.uk/TrackerNet/StationStatus
I suppose I would assume that the logic is that the station is open from the time of the first service until the last? The first and last data is listed for each station and line combined.
Oh yeah that seems like quite a challenge.
Luckily I don’t care about the direction or destination of the first/last train, so I think I’m going to have to settle with just checking if the arrivals list is empty for the station in question.