Orders changes

To receive notifications about changes in orders, the client must connect via WebSocket with the topic orders.

This interface is also used to deliver validation error messages when creating or modifying orders through the WebSocket.


WS  wss://isot.okte.sk/api/v1/idm/ws?topics=orders

Change message example

{
  "type": "order-change",
  "payload": {
    "id": 384848,
    "type": "simple",
    "productType": 15,
    "deliveryDay": "2024-11-20",
    "deliveryStart": "2024-11-20T22:15:00Z",
    "deliveryEnd": "2024-11-20T22:30:00Z",
    "direction": "sell",
    "quantity": 1,
    "price": 1,
    "status": "inactive",
    "note": "just my note",
    "isPending": true,
    "remainingQuantity": 1,
    "createdAt": "2024-11-20T10:16:10",
    "updatedAt": "2024-11-20T10:16:10",
    "createdBy": "tester01",
    "action": "added",
    "correlationId": "test01",
    "clientOrderId": "00003"
  }
}

payload of order-change message is same as order object from API responses, with extra fields:

Field Description Format
action

Indicates the specific event that caused the order change.

Enum (added, removed, changed, activated, deactivated, matched, canceled)
correlationId Client's request message identifier String or null

Error message example

{
  "type": "order-error",
  "payload": {
    "correlationId": "tst3",
    "code": "ValidationProblem",
    "message": "Validation problems occurred.",
    "errors": {
      "00001": [
        {
          "code": "ExpTimeEndRule",
          "message": "Order expiration time cannot be later than period trading end.",
          "messageArgs": []
        }
      ]
    }
  }
}

For more details on order validation errors, refer to Orders creation page.