Programming for Betfair, a guide to creating sports trading applications with API-NG, teaches you how to program a complete application for trading on Betfair. Also included is the building of databases for offline analysis, automated Betfair charts and discussion on advanced trading techniques.
Automatic Exchange Betting covers the construction of an automated system and goes a long way into system building using odds lines, weight of money, average prices etc. The book is very detailed and will give the reader a deep understanding of automated exchange trading and program development.
Another book that details the construction of an automated betting system is Calculated Bets: Computers, Gambling and Mathematical Modeling to Win. Written by Professor Steven Skiena, Calculated Bets details the professor's successful modelling Jai Alai matches, developing a trading strategy using Monte Carlo methods and then implementing bet automation.
Designing your trading software
Rather than trying to code the ultimate trading platform straight away, you should first build simple single-task tools to handle repetitve tasks. You can then add your own metrics for manipulating Betfair data. After that you might want to automate betting and position tracking. Finally, you can code a bot that does all of the above whilst acting under your own trading rules. My own trading system is a hybrid, with automation of many tasks but the final decision of when to trade is with me.