This is simple,the oldest pending order means the OrderTicket() and OrderOpenTime() is the smallest.
You just need download the last one.