Forum Article

Bot execution on closed market

Is it possible to execute bot on closed market? because I am testing a strategy tand want to check who is the winner and looks like bot stops after market close

  • Add Your Comment

    +

    Please login to your bfexplorer account, if you want to add a comment to this article.

Comments ( 1 )


  • Stefan
    18.7.2021 17:41:17

    You cannot execute betfair bot on a closed market. On the other hand you can run a bot on an open market and override EndExecution method, where you can check whether the market is really closed and then do whatever you want to.

    The EndExecution method is call as well when market is stopped or bot execution is finished, therefore you need to check: if market.MarketStatus = MarketStatus.Closed

    https://github.com/StefanBelo/Bfexplorer-BOT-SDK/blob/master/MyFsharpBot/ReportWinnerBot.fs

    My bot example is in F#, but you can write your bot code in any .net programming language. Use LINQ to implement similar code like I used in my F# code.