Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about changing orders from an AddOn

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Question about changing orders from an AddOn

    Hello,

    I'm writing an addon which needs to be able to update orders on occasion.

    I believed that the following code would be sufficient:

    var account = GetMyAccount();
    var order = GetMyOrder();
    order.Quantity = newOrderQuantity;

    if (order.Quantity == 0)
    {
    account.Cancel(new Order[] { order });
    }
    else
    {
    account.Change(new Order[] { order });
    }


    Unfortunately this doesn't seem to be working. It runs through without an error, but the order quantity is not updated,

    Is there anything else I should be doing?

    Thanks!

    Nich

    #2
    Hello NichUK,

    Thank you for your note.

    LimitPriceChanged, StopPriceChanged, and QuantityChanged are the correct properties to set for a change to price or quantity.

    So:

    order.QuantityChanged = newOrderQuantity;

    Should properly change the order quantity for you.

    Please let us know if we may be of further assistance to you.

    Comment


      #3
      Thanks Kate! I shall try that out first thing tomorrow.

      Nich

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      557 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X