I'm having the exact same problem: [11:02:35 AM][shard1]Order 5c27b0b56e6fa00924837c7a returns null
The order is persistent, and only goes active / inactive. It goes inactive when the terminal is full and cannot receive more.
When the terminal becomes available: it turns to: [11:09:34 AM][shard1]Order 5c27b0b56e6fa00924837c7a returns [object Object]
Same order. It was never cancelled. Only difference in active/inactive status.
Edited to add an update about 25 minutes later:
It seems fairly clear that Game.market.get OrderById(id); only looks in the global list filtered by active status. Knowing that the ID I was looking for would always be my own order, I changed it to: Game.market.orders[order_id]; to search only in my orders... which contains all MY orders regardless of active status.
That works fine. It always returns the object as you'd expect. What this means is Game.market.get OrderById(id); is minimally useful as it's ONLY guaranteed to work on active orders. Which... you almost certainly JUST GOT A LIST OF... so you already have all that info.