Examples
Input: (["CREATE ord1 BTC-USD BUY 5", "CREATE ord2 ETH-USD SELL 3", "GET ord1", "COUNT LIVE", "PAUSE ord1", "GET ord1", "COUNT PAUSED", "CANCEL ord2", "COUNT CANCELLED", "RESUME ord1", "GET ord1"],)
Expected Output: ["ord1 LIVE", "2", "ord1 PAUSED", "1", "1", "ord1 LIVE"]
Explanation: Two orders are created as LIVE. ord1 is paused and later resumed. ord2 is cancelled. GET and COUNT return the current states and totals.
Input: (["CREATE a BTC-USD BUY 10", "CREATE a BTC-USD BUY 1", "RESUME a", "PAUSE missing", "PAUSE a", "PAUSE a", "CANCEL a", "CANCEL a", "GET a", "COUNT LIVE"],)
Expected Output: ["ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "a CANCELLED", "0"]
Explanation: This covers duplicate CREATE, invalid RESUME from LIVE, unknown orderId, invalid PAUSE on an already PAUSED order, and invalid CANCEL on an already CANCELLED order.
Input: (["", " ", "COUNT LIVE", "CREATE b BTC-USD HOLD 5", "CREATE c BTC-USD BUY 0", "CREATE d BTC-USD SELL x", "CREATE e BTC-USD SELL 2 extra", "COUNT BROKEN", "GET z"],)
Expected Output: ["0", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR", "ERROR"]
Explanation: Blank lines are ignored. The remaining commands test invalid side, non-positive qty, non-integer qty, malformed CREATE, invalid COUNT state, and GET on an unknown order.
Input: (["CREATE x BTC-USD BUY 1", "CREATE y ETH-USD SELL 2", "CREATE z SOL-USD BUY 3", "PAUSE x", "PAUSE z", "COUNT LIVE", "COUNT PAUSED", "CANCEL x", "COUNT PAUSED", "COUNT CANCELLED", "RESUME z", "COUNT LIVE", "GET x"],)
Expected Output: ["1", "2", "1", "1", "2", "x CANCELLED"]
Explanation: The counts change as x and z move between LIVE, PAUSED, and CANCELLED. The final GET confirms that x remains CANCELLED.
Input: ([],)
Expected Output: []
Explanation: No commands produce no output.