Behaviour of customerOrderRef when partially executed order is replaced

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • henry
    Junior Member
    • Oct 2018
    • 3

    #1

    Behaviour of customerOrderRef when partially executed order is replaced

    When you call replaceOrders to reprice an existing order that happens to have been partially executed, you in effect end up with two separate orders. I need to track this and tie these orders together when reported by listMarketBook or listRunnerBook. Therefore I am about to start populating customerOrderRef in the original orders. My hope is that any call to replaceOrders, which has the effect of splitting partially executed orders into two orders (one fully executed and the other a new order at the repriced price for the remaining unexecuted amount), will copy over customerOrderRef from the original order into the new order. Does anyone happen to know if what I'm hoping will happen is what actually happens ? If this doesn't happen then I'll have to do what replaceOrders does the less efficient way by issuing a cancelOrders followed by a placeOrders. Worried about the latency of two API go-arounds, API call quotas, etc, etc.
  • henry
    Junior Member
    • Oct 2018
    • 3

    #2
    I can confirm that the new order created by replaceOrders on a partially executed order gets the same customerOrderRef copied over to the new order - exactly as I hoped.

    12/01/2024 13:48:16 - INFO : ( 1) Of Course You Can : Update Lay : 16.00 -> 16.50 with 1.36 remaining
    12/01/2024 13:48:18 - INFO : ( 1) Of Course You Can : Has order(s) with duplicate customerOrderRef

    ​That's a small victory and makes the next stages of my coding a great deal easier - thanks for doing the right thing Betfair
    Last edited by henry; 12-01-2024, 08:38 PM.

    Comment

    • henry
      Junior Member
      • Oct 2018
      • 3

      #3
      As a follow up, who else uses customerOrderRef, and what do you use it for ? For me it is a handy way to link orders that originate from the same initial bet, generated by a sequence of one or more re-pricings (via replaceOrders API) but which have different betIDs.

      Comment

      • pwebtech
        Member
        • Apr 2021
        • 49

        #4
        ty for the info, never used it that way, never done a reorder, but just use customerOrderRef to ID what bot made the bet etc

        Comment

        Working...
        X