euniversal / umei-api-specification

UMEI API specifications
Apache License 2.0
3 stars 0 forks source link

Replace "periodFrom" and "periodTo" by "startTime" and "duration" #4

Closed cdmNSIDE closed 2 years ago

narve commented 2 years ago

I don't really see the point of this PR. I understand that you use startTime and duration, but are there any particular reasons for preferring startTime and duration to periodFrom and periodTo? I believe those names are quite clear and unambiguous.

If we were to consider this change, we at least would have to clarify what "duration" means?

cdmNSIDE commented 2 years ago

We would prefer not using a "periodFrom" and a "periodTo" to avoid requiring the need to have an input check to ensure that "periodTo" is after "periodFrom".

Furthermore, introducing a "duration" (in the orders, baselines, ...) is something useful, because it could be easily compared to the rules of the market (ex: market with a 15 minute granularity vs 1 hour granularity).

If we were to consider this change, we at least would have to clarify what "duration" means? There is a description in the API, is it ambiguous ?

narve commented 2 years ago

Well, I don't see any significant difference. We would still have to check that duration is positive (equivalent to periodTo being after periodFrom), and that the startTime/periodTo is allowed (e.g. the order does not start at 13:03), in addition to checking the granularity against the market rules. Some participants (TSOs) can override the market time granularity rules anyway.

Furthermore, in our case we support block orders, each block having a duration. This means that we can post an order for e.g. 2 blocks, of 15 minutes each, in the period between 13:00 and 14:00. In that regard "duration" would be ambigous - there is one "blockDuration" and one "orderDuration".

So, if this is really important to you, it is ok for us. But then I want the field to be "durationInSeconds" at least, because supporting short orders (30s) can be allowed in some markets.

cdmNSIDE commented 2 years ago

After internal discussion we agree to keep the "periodTo" and "periodFrom"

ArnaudDebray commented 2 years ago

last validation was a mistake from me. I wanted to reject following your comment. @cdmNSIDE can you drop the PR ?