• Intuitive and Customizable User Interface

    Choose one of three user interfaces for your betfair trading. Create your application workspace for trading on ladders, or for betfair bot execution.

  • Quick Navigation and Browsing Through Betfair Markets

    Create your favourite events to browse quickly for markets you want to trade on. Searching, sorting and filtering is supported across the entire application on any data.

  • Support for Trading on Multiple Markets Simultaneously

    Monitoring odds trend for chosen market selections and watching for current profit on open bet positions. Possibility to close bet position on a market selection, on entire market or on all open bet positions.

  • Trading Tools and Betfair Bots, Support for Automated Trading

    Placing dutch bets, closing a bet position on selection or on entire market. Be the firts in queue, Tick offset, Drip feeding, Trading bots, Trailing stop loss and more than ten other betfair bots. Tools for automated trading and betfair strategies.

  • Not yet betfair user? Get your free bet.

    Take winnings early or cut losses. Cash Out singles and accumulators. You're in control - you decide. Automatically get the best prices from The Exchange the moment you place your Sportsbook bets. Win or lose, we'll match your first bet with a free bet up to £50.

Welcome to betfair trading software.

Community Recent Articles

Community Recent Comments

  • Betfair Bot
    17.10.2019 9:41:41

    That is great Peter.

    I would really suggest you to set breakpoint in your code and then debug it and browse available data offered by bfexplorer.

    You must know what data you have got, visualize them in your head, and then you know what you can do with data.

    Your approach for now is browsing existing code, so when you did not find similar one you cannot make progress, but data you have got, so working with data is the way to go.

  • peteresgate@outlook.com
    17.10.2019 9:13:56

    I got it to work using another of your codes that I found from weight of money :)


  • peteresgate@outlook.com
    17.10.2019 7:48:57

    Hi Stefan,

    Yes thanks it will get the odds at specified levels now thanks. 

    But with the volume it is different.  



    On Line 35 and 27, why I can't I just substitute the "priceData.Price" with "priceData.ToBack" ?

    With the PriceGridData.GetOfferedPriceData(), there is no method (that I could find) to go to different levels like with priceGridData.GetPriceData(index)



  • Betfair Bot
    16.10.2019 20:38:18

    On the line 3 of your code, there are set three values: startIndex, nextIndex, findFun

    The findFun is function used to evaluate the place with empty offer. So when you want to place back bet, it must be checked lay offer and wise versa.

    You change that code, therefore your findFun function returns true on offer with available offer. Actually in your code I cannot see logical problem because you start iterating through data on the best offer, so price must be set.

    If you code does not go to the line 23, as you say price returned is always 0.0

    Peter, how/where you execute your bot trigger?

    The full market depth is updated only for active market, so for the market that is currently open in Bet Event/Trader.

    It means that if you run your bot by Bot Executor tool you will get updates only for 3 best offered prices.

    I would suggest you to debug code, only this way you can find your problem in the code.

    Hint: There is function selection.PriceGridData.GetOfferedPriceData()

    You can use to get all offered prices. I do not know what you want to make in your code, so this function: GetOfferedPriceData returns all offered prices, and you can filter whatever criteria you use.

    Here is bot trigger code:


    Peter, please use VS debugger when testing your code.

  • peteresgate@outlook.com
    16.10.2019 3:13:24

    Please see the code here:


    I run it like this:

    let mutable odds = defaultArg (botTriggerParameters.GetParameter<float>("Odds")) 1.0

    odds <- getMarketDepthPrice(BetType.Back) (myLaySelection) 1
    outputMessage (sprintf "Lay Odds at Level 0 %.2f" odds)
    odds <- getMarketDepthPrice(BetType.Back) (myLaySelection) 2
    outputMessage (sprintf "Lay Odds at Level 1 %.2f" odds)

    but the result of odds is always 0.0

    I am trying to find the available odds at different market depth levels

    Could you please tell me what is wrong with the code?

  • Betfair Bot
    14.10.2019 13:04:41

    I have just updated Bfexplorer BOT SDK source code adding MyFootballStrategy projects showing how to use Bfexplorer Plugin integration.

    The MyFootballStrategy.App is working example. If you trade football matches on betfair you can use it to monitor all matches live score and match statistics.


    If anyone wants to collaborate on this project adding new features, and is able to program, then of course you can clone entire Bfexplorer BOT SDK solution.

    Those of you who just want to use this app, and are not able to build plugin from the source code, just contact me through support page and I will send you app/plugin files.

  • Betfair Bot
    14.10.2019 10:29:39

    One of TriggerResult discriminated unions entry is:

    TriggerResult.OpenAssociatedMarkets of string[] * (DataResult<Market list> -> unit)

    Allowing requesting associated markets to the market you are running your bot on.

    Every market is open as bet event on betfair, and you have got access to this information:


    So bfexplorer when you request TriggerResult.OpenAssociatedMarkets knows for which bet event id the associated markets should be queried.

    Please have a look at on this bot trigger script:


    Basically your bot has access to all betfair api methods:


    So you could be able to write any code against betfair api. The question is, is this approach practical?

    Your bot is executed on exact type of market, for instance on horse racing win market, so what markets would you like to open in Bet Event view? Tennis match odds market, or football match odds market?

    In any such scenario common sense dictates that you want to open associated market for bet event on which your bot is running, for instance place horse racing market, when your bot runs on win horse racing market and so on.

    If you want to build your bespoke app on bfexplorer app, you can do so like I present in this article:

    Bfexplorer Plugin Support

  • Betfair Bot
    11.10.2019 12:13:53

    Peter, post on github your code you want to review, and please add to files extension, then github code preview can highlight the syntax, as from ending .fs, or ,fsx it is known that code is F#.

    You can debug your code in Visual Studio, so you can really test each line of your bot trigger code, and so learn how your code works.

  • peteresgate@outlook.com
    11.10.2019 11:54:39

     That is a great explanation thanks :). I have noticed 1 thing with my bot and I see it doesn't seem to do what I think it should (I'm blaming my code) so I just wanted to ask that after it performs an executeOnSelection, mySelection1 and I change status <- goToMyNextTrigger and I have another executeOnSelection mySelection2 (when new conditions are true), it can do multiple executions with different selections right?  It may be because my action happens near the end of the race but I only ever see 1 bet.

  • Betfair Bot
    11.10.2019 10:28:42

    I created ScalpingTradingStrategyBot.fsx bot trigger as a case study for some trading strategy I read about on other forum. Unfortunately I forget to put link to that forum but posted on my blog this article:

    Greyhounds Racing - Scalping Trading Strategy Bot

    Please read it first if you did not do so before.

    So in the bot trigger code I created MyTraderBot taking selection and stake amount as entry parameters, lines from 50 (the bot constructor) to 86.

    As mentioned MyTraderBot orchestrates two “PlaceBetBot”s The parameter setting is created by function createBotParameters, lines from 27 to 38. As you may noticed (have a look at on the line 52) any bfexplorer bot is created as bot type, and uses its parameters, so in this case for PlaceBetBot, there is bot implementation type PlaceBetBot, and parameters the type (class) PlaceBetBotParameters. PlaceBetBot implements all bot logic, and parameters just describer set of parameters the bot can use, for instance BetType and Stake the bot places bet with.

    Bot must be executed on exact market and selection, therefore for instance of the bot object is created (lines 52 and 53), the bot comstructor takes market, selection, botPrameters and bfexplorerService.

    BfexplorerService object implements betfair api and application domain. When you run your bot trigger, actually your code uses BfexplorerService to interact with betfair api.

    The other used bot is: ClosePositionOnMarketBot, and from the name of this bot type, you can judge what this bot does. Therefore the bot constructor does not take any selection as entry value. The bot parameters are implemented by type: ClosePositionOnMarketBotParameters.

    The bot closes bet position when required profit is reached (Profit parameter, the line 102), and well ends execution of all running bots, that is executed before the bet closes selections bet position.

    Finally fot trigger code, the lines from 133 to 159. When bot trigger is executed, on all active selections there is created instance of MyTraderBot and one instance of ClosePositionOnMarketBot, the code line 145. When checking the code in createMyBots function, you can see that starting a bot is done by adding to the market, the line 111, the same in lines 65 and 66.

    When is actually your bot executed?

    Well, it is done by BfexplorerService after market prices have been updated, your bot is actually just object instance, and its execution time is limited only by short time when BfexplorerService updates entire status of market and bets data.

    The bot strategy is to place back and lay bets on selections, and as the bets are placed by PlaceBetBot, we need to update range of allowed odds range, the lines from 68 to 86, the method Update. We need to update this parameters on for running bots, lines from 149 to 153.

    Why bot trigger ScalpingTradingStrategyBot does not implement any logic to ends its execution? It can be simply done by checking if there is still MyTraderBot running on some selection.

    Well, because we orchestrate in this case two types of bots, and one of them closes/ends execution of all other bots before closing bet position on the market.

    This bot trigger code is nice example of advantages of using bfexplorer action bots, as nay strategy can be executed by these action bots. Your trigger strategy should define/implements just entry and exit criteria in time. The rest is executed by action bots.

    Use the code only as inspiration, as there is no logic in entry points implemented by MyTraderBot.