change price and size of existing order

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roge1
    Junior Member
    • Nov 2014
    • 4

    #1

    change price and size of existing order

    Hi:
    How can I change price and size of open LIMIT order using API Ng?
    Thanks in advance
  • merecat_
    Junior Member
    • May 2009
    • 35

    #2
    My understanding...

    cancelOrders
    - reduce the size of one or more orders e.g. half its stake
    - don't believe it costs anything (no new bet ids)

    replaceOrders
    - change the prices of one or more orders
    - cost is one new bet id

    If you want to increase stake, you either cancel the original and place a new larger position (and it loses its place in the queue) or you add a new position for the difference.

    It's all documented here: https://api.developer.betfair.com/se...ing+Operations

    And the visualiser can be used to experiment in case you were not aware of it: https://api.developer.betfair.com/se...G+-+Visualiser

    Comment

    • roge1
      Junior Member
      • Nov 2014
      • 4

      #3
      Thanks merecat for your response. I've figured out about the newPrice in the ReplaceInstruction, but I was not aware of the sizeReduction of CancelInstruction (not very intuitive).
      But what I'm interested more is is sizeIncrease, that seems as not possible in the API. Is like the cashout, both are posible via web but not in the API...I'm afraid.
      Regards

      Comment

      • merecat_
        Junior Member
        • May 2009
        • 35

        #4
        If we were allowed to increase the size of an existing position that would provide a means to reserve a place in the order queue, not so fair perhaps and certainly a nightmare for BF to implement I would have thought. So it is by design I imagine. Adding the difference or cancelling and adding the whole anew are the only options that I know of.

        Comment

        • lawred2
          Junior Member
          • Dec 2015
          • 7

          #5
          Originally posted by merecat_ View Post
          My understanding...

          cancelOrders
          - reduce the size of one or more orders e.g. half its stake
          - don't believe it costs anything (no new bet ids)

          replaceOrders
          - change the prices of one or more orders
          - cost is one new bet id

          If you want to increase stake, you either cancel the original and place a new larger position (and it loses its place in the queue) or you add a new position for the difference.

          It's all documented here: https://api.developer.betfair.com/se...ing+Operations

          And the visualiser can be used to experiment in case you were not aware of it: https://api.developer.betfair.com/se...G+-+Visualiser
          Thanks.

          One question regarding reducing the size of the order using cancelOrders..

          Can you reduce size so that remaining amount is now below BF minimum bet? i.e. €3 to €1??

          Comment

          • lawred2
            Junior Member
            • Dec 2015
            • 7

            #6
            Originally posted by lawred2 View Post
            Thanks.

            One question regarding reducing the size of the order using cancelOrders..

            Can you reduce size so that remaining amount is now below BF minimum bet? i.e. €3 to €1??
            Neil indirectly posted answer to this in another thread

            re: placing below minimum bet limit of 2

            It is possible to place bets of less than £2. However, we'd recommend that you only do this for 'greening-up' or short term testing. Placing bets consistently below the minimum stake level may result in your account being suspended as this is in breach of our terms and conditions.
            If you have a 'Unmatched' bet of at least £2.00 on a specific selectionId in a market, you can submit further placeOrder requests for a stake of less than £2.00 on the same selectionId, cancel the original unmatched bet and the adjust the price of the new bet below £2 accordingly.

            Alternatively, you can place an unmatched bet and then reduce the bet size to give you the new required stake amount (of less than £2). Using the cancelOrders service.

            For example, reducing a £3 stake bet by £2 would leave you with an unmatched bet of £1 which you can then place at the desired odds using the replacOrders instruction:

            canceOrders

            [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/cancelOrders", "params": {"marketId":"1.119532513","instructions":[{"betId":"52882616087","sizeReduction":"2"}]}, "id": 1}]

            replaceOrders request

            [{"jsonrpc": "2.0", "method": "SportsAPING/v1.0/replaceOrders", "params": {"marketId":"1.119532513","instructions":[{"betId":"52882640505","newPrice":"4.5"}]}, "id": 1}]

            replaceOrder response

            [{"jsonrpc":"2.0","result":{"status":"SUCCESS","mar ketId":"1.119532513","instructionReports":[{"status":"SUCCESS","cancelInstructionReport":{"st atus":"SUCCESS","instruction":{"betId":"5288264050 5"},"sizeCancelled":1.0},"placeInstructionReport": {"status":"SUCCESS","instruction":{"selectionId":9 618613,"limitOrder":{"size":1.0,"price":4.5,"persi stenceType":"LAPSE"},"orderType":"LIMIT","side":"B ACK"},"betId":"52882717122","placedDate":"2015-07-17T10:32:43.000Z","averagePriceMatched":0.0,"sizeM atched":0.0}}]},"id":1}]

            Comment

            Working...
            X