The buy cargo order seems like it's limited to buying 34,465 items at once. It seems like it's mean to be able to buy a lot more than that.
I changed the cargo buy/sell and cargo transfer orders to use 32 bit unsigned integers instead of 16 bit numbers. The rollover will now occur just over 4 billion.
This change requires an update to both the server and client software.