
Attached is what i call "Bespoke API". It is a VB6 .bas module containing my home-grown API for scraping the Betfair web server. This DOES NOT use Betfair's free API.
Note that this particular module is moulded around greyhound racing and has been chopped from my infamous Dog Bot. Horse racing and other sports can be added with a few copy/pastes and a little work with browser tools such as Fiddler, Live HTTP Headers or IEHttpHeaders.
The following functions are included:
--- API ---
Login()
Logout()
GetAccountBalance()
GetDogsMenu()
GetMarket()
PlaceBets()
GetProfitAndLoss()
GetMarketBets()
(each function returns a delimited string which can be parsed using the Split() and GetSubstring() functions)
--- TOOLS ---
GetSubstring() - Used for parsing strings
SetBetfairOdds() - Rounds a given number to nearest betfair increment. Has options for round up, round down and add or subtract "x" number of tics.
GetTicDifference() - Calculates the number of tics between the back odds and lay odds (the "spread"). I use this to decide whether to take the current odds or undercut the queued odds.
SaveFile() - Dump a string to a file. Use for debugging, data logging, etc, etc.
ShutDownPc() - I added this as my bots were often left unattended. Saves the electric bill!
There are no restrictions what-so-ever. Download my code, chop it, hack it, delete it, do what the hell you like with it, but don't pester me for any more spoon feeding.
And above all, GOOD LUCK!