Article

Football Code (max bet per match)

I have already the bot strategies written in Python which appear to be different to yours bots written in F# / C#

My issue is that the code occationaly backs a football match multiple times eg where the BACK / LAY conditions are met which exceeds my % risk per match for the total balance ..

Do you have in your programming code something which states that the maximum bet per match should eg be 50£ or similar?

I could then potentially reuse this for my Python script.

Thanks!

Comments ( 1 )


  • Betfair Bot
    14.10.2017 17:33:21

    SPORTSBETTER posted on betfair forum following request: FOOTBALL CODING (DOUBLE BACKING) 

    http://forum.bdp.betfair.com/showthread.php?p=14815 

    I will not speculate about quality of his bot code, but will say what could go wrong when programming with betfair api, and what some software developers do not realize when implementing betfair bots. 

    Our applications/bots communicate with betfair using betfair API in request/response manner through the Internet, and so a lot could go wrong.  

    * Internet connection or latency problems 

    * Terminated connection 

    * Betfair api services problems 

    All that could happen anytime, and the worst-case scenario is when our api request was processed by betfair but response was not deliver back. When communication problems happen during a bet operation, and it is not handled correctly by bot code, the bot can place double bets. 

    Bfexplorer bots are implemented to correctly handle the above issues and more. What will happen, when part of bet is matched and offered odds moves? What will happen when bot placed a bet and market is suspended, so unmatched bets are cancelled? 

    Those are questions bot developer should deal with some way in his bot code, so it means that bet place operation is not just simple call of betfair api method: placeOrders. 

    For instance, when bot should place a bet under minimal stake amount, your bot must use betfair api methods:  placeOrders, cancelOrders, replaceOrders. 

    All that means that your bot code is not just about betfair api methods wrappers, but more about operation flow, because your bot strategy could involve to place more bets on different market selections. 

    Bfexplorer bots offer such operation flow adding the base betting or trading features, so hedge bet calculation, dutch betting and so on. Bfexplorer bots implement those base features for you, you do not have to think more about betfair api, but about your strategy implementation, so you program your trading or betting model, and use bfexplorer bots to orchestrate bet operations. 

    The simplest way of implementing your own strategy is using the bot: Execute Trigger Bot, and you program your strategy logic in script code.  

    In my video you can see how such script looks like when implementing "your strategy". You can use it just replacing your code in the function:  getMySelectionAndBetType 

    In F# you can even use your python code if you want to: FSharp.Interop.PythonProvider