frequenz-floss / frequenz-api-electricity-trading

gRPC+protobuf specification and Python bindings for the Frequenz Electricity Trading API
MIT License
0 stars 6 forks source link

Split `OrderState.PENDING` in `UPDATE_PENDING` and `CREATE_PENDING` #57

Open camille-bouvy-frequenz opened 6 months ago

camille-bouvy-frequenz commented 6 months ago

What's needed?

Currently when an order has state PENDING it could be pending for creation or for update. For a naive strategy, knowing what caused the pending state is not needed, but looking into the future it might come in handy for some use cases with more complex trading strategies.

Proposed solution

Split OrderState.PENDING in UPDATE_PENDING and CREATE_PENDING

Use cases

More detailed information about their order status might be required to make informed decisions. For example if an application wants to implement "chain order" (he place a new order only if an update to an existing order is successfully executed), then the different pending states could come in handy. Additionally this could facilitate debugging (if an order is stuck in state pending, it would be nice to know directly if it's creation pending or update pending).

Alternatives and workarounds

No response

Additional context

No response

camille-bouvy-frequenz commented 6 months ago

FYI @matthias-wende-frequenz @thomas-nicolai-frequenz