
Avantis · Acts onchain
Cancels an open Avantis limit or stop limit order. The Trading router's cancelOpenLimitOrder removes the order from the trader's book and TradingStorage pays its collateral back to the trader in the same block. Avantis keys every book on its trader, the address that sent the order, so an entry is acted on only by its own trader: an entry of the Plug account's book runs in the Plug account's program, and an entry of the wallet's own book is a call the wallet sends itself. Reach for it to withdraw an entry the market has moved away from, or to free the collateral for another trade in the same run.