Sort of… It looks like we’re actually sorting by panictime, which is an old deprecated thing that defaults to 15 hours before the derail time… so in most cases you’ll get things sorted by losetime ascending, but in some cases, for very old / longrunning goals, that panictime threshold might have been set to something other than the default, which would put them in a spot in the sort that doesn’t correspond correctly with the losedate.
Ah, right, thanks @bee! That panic-time / sort-threshold parameter was killed years ago though, so I think it’s safe to rely on the API returning goals sorted by time-to-derail.