Skip to content

Order Statuses

This section describes the various statuses an order can have, along with their meanings and whether they are final.

Statuses

IDStatusDescriptionIs Final
0NewNew order.false
1FillingOrder is being executed.false
2StableEnergy delegation successful.false
3ExpiredEnd of the delegation period.false
4FinishingEnd of the delegation period.false
5FinishedEnergy has been returned.true
6FailedAn error occurred.true

Usage

Order statuses allow you to track the lifecycle of an order. Below is a description of typical transitions:

  1. New → Filling → Stable: The order has been created and energy is being delegated.
  2. Stable → Expired → Finishing → Finished: The delegation period ends, and the energy is returned successfully.
  3. Failed: The order could not be completed due to an error.

Example Workflow

Transition from New to Finished

  1. The order is created with the New status.
  2. The system processes the order, changing its status to Filling.
  3. Once delegation succeeds, the status changes to Stable.
  4. At the end of the delegation period, the status progresses through Expired and Finishing.
  5. Finally, the order is marked as Finished once the energy is returned.

Handling Failed Orders

If an error occurs during any phase, the order status will be set to Failed. Such orders are considered final and cannot be modified.