developers:websocket:orders

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
developers:websocket:orders [2025/03/14 22:10] chaddevelopers:websocket:orders [2026/01/23 20:15] (current) chad
Line 424: Line 424:
  
 When the **Trigger Order** executes, the **Take Profit** and **Stop Loss** orders are placed. If the price reaches the take profit level, the stop loss order is canceled, and vice versa. When the **Trigger Order** executes, the **Take Profit** and **Stop Loss** orders are placed. If the price reaches the take profit level, the stop loss order is canceled, and vice versa.
 +
 +
 +==== Flatten Position ====
 +
 +A Flatten Position Order closes the entire position in the specified market by submitting an offsetting order at market price.
 +
 +Example **Flatten Position Order** message:
 +
 +<code>
 +OrderSubmit {
 +   UserId = "efda0709-af12-4b65-8971-5089edb4aaf0",
 +   AccountId = "448c9ddd-6a50-4852-85ea-aad3b6d60620",
 +   MarketId = "XCME_C ZC (H25)",
 +   Orders = [
 +      {
 +         PriceType = PriceType.Flatten
 +      }
 +   ]
 +}
 +</code>
 +
 +<bootnote>
 +The Flatten Position order automatically determines the correct side (Buy/Sell) and volume based on the current position.  Clip size limits are ignored to ensure the entire position is closed.
 +</bootnote>
 +
  
  
  • developers/websocket/orders.txt
  • Last modified: 2026/01/23 20:15
  • by chad