I think I recall this sort of thing happening back at launch but slightly different, I cant remember the details but there was a short (very short) period where just viewing an item forced you to buy it/took it's price from your funds. Havent heard of it for a long time so you'd think it had been fixed. It sounds a little hard to believe honestly. Are you sure you didnt accidentally buy a stack where the individual ore price was 5k each? You might want to take a screenshot of the purchase history.