• Betfair Bot
    3.12.2019 21:15:43

    Advice from Peter Webb from betangel forum:

    Perhaps see if there has been a big price change with no change is score line on the correct score market?

    It is really funny but this best software on the betfair world:

    “Bet Angel is the premier software for trading on Betfair. Used by professionals all over the world, Bet Angel has been developed by traders who use it as their primary tool. Introduced in 2004, Bet Angel is constantly developed with more features and improved performance over any alternative software.”

    Have no support for live score match data in automation!

  • Betfair Bot
    28.11.2019 14:56:21

    Yes, you start your custom built bot assembly with app:  Bfexplorer.exe

    Do you really think you will manage to program your bot, having such big problems when debugging bot code? I think you should find bot developer, or just send me specification for your custom bot.


  • Ganger
    28.11.2019 14:51:20

    BotUI.exe == Bfexplorer.exe I realized right?

  • Ganger
    28.11.2019 14:42:54

    The latest version Bfexplorer no BotUI.exe, but he needs to start MyCSharpBot.

    Where possible find and download BotUI.exe ?

  • Betfair Bot
    28.11.2019 11:38:27

    C:\Program Files (x86)\BeloSoft\Bfexplorer\Bfexplorer.exe

  • Betfair Bot
    13.11.2019 22:33:48

    And here is the result.

    Well, yes it would be a good idea to optionally execute "Close Market Bet Position" bot, after dutching bet is matched.

  • Betfair Bot
    7.11.2019 10:16:36

    ATP player' statistics

  • Betfair Bot
    5.11.2019 9:07:36


    5.11.2019 8:36:36

    That's great thanks   Can the market interval be changed via code?

  • Betfair Bot
    4.11.2019 16:39:32

    Your bot code is executed in market update event, so if your active market refresh rate is set to 250 ms, then your bot is executed every 250 ms. For passive markets (default 10s) or markets added to bot executor tool the default settings is 1 second.

    It means that when time is critical factor for your bot execution then you must set reasonable values for market update interval.

    If you are using streaming for data update (that is relevant only for active and passive markets in Bet Event View and Open Markets view), then as updates are really streamed only when changes are detected, your bot can be executed in heart beat event only, set for active market to 1s and for passive markets to 15 seconds, keep that in mind!

    Why is it implemented this way?

    Well, because bot reacts on market data changes, and there is no reason to execute a bot when there are no market data changes.

    4.11.2019 15:22:10

    Would you mind linking the article?  I can't find it.


  • Betfair Bot
    4.11.2019 8:57:13

    I had already answered such question.

    30.10.2019 14:22:56

    Thanks.  Actually this explains everything :)

    With the offered prices, it has probability -  could you please tell me what this is?

  • Betfair Bot
    30.10.2019 13:07:48

    Please watch this video from my debugging of bot trigger code:

    Debugging Bot Trigger Code

    I set breakpoint, and add to watch view, selection and selection.BetPosition, so I could browse the watched object data, and see what properties are full with data.

    The similar dialog I added couple month ago to bfexplorer so you can browse some market and market selection data, to learn about bfexplorer data, and how/what you can use in your bot trigger code.

    30.10.2019 12:05:50

    Yes but this prints all the bets, with no way to get just the matched lay or matched back bets.  To get the unmatched with your code is good, but the matched doesn't work this way.  Could you please show a code sample?

  • Betfair Bot
    30.10.2019 11:07:59

    Have a look at the line 34:

    sprintf "%s: %A" selection.Name selection.BetPosition

    selection.BetPosition object offers your bet position, so please browse data, put their break point when dubbing your bot trigger code.

    30.10.2019 2:34:41

    The unmatched data works great thanks Stefan.  I really appreciate the code thanks. 

    But I still have a problem getting the matched data.  When the orders are matched, I am trying to get the combined Odds (as float) and combined Stake (as float) for Matched Lays, and Matched Backs as shown in the Market Bets window (it combines all the Matched Lays and all the Matched Backs).  All I get with the code I posted recently is the head which is the first item shown in ther market bets window, but I can't sort the map to get the requested matched/unmatched to the head.  Could you please post the code snippet for this?  

  • Betfair Bot
    28.10.2019 16:01:12

    Yes, exactly. You simply must use correct wording. “Bets” is plural, right? So it is collection, not one bet. On the object property that is bet, you could do so: bet.Price and so on.

    I do not know what exactly you want to achieve as it is clear that you could have more unmatched bets on selection, so make reusable functions you could use/reuse in your bot triggers.

    I wanted to explain in my sample bot trigger code, how you can work on bfexplorer domain objects, so I used direct code, but if you try to write:  unmatched .. Visual Studio will offer you all available functions/types and so available for you after you

    open BeloSoft.Bfexplorer.Domain

    so surprising it is offered for you:

    isUnmatchedBet, unmatchedBetsExists, getBets, getUnmatchedBets, getUnmatchedBetsByBetType and so on and on.

    So code I already had wrote and is reusable.

    Then you could write:

    let layUnmtached = market.Bets |> getUnmatchedBetsByBetType BetType.Lay
    if not layUnmtached.IsEmpty
        let firstUnmatched = layUnmtached.Head
    28.10.2019 14:57:26

    So do you mean something like this?:

    let betSize(bet : Bet) =


    let getBetSize() =

     if selection.Bets |> Seq.exists (fun bet -> bet.OrderStatus <> BetOrderStatus.Matched &&   bet.BetType = BetType.Lay)
     let price =  selection.Bets |> betSize |> Seq.head

    This is the correct way?  Is there not a way to do something like selection.Bets.Size or selection.Bets.Price or selection.Bets.BetType etc?

  • Betfair Bot
    28.10.2019 13:20:07

    Any code, in any programming language is “sentence” expressed by programming language “words” and constructs you can make by programming, adds the language vocabulary.

    So the vocabulary you can use to express your intentions in programming language is limited to couple words.

    The above line of code:

    let Stake = _selection.GetPriceSize(BetType.Lay)

    In human sentence expresses:

     Selection, get PriceSize object for Lay side to stake!

    As English have strict words order in sentence, to be grammatically correct, we command so exclamation mark at the end of sentence.

    So you command selection to get PriceSize, and in this context it is Lay PriceSize offered. It is not bet, it is offer on this selection other bettors placed.

    You can command bet object to get price or size to you, so odds or stake you placed a bet with.

    So you must ask/command _selection.Bets to get all unmatched bets to you (to value), and then ask a bet to get you price, size and so on, like I did in my bot trigger code:


    on the line 31.


    Read further only when you want to learn some advance features of F# programming language.


    I do not know in what context you use _selection, but please keep in mind that in F# underscore _ is used as intention to declare not used value, because in F# you must declare exact intention, so like in mathematics it does not make sense to express something what is not used.

    Yes, in other programming languages, programmers used to declare object variables with _, but in F# it has different meaning, for instance here:


    On the line 52, where I declared construct for BetStatusBetCancellingBotOrchestrationBotTrigger type, I used _ for not used values, because in F# any input value/s in constructor are declared as well as object values you can access not only in constructor but in entire type.

    On the line 106, you can see __ (two underscores), so in type member you must type __ to declare not used self-identifier of object. I use this as self-identifier, but you can use whatever word/character.

    Ok, this underscore issue is for advance developers, you code will work whatever you will use.


    Option value


    For the option types/values it is similar like in C# for Nullable. So you can use anOptionValue.IsSome and if is some you can get value by: anOptionValue.Value, but better way is to use match expression or functions from Option module, like Option.iter.

    In my code you can find maybe, computation expression I created, so for options you can type simplified expressions, for instance here:


    Lines from 39 to 43, and then on line 40, let! ... actually evaluates if mySelection.MetaData.IsSome and continues only when it is assigning to metaData the value, otherwise returning None.

    Such expression allows me to write less code. Programming is not about writing a lot of code, actually less code is always better approach.

    Programming is about understanding of context in which you write the code, and so it is about interpreting of “words”.