NewProject Coding is here — build features and fix bugs in real codebases with an AI assistantSee what's new

Question Description

Design a crypto trading system to manage cryptocurrency orders, supporting operations such as placing, pausing, resuming, canceling, and displaying live orders. Each order includes the following attributes:

  • ID: The current order ID.
  • Currency: The cryptocurrency being traded.
  • Amount: The amount of cryptocurrency in the order.
  • Timestamp: The time the order was placed.
  • Order Type: Either buy or sell.
  • State: One of live, paused, completed, or canceled.
Test Cases
Input
Output
Expected