Problem setting Market On Close Bet

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • monkeymagix
    Junior Member
    • Jul 2010
    • 105

    #1

    Problem setting Market On Close Bet

    Hi

    I was wondering if anyone could help me.

    Today I was playing about with some MARKET ON CLOSE bets.

    I was using this URL as a guide > http://bdp.betfair.com/docs/PlaceBets.html

    Which says that the BSPLiability option is the same as the BetAmount / Size on an exchange bet.

    The min size for a Back bet £2 and for a Lay bet £10.

    I was trying to place a £2 win bet for Rolling Aces at 15:50.

    The bet didn't win obviously but I more concerned about why the bet wasn't placed and what is wrong with my logic.

    I am using the old SOAP API at the moment as I am busy writing my new BOT with the new API.

    I wanted to place a MARKET ON CLOSE BET which I thought I could do with BACK bets where it just meant that I took the reconciled BSP price after the market was closed and that my bet was assurred to be placed.

    I have placed MARKET ON CLOSE LAY bets before without a problem.

    Always setting the Bspliability so I didn't lose more than I wanted e.g £10 or £20 for example. And from what I read the Bspliability parameter for a Back bet is the same as the Size parameter for an Exchage bet so if I only wanted to bet £2 I would set the Bspliability parameter to 2.00.

    However today I kept getting an "invalid size parameter supplied" message being returned when I tried to set the bet.

    I am following this parameter table.

    Bet Category Price Size BspLiability BetPersistenceType
    Exchange Yes Yes No Yes
    Market on Close No No Yes No
    Limit on Close Yes No Yes No

    The values I set were:

    Bets.betCategoryType = BFUK.BetCategoryTypeEnum.M // Market on Close (MOC)
    Bets.betPersistenceType = BFUK.BetPersistenceTypeEnum.NONE // betPersistenceType *must* be set to None for Limit/Market on close bets (as I understand from BDP documentation)
    Bets.betType = BFUK.BetTypeEnum.B; // B = Back L = Lay
    Bets.marketId = 112829040;
    Bets.selectionId = 5961786;
    Bets.bspLiability = 2.00; // this is the same as stake for limit on close
    Bets.size = 0; // I have to set this to 0 apparently as I am taking the BSP price

    I wasn't setting the Bets.Price parameter as the table says not to. However should I set it to 0 or null rather than just not setting it at all?

    This is the only thing I can think of why the bet wasn't placed.

    Can anyone tell me what parameters I set wrong or missed for a £2 Back (win) bet where I wanted to take the BSP at Market Time (market on close)?

    I don't know if this helps but I outputted the debug from my system.

    This system would like to place a PENDING WIN Bet for £2; Horse: Rolling Aces; Course: Ascot; Racedatetime: 15/02/2014 15:50:00; BetStatus: ; BetID: 0; SelectionID: 5961786; MarketID: 112829040; IsTrade: False; IsAccumulator: False; ignoreBet: False
    Check for MarketID: 112829040 - SelectionID: 5961786
    IN GetSelectionPrice for Rolling Aces marketID = 112829040 - selectionID = 5961786
    Last Price matched = 9.8
    MarketID = 112829040
    SelectionID = 5961786
    Best Current Available Price for Rolling Aces is 9.8
    Is there any reason we cannot place this bet e.g the horse is a non runner or market is cancelled? NonRunner = False - Market Open = True
    Our system has set a specific price for this bet at: 10
    The best price of 9.8 is less than our desired price so we set our price to our desired price of 10
    PlaceBet = True; BetStatus = ; BetType = WIN; BetPersistenceType = LIMIT;
    Place WIN Bet of £2 at a price of 10 on MarketID: 112829040 SelectionID: 5961786 BetID: 0 - BetPersitenceType: LIMIT
    LIMIT ON CLOSE BET
    LIMIT ON CLOSE SET - BetPersistenceTypeEnum = NONE
    LIMIT ON CLOSE - Set bspLiability to £0
    LIMIT ON CLOSE - Set Size to 0
    Ignore Price
    ErrorCode: OK - Full Response = Brainiac.BFUK.PlaceBetsResp
    The parameter for your size is invalid. Please check that you supplied the correct details
    This Bet could not be placed at this point in time; Invalid Size Parameter Supplied
    Bet Message = Invalid Size Parameter Supplied

    Any help would be much appreciated.

    Thanks for any help in advance.
Working...
X