Multiple PlaceBet

How can I place "multiple bets" using by bot? For example, this 4 bets:

multiple place bet

 

Laying offer:
-----------------------------
BestPriceToBack + 1tick
BestPriceToBack + 2ticks

Backing offer:
-----------------------------
BestPriceToLay - 1tick
BestPriceToLay - 2ticks

 

Comments (3)

  1. StefanBelo Says:
    Thursday, December 17, 2009

    Betfair bot script for couple lines of code

    The bot uses just two parameters:

    • Stake
    • MinOddsDifference - to define the starting bet odds difference from the current offer

    To set it up with the Bot Executor use the bot settings for:

    • Bot type: MyBot
    • MyBotClassName: Bfexplorer.Scripting.Place4BetsBot

    You can download the source code of this betfair bot, unzip and copy the betfair bot script file into the MyBots folder.

    public override void DoYourJob()
    {
      base.DoYourJob();
    
      PlaceMoreBets(BetType.Back, runner.BestPriceToLay, NumberOfBetsToPlace);
      PlaceMoreBets(BetType.Lay, runner.BestPriceToBack, NumberOfBetsToPlace);
    
      Stop();
    }
    
    private void PlaceMoreBets(BetType betType, BetPrice betPrice, int numberOfBets)
    {
      if (betPrice != null)
      {
        bool nextOdds = true;
        int oddsDifferenceInTicks = RunnerProperty.MinOddsDifference;
    
        if (betType == BetType.Lay)
        {
          nextOdds = false;
          oddsDifferenceInTicks = -oddsDifferenceInTicks;
        }
    
        double odds = oddsDifferenceInTicks != 0 ? 
          (double)OddsRange.GetOdds((decimal)betPrice.Price, oddsDifferenceInTicks) 
          : betPrice.Price;
        double stake = RunnerProperty.Stake;
    
        int marketId = MarketId;
        int selectionId = runner.SelectionId;
        int asianLineId = runner.AsianLineId;
    
        List bets = new List();
    
        while (numberOfBets-- > 0)
        {
          bets.Add(
           new BetBase(marketId, selectionId, asianLineId, betType, odds, stake)
          );
    
          odds = (double)OddsRange.GetNextValidOdds((decimal)odds, nextOdds);
        }
    
        PlaceBets(betType, bets);
      }
    }
    
  2. Mir. Says:
    Saturday, December 19, 2009

    Thank you for couple lines of code ...

    Very usefull ;)

  3. mapper Says:
    Friday, May 21, 2010

    very nice idea. How can we change bot to place lay with normal stake (10 EUR) and back with price which distribute profit to other horses (less than 10 EUR)?

    For this bot stake is my liability is not working, right?

     

     


Do you want to comment this article? Sign up here or login.

User Menu