Placing a Bet at BSP - MARKET_ON_CLOSE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AnarchistChess
    Junior Member
    • Mar 2009
    • 2

    #1

    Placing a Bet at BSP - MARKET_ON_CLOSE

    I am currently placing bets and lays successfully programmatically in C# using the API-NG code and a delayed key.
    However, I want to place bets at BSP (market on close).

    Each time I try I get an exception thrown by the API but the 'data' element of the exception is null, so there is no meaningful help in the exception.

    I have tried to create the request exactly as indicated in the documentation:


    placeInstruction.OrderType = OrderType.MARKET_ON_CLOSE;

    var marketOnCloseOrder = new MarketOnCloseOrder();
    marketOnCloseOrder.Size = 10.0;

    placeInstruction.MarketOnCloseOrder = marketOnCloseOrder;
    placeInstruction.SelectionId = selectionId;
    placeInstructions.Add(placeInstruction);

    var customerRef = "123456";
    var placeExecutionReport = BFManager.client.placeOrders(marketId, customerRef, placeInstructions);​


    Does anyone have any idea what I'm missing here?

    I was wondering if the BSP markets are not available with the delayed key key but I can't find anything stating that in the documentation.

    Cheers..
    Last edited by AnarchistChess; 30-09-2023, 01:05 PM.
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    I don't know the answer at the moment. Could you show us the curl string for the bet request? Could you show us the response? Thanks.

    Comment

    • pwebtech
      Member
      • Apr 2021
      • 49

      #3
      in the example code you give your placeInstruction has no Side property?

      Comment

      • AnarchistChess
        Junior Member
        • Mar 2009
        • 2

        #4
        Thanks for your help guys. The problem was with the name of the parameter for the amount being wagered. The documentation had it as 'Size'. It should be 'Liability'. It's working now.

        Comment

        • pwebtech
          Member
          • Apr 2021
          • 49

          #5
          good spot!

          (but documentation is correct https://docs.developer.betfair.com/d...xecutionReport for MarketOnCloseOrder it's 'liability')

          Comment

          • novak24
            Junior Member
            • Oct 2023
            • 1

            #6
            Does anyone know whether limitOnCloseOrder is available on tennis or is it just horse racing?

            Comment

            Working...
            X