"I bought it AT an auction" - this is good. Strictly speaking, that sentence could imply that you were physically THERE, at the same PLACE as the auction, but it's meant metaphorically (you were somewhere else, bidding using your computer, I assume). So it's good.
"I bought it IN an auction" - that's probably acceptable (it's obvious what you mean) but I wouldn't say that.