There's serious nerd sniping potential in asking how best to construct an automatic bidder, especially with the speed and scale requirements in place. It's an incredibly deep problem, and I don't believe there is a single right answer.
The problem is that it is unwise to trust an bidding algorithm designer whose incentives are aligned against yours. Google benefits from higher winning bids.
RTB bid requests have support for the normal auction based bids but also indicating possible private marketplaces which may come into play depending on the exchange and seller, meaning that the highest bidder will have indicated to the world their price, but not won the auction, so they may (erroneously) conclude next time to try bidding higher, leading to price distortions.
I suspect a large proportion of advertisers still believe the whole thing is a nice transparent fair auction process, and have no idea of how convoluted it has become.
Valuing a bid is a complex and interesting task. Ever since Second Price auctions started dying out DSPs should have moved to essentially algorithmic trading. A price calculation depends on tens if not hundreds of factors that are evaluted on a per auction basis.
Advertisers have been demanding more transparency into where their money is going for quite some time now. If you're an advertiser and your DSP isn't giving you detailed reporting into the fees they're being charged then it's time to move DSP.