Get pending market opens
Get pending market opens

Avantis · Reads onchain state

Reads how many market orders a trader has placed on an Avantis pair that a keeper has not yet filled or cancelled. TradingStorage's pendingMarketOpenCount rises when openTrade places a market order and falls when a keeper executes or cancels it, so zero means every market open the trader placed on the pair has settled one way or the other. Reach for it to wait until an order placed earlier has settled before acting on the trade it opened.