Forum Article


Can you please tell me how can a bot detect if there are no Back (or Lay) bets on a selection ? I want it to place bets only on selections with Back or Lay Bets on the market.

Thank you


  • Add Your Comment


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

Comments ( 48 )

  • Admin
    10.3.2018 11:03:46

    Yes, bot does not cancel bets, and why should it do? The bot purpose is offer a bet to be the first in queue, and bot ends its execution only after bet amount it offers is fully matched. Bot can operate in allowed odds range set by Minimum/MaximumOdds when PlaceBetInAllowedOddsRange is checked (set to True) and in allowed odds difference range set by Maximum/MinimumOddsDifference.

    So you set allowed odds range and when odds changes and are not in allowed range, bot stops updating bet. When your bot operates on in-play market after goal is scored the bet is cancelled, if you left the parameter AtInPlayKeepBet unchecked (set to False).

    If you want to cancel bet placed by the bot, and so stop your action bot execution, then you can use on football markets the bot “Football Bot” and trigger the bot: “Cancel Bots On Selection”.

  • Corneliu
    10.3.2018 15:40:40

    Ok, and can I cancel the bot execution when the market suspends ? Because Stop Execution on Selection is always late to cancel the bots execution if it waits for the livescore to update.

  • Admin
    10.3.2018 19:22:27

    When a market is suspended, you cannot place a bet, update or cancel a bet, so common sense says, there is no need for bot execution during market suspension. Bots cannot do anything, any action on suspended markets.

    When a market suspension is a trigger for some action, then you need a bespoke bot to be developed, but I cannot see any use for such bot.

  • Corneliu
    12.3.2018 20:00:47

    Yes, you're absolutely right. What about the bot to place bets on its Last Price Traded, but on an associated market ? Can it be done ? Thank you Stefan

  • Admin
    12.3.2018 21:05:50

    You need custom built bot, so either send me specification with your budget, or have a look at bfexplorer bot sdk, and program your bot yourself.

  • Corneliu
    16.3.2018 6:04:31

    I'll try the sdk and send you a note if everything else fails. What's the diference between the Execute Bots and the Chain Execution bot ? Thanks 

  • Admin
    17.3.2018 19:01:17

    This is more about understanding of English language:


    a series of things connected or following in succession: a chain of events.


    a continuous or connected series: a gruelling sequence of exercises.

    English is foreign language for me, so from your misunderstanding of the term: "Chain Execution", we can use following bot names, describing bot functionality:

    Execute Bots

    Execute Bots in Sequence (instead of using term: Chain Execution), or better: Sequence Execution?

  • Corneliu
    21.3.2018 21:55:16

    Yes, I think "Sequence Execution" may define it better. When a bot places a "Fill or Kill" bet on an associated market (without the InPlayKeepBet selected), the bet doesn't cancel when its BetMatchingTimeout is met. On the other side, when the same bot places the same Fill or Kill bet on its own market (not an associated market) the bet cancels when BetMatching timeout is met. Do you know why this happens and how to make it cancel (as it should) when BetMatchingTimeout is met ? Thanks Stefan 

  • Admin
    22.3.2018 11:50:05

    The “Fill or Kill” bot works fine, and it does not matter by which trigger bot it was executed.

    I already mentioned how a bot is executed on betfair markets, but it seems you do not understand it. Bot is a program/code but its execution time is limited to time when market data are updated only.

    Bfexplorer offers two types of market data updating, using streaming technology or simply calling api method for updated market/s at preset time interval, keep in mind that there are two update intervals, for active and for passive markets.

    When using streaming api to update market data, the data are really updated only when changes are detected on betfair servers, so it means even if you set your update interval for passive market to 10 seconds, you will not get updated data if no updates are made in 10 seconds interval on betfair servers.

    In such cases, betfair streaming api offers “heartbeat” so each 60 seconds there is triggered update procedure, so chance to execute a bot as well, but I implemented it only for monitoring active market, for passive markets bot is really executed only when there are detected changes on the market/s.

  • Corneliu
    22.3.2018 12:40:18

    I believe I begin to understand (only a bit...) how your software and bots work, otherwise I wouldn't be able to have the profitable bots I have in the markets. But I know this is just the beginning and there's a huge mountain still to climb. In this case, the bot activates fine, but keeps in the market long after its BetMatching timeout is passed. I already tried with every combination of updating intervals, but there's something I'm missing here....