package lastcall // Market hours. US equities don't trade 24/7, and a stock can gap over a weekend // or overnight while the quote stands still. The updater pushes the real market // status each cycle. While it is closed, new perps and limit fills are held to // closedMaxLeverage (risk.gno), so a gap at the open hits smaller positions. // Closing, stops, liquidations and spot work as usual so no one is trapped. var marketOpen = true // SetMarketOpen is pushed by the off-chain updater (bot) from the live market state. func SetMarketOpen(cur realm, open bool) { assertUpdater(cur) marketOpen = open } // IsMarketOpen reports whether the stock market is open, as last pushed by the // updater. While it is false the leverage cap is closedMaxLeverage. func IsMarketOpen() bool { return marketOpen }