{
  "openapi": "3.1.1",
  "info": {
    "title": "XMtrade ISOT - IDM trading",
    "description": "The XMtrade®/ISOT private API enables clients to perform key operations in the intraday market trading system, including Order Management, Orderbook Access, Transfer Capacities, Market Trading Status.\n\n### Authentication\nTo access the intraday market trading API, clients must have:\n- A valid account in XMtrade®/ISOT.\n- A valid agreement for short term market trading.\n- A configured client certificate.\n\nThe API uses a combination of:\n- Basic Authentication: Username and password provided in the Authorization header.\n- Client Certificate: A handshake is initiated by the server to validate the certificate.\n\n### Content Type\nBoth the API and WebSocket only support requests and server responses with Content-Type: application/json. null fields may be omitted.\n\n### Rate Limiting\nThe API enforces rate limiting to ensure fair usage and prevent abuse. When a client exceeds the allowed request limit, the server responds with a 429 Too Many Requests status code.\n\nThe following headers are included in the response to provide additional details:\n- X-RateLimit-Policy: The applied rate-limiting policy (e.g., 50;w=10 for 50 requests per 10 seconds).\n- X-RateLimit-Limit: The maximum number of requests allowed in the current window.\n- X-RateLimit-Remaining: The number of remaining requests within the current window.\n- X-RateLimit-Reset: The time (in seconds) until the request counter resets.\n\nClients exceeding the limit must wait until the reset time before retrying.\n\n### Pagination Headers\nEndpoints that support pagination include the following headers in the response:\n\n- X-Page-Offset: The current offset used for the retrieved data.\n- X-Page-Limit: The maximum number of records returned in the response.\n- X-Page-HasNext: Indicates whether there are more pages available (true or false).\n\nThese headers help clients manage and navigate paginated data efficiently.",
    "contact": {
      "email": "support.is@sfera.sk"
    },
    "version": 1.2
  },
  "externalDocs": {
    "description": "Find out more about ISOT IDM trading API",
    "url": "https://okte.sk/en/api-documentation/intraday-market-trading/introduction/"
  },
  "servers": [
    {
      "url": "https://isot.okte.sk/api/v1/idm"
    },
    {
      "url": "https://sandbox-isot.okte.sk/api/v1/idm"
    },
    {
      "url": "https://test-sandbox-isot.okte.sk/api/v1/idm"
    }
  ],
  "security": [
    {
      "basicAuth": [],
      "clientCertAuth": []
    }
  ],
  "tags": [
    {
      "name": "Orders",
      "description": "Management of Own Orders - Retrieval, Creation, and Operations",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://okte.sk/en/api-documentation/intraday-market-trading/orders-list/"
      }
    },
    {
      "name": "Hub-to-Hub",
      "description": "Retrieval of Available transfer capacities",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://okte.sk/en/api-documentation/intraday-market-trading/hub-to-hub-matrix/"
      }
    },
    {
      "name": "Market status",
      "description": "Market trading status",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://okte.sk/en/api-documentation/intraday-market-trading/market-status/"
      }
    },
    {
      "name": "Trades",
      "description": "Retrieval of Own Trades",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://okte.sk/en/api-documentation/intraday-market-trading/trades/"
      }
    },
    {
      "name": "Evaluations",
      "description": "Retrieval of Trading Evaluations",
      "externalDocs": {
        "description": "Find out more",
        "url": "https://okte.sk/en/api-documentation/intraday-market-trading/evaluation/"
      }
    }
  ],
  "paths": {
    "/orders": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "List of Own Orders",
        "description": "One of time range parameters is required: 'DeliveryFrom' (with/without 'DeliveryTo') or 'CreatedFrom' (with/without 'CreatedTo') or 'UpdatedFrom' (with/without 'UpdatedTo'). \nFor compatibility with public results API, productType, skip and take parameters are supported as well.\nExample: https://isot.okte.sk/api/v1/idm/orders?status=matched&createdFrom=2024-11-13T16:58:00Z&expandTrades=true",
        "operationId": "ordersList",
        "parameters": [
          {
            "name": "productType",
            "in": "query",
            "description": "Type of traded product ('product' is also supported)",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                60,
                15
              ]
            }
          },
          {
            "name": "deliveryFrom",
            "in": "query",
            "description": "Start time of delivery range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "deliveryTo",
            "in": "query",
            "description": "End time of delivery range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdFrom",
            "in": "query",
            "description": "Start time of createdAt range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "createdTo",
            "in": "query",
            "description": "End time of createdAt range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updatedFrom",
            "in": "query",
            "description": "Start time of updatedAt range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "updatedTo",
            "in": "query",
            "description": "End time of updatedAt range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "A comma-delimited list of statuses of own orders. Default is \"all\"",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "active",
                  "inactive",
                  "canceled",
                  "partiallyMatched",
                  "matched",
                  "expired",
                  "expiredInactive"
                ]
              }
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "description": "A comma-delimited list of group IDs for linked and rejectAll group",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          {
            "name": "expandTrades",
            "in": "query",
            "description": "Specifies whether trades information should be included in response. Default false",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Specifies the starting point for retrieving records. Used for pagination. Default 0",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Defines the maximum number of records to retrieve in a single response. Default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of own orders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Order"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "code": "RangeFilterRequired",
                  "message": "Parameters 'DeliveryFrom' (with/without 'DeliveryTo') or 'CreatedFrom' (with/without 'CreatedTo')  or 'UpdatedFrom' (with/without 'UpdatedTo') are required."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      },
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Orders creation",
        "description": "Orders creation",
        "requestBody": {
          "description": "Create a new own order",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Order created",
            "headers": {
              "Location": {
                "description": "Url of new order, if single order creation was requested",
                "schema": {
                  "type": "string",
                  "example": "https://isot.okte.sk/api/v1/idm/orders/968968"
                }
              },
              "Link": {
                "description": "Urls of new orders",
                "schema": {
                  "type": "string",
                  "example": "<http://dev-isot.okte.sk/api/v1/idm/orders/968968>; rel=\"item"
                }
              }
            }
          },
          "202": {
            "description": "Request processing is not finished on server side."
          },
          "400": {
            "description": "Validation problem",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/orders/{id}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Detail of Own Order",
        "description": "Example: https://isot.okte.sk/api/v1/idm/orders/968968",
        "operationId": "orderDetail",
        "parameters": [
          {
            "name": "id",
            "description": "ID of own order",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "example": 968968
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Own Order",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "code": "OrderNotFound",
                  "message": "Order with ID '1968968' does not exist."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "basicAuth": [],
            "clientCertAuth": []
          }
        ]
      },
      "patch": {
        "tags": ["Orders"],
        "summary": "Order modification",
        "description": "Order modification request. All changeable properties must be included in the request, even those the client does not intend to change.",
        "requestBody": {
          "description": "Modify an own order",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderModifyRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "orderModify",
        "parameters": [
          {
            "name": "id",
            "description": "ID of own order",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "example": 968968
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Operation successful"
          },
          "202": {
            "description": "Request processing is not finished on server side."
          },
          "400": {
            "description": "Validation problem",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "404": {
            "description": "Order not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "code": "OrderNotFound",
                  "message": "Order with ID '1968968' does not exist."
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        },
        "security": [
          {
            "basicAuth": [],
            "clientCertAuth": []
          }
        ]
      }
    },
    "/orders/{id}/{operation}": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Order status modification",
        "description": "Order status modification - activation/deactivation/cancellation\n\nExample: https://isot.okte.sk/api/v1/idm/orders/968968/deactivate",
        "operationId": "orderOperation",
        "parameters": [
          {
            "name": "id",
            "description": "ID of own order",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64",
              "example": 968968
            }
          },
          {
            "name": "operation",
            "description": "Action",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "activate",
                "deactivate",
                "cancel"
              ],
              "example": "activate"
            }
          }
        ],
        "requestBody": {
          "description": "Modify order",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OrderOperationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Request processing is not finished on server side."
          },
          "204": {
            "description": "Operation successful"
          },
          "400": {
            "description": "Validation problem",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/hub-to-hub": {
      "get": {
        "tags": [
          "Hub-to-Hub"
        ],
        "summary": "List of Available Transfer Capacities",
        "description": "Example: https://isot.okte.sk/api/v1/idm/hub-to-hub?countryCodes=CZ,HU&deliveryFrom=2024-11-18T13:00:00Z",
        "operationId": "hubToHubList",
        "parameters": [
          {
            "name": "deliveryFrom",
            "in": "query",
            "description": "Start time of delivery range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "deliveryTo",
            "in": "query",
            "description": "End time of delivery range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "countryCodes",
            "in": "query",
            "description": "Two-letter country codes separated by commas.",
            "required": false,
            "schema": {
              "type": "string",
              "example": "SK,HU"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of available transfer capacities",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ATC"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "code": "RangeFilterInvalid",
                  "message": "DeliveryFrom can not be in the past"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/market-status": {
      "get": {
        "tags": [
          "Market status"
        ],
        "summary": "Current market trading status",
        "operationId": "marketStatus",
        "responses": {
          "200": {
            "description": "Market status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketStatus"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/trades": {
      "get": {
        "tags": [
          "Trades"
        ],
        "summary": "List of Own Trades",
        "description": "One of time range parameters is required: 'DeliveryFrom' (with/without 'DeliveryTo') or 'TimeFrom' (with/without 'TimeTo') or 'OrderId' or 'Id'.\nExample: https://isot.okte.sk/api/v1/idm/trades?timeFrom=2024-11-13T16:58:00Z&timeTo=2024-11-13T17:58:00Z",
        "operationId": "tradesList",
        "parameters": [
          {
            "name": "productType",
            "in": "query",
            "description": "Type of traded product",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                60,
                15
              ]
            }
          },
          {
            "name": "deliveryFrom",
            "in": "query",
            "description": "Start time of delivery range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "deliveryTo",
            "in": "query",
            "description": "End time of delivery range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "timeFrom",
            "in": "query",
            "description": "Start time of trade time range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "timeTo",
            "in": "query",
            "description": "End time of trade time range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "id",
            "in": "query",
            "description": "A comma-delimited list of trade IDs",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          {
            "name": "orderId",
            "in": "query",
            "description": "A comma-delimited list of order IDs",
            "required": false,
            "style": "form",
            "explode": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Specifies the starting point for retrieving records. Used for pagination. Default 0",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Defines the maximum number of records to retrieve in a single response. Default 50",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of own trades",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TradeDetail"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "example": {
                  "code": "RangeFilterRequired",
                  "message": "Parameters 'DeliveryFrom' (with/without 'DeliveryTo') or 'TimeFrom' (with/without 'TimeTo') or 'OrderId' or 'Id' are required."
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/evaluations/daily-detail": {
      "get": {
        "tags": [
          "Evaluations"
        ],
        "summary": "Daily Detail Evaluation",
        "description": "Retrieves detailed evaluation data for each delivery period.\nExample: https://isot.okte.sk/api/v1/idm/evaluations/daily-detail?deliveryFrom=2025-11-24T02:00:00Z&deliveryTo=2025-11-24T03:00:00Z&productType=60",
        "operationId": "evaluationDailyDetail",
        "parameters": [
          {
            "name": "deliveryFrom",
            "in": "query",
            "description": "Start time of delivery range (UTC)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "deliveryTo",
            "in": "query",
            "description": "End time of delivery range (UTC)",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "productType",
            "in": "query",
            "description": "Type of traded product",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                60,
                15
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Daily detail evaluation data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvaluationDailyDetail"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/evaluations/daily-summary": {
      "get": {
        "tags": [
          "Evaluations"
        ],
        "summary": "Daily Summary Evaluation",
        "description": "Retrieves summary evaluation data aggregated by delivery day.\nExample: https://isot.okte.sk/api/v1/idm/evaluations/daily-summary?deliveryDayFrom=2025-11-24&deliveryDayTo=2025-11-24",
        "operationId": "evaluationDailySummary",
        "parameters": [
          {
            "name": "deliveryDayFrom",
            "in": "query",
            "description": "Start date of delivery day range",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "deliveryDayTo",
            "in": "query",
            "description": "End date of delivery day range",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Daily summary evaluation data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvaluationDailySummary"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    },
    "/evaluations/monthly-summary": {
      "get": {
        "tags": [
          "Evaluations"
        ],
        "summary": "Monthly Summary Evaluation",
        "description": "Retrieves summary evaluation data aggregated by month.\nExample: https://isot.okte.sk/api/v1/idm/evaluations/monthly-summary?deliveryDayFrom=2025-11-01&deliveryDayTo=2025-11-30",
        "operationId": "evaluationMonthlySummary",
        "parameters": [
          {
            "name": "deliveryDayFrom",
            "in": "query",
            "description": "Start date of delivery day range",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date"
            }
          },
          {
            "name": "deliveryDayTo",
            "in": "query",
            "description": "End date of delivery day range",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monthly summary evaluation data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/EvaluationMonthlySummary"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid filter",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "$ref": "#/components/responses/Forbidden"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Order": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBase"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "description": "Identifier",
                "type": "integer",
                "format": "int64",
                "example": 968968
              },
              "groupId": {
                "description": "Group identifier for linked and rejectAll group",
                "type": "integer",
                "format": "int64",
                "example": null
              },
              "productType": {
                "description": "Product type",
                "type": "string",
                "enum": [
                  60,
                  15
                ],
                "required": true,
                "example": 60
              },
              "deliveryDay": {
                "description": "Date of the delivery (Date ISO 8601)",
                "type": "string",
                "format": "date-time",
                "example": "2024-12-18T00:00:00.000Z"
              },
              "status": {
                "description": "Current order Status",
                "type": "string",
                "enum": [
                  "active",
                  "inactive",
                  "canceled",
                  "partiallyMatched",
                  "matched",
                  "expired",
                  "expiredInactive"
                ],
                "example": "partiallyMatched"
              },
              "isPending": {
                "description": "Indicator of whether the order is still being processed by the system (e.g., waiting for activation).",
                "type": "boolean",
                "example": true
              },
              "realizedQuantity": {
                "description": "Realized quantity in MW (one decimal)",
                "type": "number",
                "format": "float",
                "example": 10.1
              },
              "realizedPriceWeighted": {
                "description": "Realized price in EUR/MWh (two decimals)",
                "type": "number",
                "format": "float",
                "example": 35.55
              },
              "remainingQuantity": {
                "description": "Remaining quantity in MW (one decimal)",
                "type": "number",
                "format": "float",
                "example": 5.1
              },
              "createdAt": {
                "description": "The time of the order's creation (UTC)",
                "type": "string",
                "format": "date-time",
                "example": "2024-12-18T10:05:03.000Z"
              },
              "updatedAt": {
                "description": "The time of the order's latest update. (UTC)",
                "type": "string",
                "format": "date-time",
                "example": "2024-12-18T10:05:03.000Z"
              },
              "createdBy": {
                "description": "The name of the user who created the order.",
                "type": "string",
                "example": "Ján Prúdový"
              },
              "trades": {
                "description": "List of trades available at the moment",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/Trade"
                }
              }
            }
          }
        ]
      },
      "Trade": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Identifier",
            "type": "integer",
            "format": "int64",
            "example": 1236545
          },
          "time": {
            "description": "The time of the trade (UTC)",
            "type": "string",
            "format": "date-time",
            "required": true,
            "example": "2024-12-18T11:30:10.000Z"
          },
          "quantity": {
            "description": "Quantity in MW (one decimal)",
            "type": "number",
            "format": "float",
            "required": true,
            "example": 10.1
          },
          "price": {
            "description": "Price in EUR/MWh (two decimals)",
            "type": "number",
            "format": "float",
            "required": true,
            "example": 35.55
          }
        }
      },
      "OrderCreateRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderOperationRequest"
          },
          {
            "type": "object",
            "properties": {
              "groupIndication": {
                "description": "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; linked - execute all orders or none, all orders must have indication FOK.",
                "type": "string",
                "required": true,
                "enum": [
                  "rejectAll",
                  "rejectPartially",
                  "linked"
                ],
                "example": "rejectAll"
              },
              "orders": {
                "description": "List of orders to create",
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/OrderCreateRequestItem"
                }
              }
            }
          }
        ]
      },
      "OrderCreateRequestItem": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderBase"
          },
          {
            "type": "object",
            "properties": {
              "indication": {
                "description": "noIndication – no indication; fok – Fill Or Kill; ioc – Immediate Or Cancel; aon – All Or None (only for block orders).",
                "type": "string",
                "enum": [
                  "noIndication",
                  "fok",
                  "ioc",
                  "aon"
                ],
                "required": false,
                "example": "ioc"
              },
              "active": {
                "description": "Create order as active",
                "type": "boolean",
                "example": true
              }
            }
          }
        ]
      },
      "OrderModifyRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderOperationRequest"
          },
          {
            "$ref": "#/components/schemas/OrderEditableFields"
          }
        ]
      },
      "OrderBase": {
        "allOf": [
          {
            "$ref": "#/components/schemas/OrderEditableFields"
          },
          {
            "type": "object",
            "properties": {
              "type": {
                "description": "Order type",
                "type": "string",
                "enum": ["simple", "block", "iceberg"],
                "example": "simple"
              },
              "deliveryStart": {
                "description": "Delivery period start (UTC)",
                "type": "string",
                "format": "date-time",
                "example": "2024-12-18T14:00:00Z"
              },
              "deliveryEnd": {
                "description": "Delivery period end (UTC)",
                "type": "string",
                "format": "date-time",
                "example": "2024-12-18T15:00:00Z"
              },
              "direction": {
                "description": "Direction / side",
                "type": "string",
                "enum": ["buy", "sell"],
                "example": "buy"
              },
              "clientOrderId": {
                "description": "Custom client identification of order",
                "type": "string",
                "example": "B-0001"
              }
            },
            "required": ["type", "deliveryStart", "deliveryEnd", "direction"]
          }
        ]
      },
      "OrderEditableFields": {
        "type": "object",
        "properties": {
          "quantity": {
            "description": "Quantity in MW (one decimal)",
            "type": "number",
            "format": "float",
            "example": 15.2
          },
          "price": {
            "description": "Price in EUR/MWh (two decimals)",
            "type": "number",
            "format": "float",
            "example": 35.55
          },
          "peakQuantity": {
            "description": "Peak quantity of an iceberg order in MW (one decimal)",
            "type": "number",
            "format": "float",
            "example": 5.5
          },
          "peakPriceDelta": {
            "description": "Price shift for each new part of the order related to an iceberg order in EUR/MWh (two decimals)",
            "type": "number",
            "format": "float",
            "example": 0.2
          },
          "expiration": {
            "description": "Time of client defined order expiration (UTC or null)",
            "type": "string",
            "format": "date-time",
            "example": "2024-12-18T11:12:13Z"
          },
          "note": {
            "description": "Custom client note",
            "type": "string",
            "example": "Just my note"
          }
        },
        "required": ["quantity", "price"]
      },
      "OrderOperationRequest": {
        "type": "object",
        "properties": {
          "correlationId": {
            "description": "Client message identifier",
            "type": "string",
            "example": "request-20241218001"
          }
        }
      },
      "ATC": {
        "type": "object",
        "properties": {
          "eic": {
            "description": "EIC of the Market Area",
            "type": "string",
            "example": "10YCZ-CEPS-----N"
          },
          "areaName": {
            "description": "Name of the Market Area",
            "type": "string",
            "example": "CEPS"
          },
          "countryCode": {
            "description": "Two-letter country code",
            "type": "string",
            "example": "CZ"
          },
          "deliveryDay": {
            "description": "Date of the delivery (Date ISO 8601)",
            "type": "string",
            "format": "date-time",
            "example": "2024-12-18T00:00:00.000Z"
          },
          "deliveryStart": {
            "description": "Delivery period start (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2024-12-18T14:00:00.000Z"
          },
          "deliveryEnd": {
            "description": "Delivery period end (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2024-12-18T15:00:00.000Z"
          },
          "availableCapacityIn": {
            "description": "Available import capacities in MW",
            "type": "number",
            "format": "float",
            "required": true,
            "example": 3066
          },
          "availableCapacityOut": {
            "description": "Available export capacities in MW",
            "type": "number",
            "format": "float",
            "required": true,
            "example": 2798
          }
        }
      },
      "MarketStatus": {
        "type": "object",
        "properties": {
          "systemTime": {
            "description": "System time (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2024-12-18T12:13:08.000Z"
          },
          "tradeDay": {
            "description": "Current trade/delivery day",
            "type": "string",
            "format": "date-time",
            "example": "2024-12-18T00:00:00.000Z"
          },
          "tradingStatus": {
            "description": "Market trading status",
            "type": "string",
            "enum": [
              "xbidOk",
              "xbidNok",
              "xbidHalt",
              "xbidBatchMatching",
              "localOn",
              "localOff"
            ],
            "example": "xbidOk"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "description": "Error code indicating the type of error",
            "type": "string",
            "required": true,
            "example": "ValidationProblem"
          },
          "message": {
            "description": "Optional detailed error message",
            "type": "string",
            "example": "Validation problems occurred"
          },
          "errors": {
            "type": "object",
            "additionalProperties": {
              "type": "array",
              "items": {
                "$ref": "#/components/schemas/ErrorDetail"
              }
            },
            "description": "Dictionary of errors categorized by customOrderId or order ID or random number"
          }
        }
      },
      "ErrorDetail": {
        "type": "object",
        "properties": {
          "code": {
            "description": "Specific error code",
            "type": "string",
            "required": true,
            "example": "ExpTimeEndRule"
          },
          "message": {
            "description": "Optional message providing details about the error.",
            "type": "string",
            "example": "Order expiration time cannot be later than period trading end."
          },
          "messageArgs": {
            "description": "Arguments for formatting the detailed error message.",
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "TradeDetail": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Trade identifier",
            "type": "integer",
            "format": "int64",
            "example": 112233
          },
          "orderId": {
            "description": "Order identifier",
            "type": "integer",
            "format": "int64",
            "example": 123456
          },
          "productType": {
            "description": "Product type",
            "type": "integer",
            "enum": [
              60,
              15
            ],
            "example": 60
          },
          "deliveryDay": {
            "description": "Date of the delivery (Date ISO 8601)",
            "type": "string",
            "format": "date",
            "example": "2024-11-14"
          },
          "deliveryStart": {
            "description": "Delivery period start (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2024-11-14T14:00:00Z"
          },
          "deliveryEnd": {
            "description": "Delivery period end (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2024-11-14T15:00:00Z"
          },
          "direction": {
            "description": "Direction / side",
            "type": "string",
            "enum": ["buy", "sell"],
            "example": "buy"
          },
          "time": {
            "description": "The time of the trade (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2024-11-13T17:58:10Z"
          },
          "quantity": {
            "description": "Quantity in MW (one decimal)",
            "type": "number",
            "format": "float",
            "example": 1.3
          },
          "price": {
            "description": "Price in EUR/MWh (two decimals)",
            "type": "number",
            "format": "float",
            "example": 0.82
          }
        }
      },
      "EvaluationDailyDetail": {
        "type": "object",
        "properties": {
          "deliveryDay": {
            "description": "Date of the delivery (Date ISO 8601)",
            "type": "string",
            "format": "date",
            "example": "2025-11-24"
          },
          "deliveryStart": {
            "description": "Delivery period start (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2025-11-24T02:00:00Z"
          },
          "deliveryEnd": {
            "description": "Delivery period end (UTC)",
            "type": "string",
            "format": "date-time",
            "example": "2025-11-24T03:00:00Z"
          },
          "productType": {
            "description": "Type of traded product",
            "type": "integer",
            "enum": [
              60,
              15
            ],
            "example": 60
          },
          "purchaseNegativePayment": {
            "description": "Total financial payments for purchases at negative prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "purchaseNegativeVolume": {
            "description": "Executed purchase volume at negative prices (MW)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "purchasePositivePayment": {
            "description": "Total financial payments for executed purchases at positive prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 54.2
          },
          "purchasePositiveVolume": {
            "description": "Executed purchase volume at positive prices (MW)",
            "type": "number",
            "format": "float",
            "example": 3.5
          },
          "saleNegativePayment": {
            "description": "Total financial payments for sales at negative prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "saleNegativeVolume": {
            "description": "Executed sale volume at negative prices (MW)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "salePositivePayment": {
            "description": "Total financial payments for executed sales at positive prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 13.1
          },
          "salePositiveVolume": {
            "description": "Executed sale volume at positive prices (MW)",
            "type": "number",
            "format": "float",
            "example": 1.2
          }
        }
      },
      "EvaluationDailySummary": {
        "type": "object",
        "properties": {
          "deliveryDay": {
            "description": "Date of the delivery (Date ISO 8601)",
            "type": "string",
            "format": "date",
            "example": "2025-11-24"
          },
          "purchaseNegativePayment": {
            "description": "Total financial payments for purchases at negative prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "purchaseNegativeVolume": {
            "description": "Executed purchase volume at negative prices (MW)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "purchasePositivePayment": {
            "description": "Total financial payments for executed purchases at positive prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 54.2
          },
          "purchasePositiveVolume": {
            "description": "Executed purchase volume at positive prices (MW)",
            "type": "number",
            "format": "float",
            "example": 3.5
          },
          "saleNegativePayment": {
            "description": "Total financial payments for sales at negative prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "saleNegativeVolume": {
            "description": "Executed sale volume at negative prices (MW)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "salePositivePayment": {
            "description": "Total financial payments for executed sales at positive prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 13.1
          },
          "salePositiveVolume": {
            "description": "Executed sale volume at positive prices (MW)",
            "type": "number",
            "format": "float",
            "example": 1.2
          }
        }
      },
      "EvaluationMonthlySummary": {
        "type": "object",
        "properties": {
          "deliveryDayStart": {
            "description": "Start of the period for which the results are aggregated (Date ISO 8601)",
            "type": "string",
            "format": "date",
            "example": "2025-11-01"
          },
          "deliveryDayEnd": {
            "description": "End of the period for which the results are aggregated (Date ISO 8601)",
            "type": "string",
            "format": "date",
            "example": "2025-11-30"
          },
          "feePayment": {
            "description": "Total trading-related fees for the given period (EUR)",
            "type": "number",
            "format": "float",
            "example": 14.2
          },
          "purchaseNegativePayment": {
            "description": "Total financial payments for purchases at negative prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "purchaseNegativeVolume": {
            "description": "Executed purchase volume at negative prices (MW)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "purchasePositivePayment": {
            "description": "Total financial payments for executed purchases at positive prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 54.2
          },
          "purchasePositiveVolume": {
            "description": "Executed purchase volume at positive prices (MW)",
            "type": "number",
            "format": "float",
            "example": 3.5
          },
          "saleNegativePayment": {
            "description": "Total financial payments for sales at negative prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "saleNegativeVolume": {
            "description": "Executed sale volume at negative prices (MW)",
            "type": "number",
            "format": "float",
            "example": 0
          },
          "salePositivePayment": {
            "description": "Total financial payments for executed sales at positive prices (EUR)",
            "type": "number",
            "format": "float",
            "example": 13.1
          },
          "salePositiveVolume": {
            "description": "Executed sale volume at positive prices (MW)",
            "type": "number",
            "format": "float",
            "example": 1.2
          }
        }
      }
    },
    "responses": {
      "Unauthorized": {
        "description": "Invalid authentication."
      },
      "Forbidden": {
        "description": "Invalid short-term market agreement."
      },
      "InternalServerError": {
        "description": "Internal Server Error"
      },
      "TooManyRequests": {
        "description": "Rate limit exceeded.",
        "headers": {
          "X-RateLimit-Remaining": {
            "$ref": "#/components/headers/X-RateLimit-Remaining"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          },
          "X-RateLimit-Limit": {
            "$ref": "#/components/headers/X-RateLimit-Limit"
          },
          "X-RateLimit-Policy": {
            "$ref": "#/components/headers/X-RateLimit-Policy"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "code": "RateLimitExceeded",
              "message": "Rate limit exceeded. Try again later."
            }
          }
        }
      }
    },
    "headers": {
      "X-RateLimit-Remaining": {
        "description": "The number of remaining requests within the current window",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "X-RateLimit-Reset": {
        "description": "The time (in seconds) until the request counter resets",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "X-RateLimit-Limit": {
        "description": "The maximum number of requests allowed in the current window",
        "schema": {
          "type": "integer",
          "format": "int32"
        }
      },
      "X-RateLimit-Policy": {
        "description": "The applied rate-limiting policy (e.g., 50;w=10 for 50 requests per 10 seconds).",
        "schema": {
          "type": "string",
          "example": "50;w=10"
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      },
      "clientCertAuth": {
        "type": "mutualTLS"
      }
    }
  }
}