If you're thinking about doing this I would recommend doing it by hand for a while to understand the intricacies of the market and pricing dynamics. Only after that can you think about automating some of the stuff. It still may not be worth it because the cost of mistakes is high, development time could be long and honestly it might just be easier to eyeball and keep track of prices and inventory than putting in all that upfront work. In my experience you have to be very confident and experienced to automate something like that with real money at stake.