Skip to content
All library documents

One-Pays-the-Other Orders Set Exit Quantity from Filled Buys

Article ProRealCode

Summary

The document explains One-Pays-the-Other (OPO), an order-list behavior related to OTO and OTOCO. An activating buy order determines the quantity for its pending sell order from the amount actually received when the buy is fully filled, so the pending order does not require a separately specified quantity. Funds received are locked for that order and become available again if the list is canceled before the pending order reaches the matching engine.

It outlines operational constraints: commissions affect the received quantity, exchange lot-size filters can adjust it, and unused locked funds are released. The pending quantity cannot be changed before the activating order fills, and the described direction is limited to a buy followed by a sell. The document also lists REST, WebSocket, and FIX interfaces and the exchange metadata flags required for OPO and OPOCO support. It describes order mechanics rather than a trading strategy or evidence of execution outcomes.

Key ideas

  • The filled activating buy determines the pending sell order’s quantity.
  • Received funds are locked for the pending order and may be released if the order list is canceled before submission.
  • Commissions and lot-size filters can reduce or adjust the usable quantity.
  • The pending quantity cannot be edited before the activating order fully fills.
  • OPO is described for buy-then-sell order lists, with exchange support indicated by metadata flags.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.