Orders creation
POST https://isot.okte.sk/api/v1/idm/orders
Request example
POST https://isot.okte.sk/api/v1/idm/orders{
"correlationId": "custom-message-id",
"groupIndication": "rejectAll",
"orders": [
{
"type": "simple",
"direction": "sell",
"indication": "noIndication",
"deliveryStart": "2024-11-18T20:00:00Z",
"deliveryEnd": "2024-11-18T21:00:00Z",
"expiration": "2024-11-18T11:00:00Z",
"quantity": 1.2,
"price": 10.5,
"active": true,
"note": "just my note",
"clientOrderId": "00001"
}
]
}
Request fields description
Field | Description | Format |
OrdersCreateData | ||
correlationId | Client message identifier | String or null |
groupIndication | rejectPartially – if some order is invalid, processing of the remaining valid orders continues, rejectAll – if some order is invalid, processing of all orders is stopped. |
Enum (rejectPartially, rejectAll) |
orders | Orders to create | List of Order object |
Order | ||
type | Order type | Enum (simple, block) |
direction | Direction / side | Enum (buy, sell) |
indication | noIndication – no indication, fok – Fill Or Kill, ioc – Immediate Or Cancel, aon – All Or None (only for block orders). |
Enum (noIndication, fok, ioc, aon) or null |
deliveryStart | Delivery period start | Date Time 8601 UTC |
deliveryEnd | Delivery period end | Date Time 8601 UTC |
expiration | Order expiration time | Date Time 8601 UTC or null |
quantity | Quantity in MW | Float number (one decimal place) |
price | Price in EUR/MWh | Float number (two decimal places) |
active | Create order as active | Boolean (true, false) |
note | Custom client note | String or null |
clientOrderId | Custom client identificator of order | String or null |
Request may return HTTP status codes:
- 201 (Created) - order processing is finished. Order ID in Location response header (in case of single order creation request),
- 202 (Accepted) - order processing is not finished on server side,
- 400 (Bad Request) - request validation problem (see example below),
- 429 (Too Many Requests) - request limit exceeded,
- 500 (Internal Server Error).
Validation problem example
{
"code": "ValidationProblem",
"message": "Validation problems occurred.",
"errors": {
"00001": [
{
"code": "ExpTimeEndRule",
"message": "Order expiration time cannot be later than period trading end.",
"messageArgs": []
}
]
}
}
Field | Description | Format |
code | Validation error code (ValidationProblem) | Enum |
message | General description of the validation issue | String |
errors | Errors for each order in request, indexed by clientOrderId od random string. | Dictionary with key of String and value of error object |
Error | ||
code | Error type | Enum |
message | Detailed description of the problem | String |
messageArgs | Additional arguments for parameterized error messages (empty if not applicable). | Array |
Order creation message example (WebSocket)
WS wss://isot.okte.sk/api/v1/idm/ws?topics=orders{
"type": "order-create",
"payload": {
"correlationId": "custom-message-id",
"groupIndication": "rejectAll",
"orders": [
{
"type": "simple",
"direction": "sell",
"indication": "noIndication",
"deliveryStart": "2024-11-18T20:00:00Z",
"deliveryEnd": "2024-11-18T21:00:00Z",
"expiration": "2024-11-18T11:00:00Z",
"quantity": 1.2,
"price": 10.5,
"active": true,
"note": "just my note",
"clientOrderId": "00001"
}
]
}
}
Request fields description
Field | Description | Format |
type | Message type for order creation | Enum (order-create) |
payload | Message data | OrdersCreateData object (see above) |