openapi: 3.1.0
info:
  title: Reporting
  version: v4
  description: ''
servers:
  - url: https://acc-trading.etpa.nl
tags:
  - name: Reporting Trades
    description: Endpoints for querying trade records.
  - name: Reporting Orders
    description: Endpoints for querying order records.
paths:
  /public-api/4.0/electricity/reporting/{product}/trades:
    get:
      tags:
        - Reporting Trades
      summary: List trades
      description: >
        Returns a Spring Page JSON with trade records under the 'content' field.


        How to use: at least one filter must be supplied. Provide a date window
        (dateFrom/dateTo in epoch-millis) and/or an orderId. Choose which
        timestamp the window applies to with dateFilter: TRANSACTION_DATE (the
        default, when the trade was executed) or DELIVERY_DATE (the start of the
        delivery period). dateFilter also selects the field the results are
        ordered by, so changing it changes the paging order. When orderId is
        supplied, the trades belonging to that order are returned; if a date
        window is also supplied the result is additionally constrained to that
        window. Filter additionally with productFilter and optional
        participantId. Paginate with page/size. Requests exceeding the
        configured maximum date range are rejected.
      operationId: getTrades
      parameters:
        - name: product
          in: path
          description: >
            Product scope. "XBID" covers XBID and Intraday; "EXPOST", "GOPACS"
            and "INTRADAY" each cover only themselves; ALL covers every product.
          required: true
          schema:
            type: string
            enum:
              - XBID
              - REGULAR
              - EXPOST
              - GOPACS
              - INTRADAY
              - ALL
        - name: participantId
          in: query
          description: Restricts the result to a single participant.
          required: false
          schema:
            type: string
        - name: dateFilter
          in: query
          description: >-
            Selects which timestamp the dateFrom/dateTo window applies to, and
            which field the results are ordered by. TRANSACTION_DATE is when the
            trade was executed and DELIVERY_DATE the start of its delivery
            period. Note: this is only available in ACC at the moment; it is not
            yet in production.
          required: false
          schema:
            type: string
            default: TRANSACTION_DATE
            enum:
              - TRANSACTION_DATE
              - DELIVERY_DATE
        - name: dateFrom
          in: query
          description: >-
            Start of the window, inclusive, as epoch milliseconds. Applies to
            the field named by dateFilter. May not be more than two years before
            the start of the current day.
          required: false
          schema:
            type: integer
            format: int64
        - name: dateTo
          in: query
          description: >-
            End of the window, inclusive, as epoch milliseconds. Applies to the
            field named by dateFilter. The window may not exceed the maximum
            range configured for the service. Certain values (I.e.
            ORDER_CREATION_DATE/TRANSACTION_DATE) may not be in the future
          required: false
          schema:
            type: integer
            format: int64
        - name: orderId
          in: query
          description: >-
            The identifier of an order. Returns all the trades which resulted
            from the supplied order. Supply either this or the dateFrom/dateTo
            window; supplying both additionally constrains the order's trades to
            that window.
          required: false
          schema:
            type: string
        - name: sortDirection
          in: query
          description: >-
            Direction the results are ordered in. The field ordered on is the
            one named by dateFilter.
          required: false
          schema:
            type: string
            default: DESC
            enum:
              - ASC
              - DESC
        - name: page
          in: query
          description: Zero-based page index (0..N)
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: size
          in: query
          description: The size of the page to be returned
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
        - name: sort
          in: query
          description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          required: false
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: >-
            Success. Paginated list of trades. Each element of 'content' is
            either an Intraday/Ex-post trade (RegularTradeDto), a Gopacs trade
            (GopacsTradeDto) or an XBID trade (XbidTradeDto).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TradePageResponse'
        '400':
          description: >-
            Validation error: invalid dates, date range, product filter, or no
            filter (date window and/or orderId) supplied.
          content:
            application/json: {}
        '500':
          description: Server error
          content:
            application/json: {}
  /public-api/4.0/electricity/reporting/{product}/trades/{tradeId}:
    get:
      tags:
        - Reporting Trades
      summary: Get trade by ID
      description: >
        Returns a single trade record as JSON.


        How to use: provide the product type and a trade id of the trade you
        want to return.
      operationId: getTradeById
      parameters:
        - name: product
          in: path
          description: >
            Product scope. "XBID" covers XBID and Intraday; "EXPOST", "GOPACS"
            and "INTRADAY" each cover only themselves; ALL covers every product.
          required: true
          schema:
            type: string
            enum:
              - XBID
              - REGULAR
              - EXPOST
              - GOPACS
              - INTRADAY
              - ALL
        - name: tradeId
          in: path
          description: Identifier of the trade to return.
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: >-
            Success. JSON trade record: a regular trade (RegularTradeDto, for
            Intraday/Ex-post), a Gopacs trade (GopacsTradeDto) or an XBID trade
            (XbidTradeDto).
          content:
            application/json:
              schema:
                type: string
                oneOf:
                  - $ref: '#/components/schemas/RegularTradeDto'
                  - $ref: '#/components/schemas/GopacsTradeDto'
                  - $ref: '#/components/schemas/XbidTradeDto'
        '400':
          description: 'Validation error: tradeId must not be blank.'
          content:
            application/json: {}
        '404':
          description: Trade not found.
          content:
            application/json: {}
        '500':
          description: Server error
          content:
            application/json: {}
  /public-api/4.0/electricity/reporting/{product}/orders:
    get:
      tags:
        - Reporting Orders
      summary: List orders
      description: >
        Returns a Spring Page JSON with order records under the 'content' field.


        How to use: provide a time window using epoch-millis for
        dateFrom/dateTo. Choose which date field to filter on via dateFilter.
        Limit the product scope with productFilter. Optionally filter by
        participantId. Paginate with page (0-based) and size. The allowed
        maximum date range is configured by the service and validated on
        request.
      operationId: getOrders
      parameters:
        - name: product
          in: path
          description: >
            Product scope. "XBID" covers XBID and Intraday; "EXPOST", "GOPACS"
            and "INTRADAY" each cover only themselves; ALL covers every product.
          required: true
          schema:
            type: string
            enum:
              - XBID
              - REGULAR
              - EXPOST
              - GOPACS
              - INTRADAY
              - ALL
        - name: participantId
          in: query
          description: Restricts the result to a single participant.
          required: false
          schema:
            type: string
        - name: dateFilter
          in: query
          description: >-
            Selects which timestamp the dateFrom/dateTo window applies to, and
            which field the results are ordered by. ORDER_CREATION_DATE is when
            the order was created, TRANSACTION_DATE when it was executed
            (traded), and DELIVERY_DATE the start of its delivery period. Note:
            this is only available in ACC at the moment; it is not yet in
            production.
          required: false
          schema:
            type: string
            default: ORDER_CREATION_DATE
            enum:
              - ORDER_CREATION_DATE
              - TRANSACTION_DATE
              - DELIVERY_DATE
        - name: dateFrom
          in: query
          description: >-
            Start of the window, inclusive, as epoch milliseconds. Applies to
            the field named by dateFilter. May not be more than two years before
            the start of the current day.
          required: true
          schema:
            type: integer
            format: int64
        - name: dateTo
          in: query
          description: >-
            End of the window, inclusive, as epoch milliseconds. Applies to the
            field named by dateFilter. The window may not exceed the maximum
            range configured for the service. Certain values (I.e.
            ORDER_CREATION_DATE/TRANSACTION_DATE) may not be in the future
          required: true
          schema:
            type: integer
            format: int64
        - name: sortDirection
          in: query
          description: >-
            Direction the results are ordered in. The field ordered on is the
            one named by dateFilter.
          required: false
          schema:
            type: string
            default: DESC
            enum:
              - ASC
              - DESC
        - name: page
          in: query
          description: Zero-based page index (0..N)
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: size
          in: query
          description: The size of the page to be returned
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
        - name: sort
          in: query
          description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          required: false
          schema:
            type: array
            items:
              type: string
      responses:
        '200':
          description: >-
            Success. Paginated list of orders. Each element of 'content' is
            either an Intraday/Ex-post order (RegularOrderDto), a Gopacs order
            (GopacsOrderDto) or an XBID order (XbidOrderDto).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrderPageResponse'
        '400':
          description: 'Validation error: invalid dates, date range, or product filter.'
          content:
            application/json: {}
        '500':
          description: Server error
          content:
            application/json: {}
  /public-api/4.0/electricity/reporting/{product}/orders/{orderId}:
    get:
      tags:
        - Reporting Orders
      summary: Get order by ID
      description: >
        Returns a JSON with order records.


        How to use: provide the product type and an order id of the order you
        want to find. Use the product type ALL to get the order regardless of
        the order type.
      operationId: getOrderById
      parameters:
        - name: product
          in: path
          description: >
            Product scope. "XBID" covers XBID and Intraday; "EXPOST", "GOPACS"
            and "INTRADAY" each cover only themselves; ALL covers every product.
          required: true
          schema:
            type: string
            enum:
              - XBID
              - REGULAR
              - EXPOST
              - GOPACS
              - INTRADAY
              - ALL
        - name: orderId
          in: path
          description: Identifier of the order to return.
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          description: >-
            Success. JSON array of the order's records; each element is either
            an Intraday/Ex-post order (RegularOrderDto), a Gopacs order
            (GopacsOrderDto) or an XBID order (XbidOrderDto).
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  oneOf:
                    - $ref: '#/components/schemas/RegularOrderDto'
                    - $ref: '#/components/schemas/GopacsOrderDto'
                    - $ref: '#/components/schemas/XbidOrderDto'
        '400':
          description: 'Validation error: invalid product filter or orderId.'
          content:
            application/json: {}
        '404':
          description: Order not found.
          content:
            application/json: {}
        '500':
          description: Server error
          content:
            application/json: {}
  /public-api/4.0/electricity/reporting/brp-participants:
    get:
      tags:
        - Reporting Orders
      summary: List the BRP participants you may see
      description: >-
        Note: For BRPs (PV-partijen) only.


        Returns your identifier and name as a list (System admins may see all
        BRP participants).
      operationId: getBrpParticipants
      responses:
        '200':
          description: Success. Array of participants.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ParticipantResponse'
        '403':
          description: The caller is not a BRP participant
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ParticipantResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /public-api/4.0/electricity/reporting/brp-participants/{brpParticipantId}:
    get:
      tags:
        - Reporting Orders
      summary: Get a BRP participant by id
      description: |-
        Note: For BRPs (PV-partijen) only.

        Returns the id and name of one BRP participant.

        BRP participants may provide their own id.
      operationId: getSingleBrpParticipant
      parameters:
        - name: brpParticipantId
          in: path
          description: >-
            Identifier of the BRP participant to return. Must be one your
            session names; any other identifier returns 404, whether or not it
            exists.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: >-
            Success. Array containing a single entry with the requested BRP
            participant.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ParticipantResponse'
        '403':
          description: The caller is not a BRP participant
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ParticipantResponse'
        '404':
          description: >-
            No BRP participant with that id is available to the caller. May
            indicate either missing data or missing permissions
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ParticipantResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
  /public-api/4.0/electricity/reporting/brp-participant-trades:
    get:
      tags:
        - Reporting Orders
      summary: List the trades of the participants registered to your BRP
      description: >-
        Note: For BRPs (PV-partijen) only.


        Returns a Spring Page JSON with trade records under the 'content' field,
        filtered and ordered by the timestamp you select with dateFilter.


        The BRP Participant is automatically derived from your session.
        Providing one is optional — if you do, it must be your own BRP
        identifier. Details of any counterparty registered to another BRP are
        blanked.


        How to use: provide a time window using epoch-millis for
        dateFrom/dateTo. Choose which timestamp the window applies to with
        dateFilter: TRANSACTION_DATE (the default, when the trade was executed)
        or DELIVERY_DATE (the start of the delivery period); the same field
        determines the ordering. Paginate with page (0-based) and size. Set the
        ordering direction with sortDirection, which defaults to ASC.
      operationId: getBrpParticipantTrades
      parameters:
        - name: dateFilter
          in: query
          description: >-
            Selects which timestamp the dateFrom/dateTo window applies to, and
            which field the results are ordered by. TRANSACTION_DATE is when the
            trade was executed and DELIVERY_DATE the start of its delivery
            period. Note: this is only available in ACC at the moment; it is not
            yet in production.
          required: false
          schema:
            type: string
            default: TRANSACTION_DATE
            enum:
              - TRANSACTION_DATE
              - DELIVERY_DATE
        - name: dateFrom
          in: query
          description: >-
            Start of the window, inclusive, as epoch milliseconds. Applies to
            the field named by dateFilter. May not be more than two years before
            the start of the current day.
          required: true
          schema:
            type: integer
            format: int64
        - name: dateTo
          in: query
          description: >-
            End of the window, inclusive, as epoch milliseconds. Applies to the
            field named by dateFilter. The window may not exceed the maximum
            range configured for the service. Certain values (I.e.
            ORDER_CREATION_DATE/TRANSACTION_DATE) may not be in the future
          required: true
          schema:
            type: integer
            format: int64
        - name: sortDirection
          in: query
          description: >-
            Direction the results are ordered in. The field ordered on is the
            one named by dateFilter.
          required: false
          schema:
            type: string
            default: ASC
            enum:
              - ASC
              - DESC
        - name: page
          in: query
          description: Zero-based page index (0..N)
          required: false
          schema:
            type: integer
            default: 0
            minimum: 0
        - name: size
          in: query
          description: The size of the page to be returned
          required: false
          schema:
            type: integer
            default: 20
            minimum: 1
        - name: sort
          in: query
          description: >-
            Sorting criteria in the format: property,(asc|desc). Default sort
            order is ascending. Multiple sort criteria are supported.
          required: false
          schema:
            type: array
            items:
              type: string
        - name: brpParticipantId
          in: query
          description: >-
            Derived from your session when omitted; when supplied it must be
            your own BRP identifier.
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Success. Paginated list of trades.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '400':
          description: >-
            Validation error: a missing or invalid parameter, a date range that
            is too wide, or a brpParticipantId that is not your own BRP.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '403':
          description: >-
            The caller is not a BRP participant. A caller refused for lacking
            the role gets no body; one whose session names no BRP participant
            gets an error body explaining that.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorResponse'
components:
  schemas:
    RegularTradeDto:
      type: object
      description: >
        Trade representation for the regular (non-XBID) markets. Returned for
        Gopacs, Intraday and Ex-post trades. Extends the base trade with the
        EANs of the underlying buy and sell orders. All base trade fields also
        apply. Fields that are null are omitted from the response.
      properties:
        id:
          type: string
          description: Unique internal identifier of this trade record.
        product:
          type: string
          description: Market/product the trade belongs to.
          enum:
            - XBID
            - EXPOST
            - GOPACS
            - INTRADAY
        buyerId:
          type: string
          description: Identifier of the buying participant.
        buyerName:
          type: string
          description: Human-readable name of the buying participant.
        buyerIndividualId:
          type: string
          description: Identifier of the individual (trader) on the buy side.
        buyerIndividualName:
          type: string
          description: Human-readable name of the individual (trader) on the buy side.
        sellerId:
          type: string
          description: Identifier of the selling participant.
        sellerName:
          type: string
          description: Human-readable name of the selling participant.
        sellerIndividualId:
          type: string
          description: Identifier of the individual (trader) on the sell side.
        sellerIndividualName:
          type: string
          description: Human-readable name of the individual (trader) on the sell side.
        start:
          type: integer
          format: int64
          description: Delivery period start, in epoch milliseconds (UTC).
        end:
          type: integer
          format: int64
          description: Delivery period end, in epoch milliseconds (UTC).
        transactionDate:
          type: integer
          format: int64
          description: Timestamp at which the trade occurred, in epoch milliseconds (UTC).
        price:
          type: number
          description: Price of the trade (EUR/MWh).
        capacity:
          type: number
          description: Traded capacity (MW).
        mwhTraded:
          type: number
          description: Traded energy (MWh), rounded to 3 decimal places.
        totalPrice:
          type: number
          description: Total price of the trade (EUR).
        unitPrice:
          type: number
          description: Price per unit (EUR/MWh).
        buyOrderMetadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Free-form key/value metadata of the buy order that produced this
            trade.
        sellOrderMetadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Free-form key/value metadata of the sell order that produced this
            trade.
        reverted:
          type: boolean
          description: Whether the trade has been reverted.
        tradeId:
          type: string
          description: Business identifier of the trade.
        buyerBrpParticipantId:
          type: string
          description: BRP participant identifier on the buy side, when applicable.
        sellerBrpParticipantId:
          type: string
          description: BRP participant identifier on the sell side, when applicable.
        buyOrderEan:
          type: string
          description: EAN (connection identifier) of the facility on the buy order.
        sellOrderEan:
          type: string
          description: EAN (connection identifier) of the facility on the sell order.
      required:
        - id
        - product
        - reverted
        - tradeId
    GopacsTradeDto:
      type: object
      description: >
        Trade representation for the Gopacs (congestion) market. Extends the
        regular trade (including the order EANs) with Gopacs-specific fields.
        All base trade fields also apply. Fields that are null are omitted from
        the response.
      properties:
        id:
          type: string
          description: Unique internal identifier of this trade record.
        product:
          type: string
          description: Market/product the trade belongs to.
          enum:
            - XBID
            - EXPOST
            - GOPACS
            - INTRADAY
        buyerId:
          type: string
          description: Identifier of the buying participant.
        buyerName:
          type: string
          description: Human-readable name of the buying participant.
        buyerIndividualId:
          type: string
          description: Identifier of the individual (trader) on the buy side.
        buyerIndividualName:
          type: string
          description: Human-readable name of the individual (trader) on the buy side.
        sellerId:
          type: string
          description: Identifier of the selling participant.
        sellerName:
          type: string
          description: Human-readable name of the selling participant.
        sellerIndividualId:
          type: string
          description: Identifier of the individual (trader) on the sell side.
        sellerIndividualName:
          type: string
          description: Human-readable name of the individual (trader) on the sell side.
        start:
          type: integer
          format: int64
          description: Delivery period start, in epoch milliseconds (UTC).
        end:
          type: integer
          format: int64
          description: Delivery period end, in epoch milliseconds (UTC).
        transactionDate:
          type: integer
          format: int64
          description: Timestamp at which the trade occurred, in epoch milliseconds (UTC).
        price:
          type: number
          description: Price of the trade (EUR/MWh).
        capacity:
          type: number
          description: Traded capacity (MW).
        mwhTraded:
          type: number
          description: Traded energy (MWh), rounded to 3 decimal places.
        totalPrice:
          type: number
          description: Total price of the trade (EUR).
        unitPrice:
          type: number
          description: Price per unit (EUR/MWh).
        buyOrderMetadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Free-form key/value metadata of the buy order that produced this
            trade.
        sellOrderMetadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Free-form key/value metadata of the sell order that produced this
            trade.
        reverted:
          type: boolean
          description: Whether the trade has been reverted.
        tradeId:
          type: string
          description: Business identifier of the trade.
        buyerBrpParticipantId:
          type: string
          description: BRP participant identifier on the buy side, when applicable.
        sellerBrpParticipantId:
          type: string
          description: BRP participant identifier on the sell side, when applicable.
        buyOrderEan:
          type: string
          description: EAN (connection identifier) of the facility on the buy order.
        sellOrderEan:
          type: string
          description: EAN (connection identifier) of the facility on the sell order.
        isTradedForIdCons:
          type: boolean
          description: Whether the trade was traded for intraday congestion (ID cons).
      required:
        - id
        - isTradedForIdCons
        - product
        - reverted
        - tradeId
    XbidTradeDto:
      type: object
      description: >
        Trade representation for the XBID market. Extends the base trade with
        XBID-specific identifiers and delivery areas. All base trade fields also
        apply. Fields that are null are omitted from the response.
      properties:
        id:
          type: string
          description: Unique internal identifier of this trade record.
        product:
          type: string
          description: Market/product the trade belongs to.
          enum:
            - XBID
            - EXPOST
            - GOPACS
            - INTRADAY
        buyerId:
          type: string
          description: Identifier of the buying participant.
        buyerName:
          type: string
          description: Human-readable name of the buying participant.
        buyerIndividualId:
          type: string
          description: Identifier of the individual (trader) on the buy side.
        buyerIndividualName:
          type: string
          description: Human-readable name of the individual (trader) on the buy side.
        sellerId:
          type: string
          description: Identifier of the selling participant.
        sellerName:
          type: string
          description: Human-readable name of the selling participant.
        sellerIndividualId:
          type: string
          description: Identifier of the individual (trader) on the sell side.
        sellerIndividualName:
          type: string
          description: Human-readable name of the individual (trader) on the sell side.
        start:
          type: integer
          format: int64
          description: Delivery period start, in epoch milliseconds (UTC).
        end:
          type: integer
          format: int64
          description: Delivery period end, in epoch milliseconds (UTC).
        transactionDate:
          type: integer
          format: int64
          description: Timestamp at which the trade occurred, in epoch milliseconds (UTC).
        price:
          type: number
          description: Price of the trade (EUR/MWh).
        capacity:
          type: number
          description: Traded capacity (MW).
        mwhTraded:
          type: number
          description: Traded energy (MWh), rounded to 3 decimal places.
        totalPrice:
          type: number
          description: Total price of the trade (EUR).
        unitPrice:
          type: number
          description: Price per unit (EUR/MWh).
        buyOrderMetadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Free-form key/value metadata of the buy order that produced this
            trade.
        sellOrderMetadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            Free-form key/value metadata of the sell order that produced this
            trade.
        reverted:
          type: boolean
          description: Whether the trade has been reverted.
        tradeId:
          type: string
          description: Business identifier of the trade.
        buyerBrpParticipantId:
          type: string
          description: BRP participant identifier on the buy side, when applicable.
        sellerBrpParticipantId:
          type: string
          description: BRP participant identifier on the sell side, when applicable.
        xbidTradeId:
          type: integer
          format: int64
          description: XBID trade identifier assigned by the XBID system.
        pricePerDelta:
          type: number
          description: Price per delta for the XBID trade.
      required:
        - id
        - product
        - reverted
        - tradeId
    PageableInfo:
      type: object
      description: Pagination request metadata that produced this page.
      properties:
        pageNumber:
          type: integer
          format: int32
          description: Zero-based page number.
        pageSize:
          type: integer
          format: int32
          description: Requested page size.
        offset:
          type: integer
          format: int64
          description: Zero-based offset of the first element in the page.
        sort:
          $ref: '#/components/schemas/SortInfo'
        paged:
          type: boolean
          description: Whether the request is paged.
        unpaged:
          type: boolean
          description: Whether the request is unpaged.
    SortInfo:
      type: object
      description: Sorting information for the page.
      properties:
        empty:
          type: boolean
          description: Whether no sort was applied.
        sorted:
          type: boolean
          description: Whether the results are sorted.
        unsorted:
          type: boolean
          description: Whether the results are unsorted.
    TradePageResponse:
      type: object
      description: >-
        Paginated list of trades. Each element of 'content' is a regular trade
        (RegularTradeDto, for Intraday/Ex-post), a Gopacs trade (GopacsTradeDto)
        or an XBID trade (XbidTradeDto).
      properties:
        content:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/RegularTradeDto'
              - $ref: '#/components/schemas/GopacsTradeDto'
              - $ref: '#/components/schemas/XbidTradeDto'
        pageable:
          $ref: '#/components/schemas/PageableInfo'
        sort:
          $ref: '#/components/schemas/SortInfo'
        totalElements:
          type: integer
          format: int64
          description: Total number of trades across all pages.
        totalPages:
          type: integer
          format: int32
          description: Total number of pages available.
        size:
          type: integer
          format: int32
          description: Page size.
        number:
          type: integer
          format: int32
          description: Zero-based index of this page.
        numberOfElements:
          type: integer
          format: int32
          description: Number of elements on this page.
        first:
          type: boolean
          description: Whether this is the first page.
        last:
          type: boolean
          description: Whether this is the last page.
        empty:
          type: boolean
          description: Whether this page has no elements.
    RegularOrderDto:
      type: object
      description: >
        Order representation for the regular (non-XBID) markets. Returned for
        Intraday and Ex-post orders. Extends the base order with the ean field.
        All base order fields also apply. Fields that are null are omitted from
        the response.
      properties:
        id:
          type: string
          description: Unique internal identifier of this order record.
        product:
          type: string
          description: Market/product the order belongs to.
          enum:
            - XBID
            - EXPOST
            - GOPACS
            - INTRADAY
        orderType:
          type: string
          description: Side/type of the order (e.g. BUY or SELL).
          enum:
            - BUY
            - SELL
            - DIRECT
        participantId:
          type: string
          description: Identifier of the participant that placed the order.
        participantName:
          type: string
          description: Name of the participant that placed the order.
        individualId:
          type: string
          description: Identifier of the individual (trader) that placed the order.
        individualName:
          type: string
          description: Name of the individual (trader) that placed the order.
        orderId:
          type: string
          description: >-
            Business identifier of the order, shared across the order's
            lifecycle events.
        originalCapacity:
          type: number
          description: >-
            Capacity (MW) the order was originally placed with, before any
            partial execution.
        capacity:
          type: number
          description: Remaining/current capacity (MW) of the order.
        totalQuantity:
          type: number
          description: Total quantity (MWh) associated with the order.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Free-form key/value metadata attached to the order.
        orderStatus:
          type: string
          description: Current lifecycle status of the order.
          enum:
            - ACT
            - PMA
            - MAC
            - EXP
            - WIT
            - COV
            - REF
            - SUS
            - OTH
            - REJ
        tradeId:
          type: string
          description: >-
            Identifier of the trade this order resulted in, when it has been
            (partially) matched.
        reverted:
          type: boolean
          description: Whether the order (or its resulting trade) has been reverted.
        counterpartyId:
          type: string
          description: Identifier of the counterparty, when the order has been matched.
        counterpartyName:
          type: string
          description: Name of the counterparty, when the order has been matched.
        duration:
          type: number
          description: Delivery duration of the product, in hours.
        unitPrice:
          type: number
          description: Price per unit (EUR/MWh).
        originalTotalPrice:
          type: number
          description: >-
            Total price (EUR) the order was originally placed with, before any
            partial execution.
        totalPrice:
          type: number
          description: Total price (EUR) of the order.
        created:
          type: integer
          format: int64
          description: Order creation timestamp, in epoch milliseconds (UTC).
        start:
          type: integer
          format: int64
          description: Delivery period start, in epoch milliseconds (UTC).
        end:
          type: integer
          format: int64
          description: Delivery period end, in epoch milliseconds (UTC).
        transactionDate:
          type: integer
          format: int64
          description: >-
            Timestamp at which the order was executed/matched, in epoch
            milliseconds (UTC).
        customExpirationTime:
          type: integer
          format: int64
          description: >-
            Custom expiration time of the order, in epoch milliseconds (UTC),
            when set.
        basketId:
          type: string
          description: >-
            Identifier of the basket this order belongs to, when it was placed
            as part of a basket.
        executionRole:
          type: string
          description: >
            Only available for traded orders.


            If the order provided liquidity it is marked INITIATOR. If the order
            was created against an existing order, it is marked AGGRESSOR. If
            the role cannot be established (as is currently the case with XBID),
            it is marked UNKNOWN.
          enum:
            - INITIATOR
            - AGGRESSOR
            - UNKNOWN
        ean:
          type: string
          description: EAN (connection identifier) of the facility the order relates to.
      required:
        - id
        - orderId
        - orderStatus
        - orderType
        - product
        - reverted
    GopacsOrderDto:
      type: object
      description: >
        Order representation for the Gopacs (congestion) market. Extends the
        regular order (including ean) with Gopacs-specific fields. All base
        order fields also apply. Fields that are null are omitted from the
        response. The congestionId field is only present for users permitted to
        see congestion information (TSO/DSO/admin).
      properties:
        id:
          type: string
          description: Unique internal identifier of this order record.
        product:
          type: string
          description: Market/product the order belongs to.
          enum:
            - XBID
            - EXPOST
            - GOPACS
            - INTRADAY
        orderType:
          type: string
          description: Side/type of the order (e.g. BUY or SELL).
          enum:
            - BUY
            - SELL
            - DIRECT
        participantId:
          type: string
          description: Identifier of the participant that placed the order.
        participantName:
          type: string
          description: Name of the participant that placed the order.
        individualId:
          type: string
          description: Identifier of the individual (trader) that placed the order.
        individualName:
          type: string
          description: Name of the individual (trader) that placed the order.
        orderId:
          type: string
          description: >-
            Business identifier of the order, shared across the order's
            lifecycle events.
        originalCapacity:
          type: number
          description: >-
            Capacity (MW) the order was originally placed with, before any
            partial execution.
        capacity:
          type: number
          description: Remaining/current capacity (MW) of the order.
        totalQuantity:
          type: number
          description: Total quantity (MWh) associated with the order.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Free-form key/value metadata attached to the order.
        orderStatus:
          type: string
          description: Current lifecycle status of the order.
          enum:
            - ACT
            - PMA
            - MAC
            - EXP
            - WIT
            - COV
            - REF
            - SUS
            - OTH
            - REJ
        tradeId:
          type: string
          description: >-
            Identifier of the trade this order resulted in, when it has been
            (partially) matched.
        reverted:
          type: boolean
          description: Whether the order (or its resulting trade) has been reverted.
        counterpartyId:
          type: string
          description: Identifier of the counterparty, when the order has been matched.
        counterpartyName:
          type: string
          description: Name of the counterparty, when the order has been matched.
        duration:
          type: number
          description: Delivery duration of the product, in hours.
        unitPrice:
          type: number
          description: Price per unit (EUR/MWh).
        originalTotalPrice:
          type: number
          description: >-
            Total price (EUR) the order was originally placed with, before any
            partial execution.
        totalPrice:
          type: number
          description: Total price (EUR) of the order.
        created:
          type: integer
          format: int64
          description: Order creation timestamp, in epoch milliseconds (UTC).
        start:
          type: integer
          format: int64
          description: Delivery period start, in epoch milliseconds (UTC).
        end:
          type: integer
          format: int64
          description: Delivery period end, in epoch milliseconds (UTC).
        transactionDate:
          type: integer
          format: int64
          description: >-
            Timestamp at which the order was executed/matched, in epoch
            milliseconds (UTC).
        customExpirationTime:
          type: integer
          format: int64
          description: >-
            Custom expiration time of the order, in epoch milliseconds (UTC),
            when set.
        basketId:
          type: string
          description: >-
            Identifier of the basket this order belongs to, when it was placed
            as part of a basket.
        executionRole:
          type: string
          description: >
            Only available for traded orders.


            If the order provided liquidity it is marked INITIATOR. If the order
            was created against an existing order, it is marked AGGRESSOR. If
            the role cannot be established (as is currently the case with XBID),
            it is marked UNKNOWN.
          enum:
            - INITIATOR
            - AGGRESSOR
            - UNKNOWN
        ean:
          type: string
          description: EAN (connection identifier) of the facility the order relates to.
        marketBased:
          type: boolean
          description: Whether the order is market-based.
        facilityType:
          type: string
          description: Type of facility the order relates to.
        contractId:
          type: string
          description: Identifier of the contract the order belongs to.
        usageFraction:
          type: number
          description: Fraction of the facility capacity used by the order.
        congestionId:
          type: string
          description: >-
            Identifier of the congestion the order addresses. Only present for
            users permitted to see congestion information (TSO/DSO/admin).
      required:
        - id
        - orderId
        - orderStatus
        - orderType
        - product
        - reverted
    IcebergDetails:
      type: object
      properties:
        showCapacity:
          type: number
        pricePerDelta:
          type: number
        hiddenCapacity:
          type: number
        originalUnitPrice:
          type: number
      required:
        - hiddenCapacity
        - originalUnitPrice
        - pricePerDelta
        - showCapacity
    XbidOrderDto:
      type: object
      description: >
        Order representation for the XBID market. Extends the base order with
        XBID-specific identifiers and delivery details. All base order fields
        also apply. Fields that are null are omitted from the response.
      properties:
        id:
          type: string
          description: Unique internal identifier of this order record.
        product:
          type: string
          description: Market/product the order belongs to.
          enum:
            - XBID
            - EXPOST
            - GOPACS
            - INTRADAY
        orderType:
          type: string
          description: Side/type of the order (e.g. BUY or SELL).
          enum:
            - BUY
            - SELL
            - DIRECT
        participantId:
          type: string
          description: Identifier of the participant that placed the order.
        participantName:
          type: string
          description: Name of the participant that placed the order.
        individualId:
          type: string
          description: Identifier of the individual (trader) that placed the order.
        individualName:
          type: string
          description: Name of the individual (trader) that placed the order.
        orderId:
          type: string
          description: >-
            Business identifier of the order, shared across the order's
            lifecycle events.
        originalCapacity:
          type: number
          description: >-
            Capacity (MW) the order was originally placed with, before any
            partial execution.
        capacity:
          type: number
          description: Remaining/current capacity (MW) of the order.
        totalQuantity:
          type: number
          description: Total quantity (MWh) associated with the order.
        metadata:
          type: object
          additionalProperties:
            type: string
          description: Free-form key/value metadata attached to the order.
        orderStatus:
          type: string
          description: Current lifecycle status of the order.
          enum:
            - ACT
            - PMA
            - MAC
            - EXP
            - WIT
            - COV
            - REF
            - SUS
            - OTH
            - REJ
        tradeId:
          type: string
          description: >-
            Identifier of the trade this order resulted in, when it has been
            (partially) matched.
        reverted:
          type: boolean
          description: Whether the order (or its resulting trade) has been reverted.
        counterpartyId:
          type: string
          description: Identifier of the counterparty, when the order has been matched.
        counterpartyName:
          type: string
          description: Name of the counterparty, when the order has been matched.
        duration:
          type: number
          description: Delivery duration of the product, in hours.
        unitPrice:
          type: number
          description: Price per unit (EUR/MWh).
        originalTotalPrice:
          type: number
          description: >-
            Total price (EUR) the order was originally placed with, before any
            partial execution.
        totalPrice:
          type: number
          description: Total price (EUR) of the order.
        created:
          type: integer
          format: int64
          description: Order creation timestamp, in epoch milliseconds (UTC).
        start:
          type: integer
          format: int64
          description: Delivery period start, in epoch milliseconds (UTC).
        end:
          type: integer
          format: int64
          description: Delivery period end, in epoch milliseconds (UTC).
        transactionDate:
          type: integer
          format: int64
          description: >-
            Timestamp at which the order was executed/matched, in epoch
            milliseconds (UTC).
        customExpirationTime:
          type: integer
          format: int64
          description: >-
            Custom expiration time of the order, in epoch milliseconds (UTC),
            when set.
        basketId:
          type: string
          description: >-
            Identifier of the basket this order belongs to, when it was placed
            as part of a basket.
        executionRole:
          type: string
          description: >
            Only available for traded orders.


            If the order provided liquidity it is marked INITIATOR. If the order
            was created against an existing order, it is marked AGGRESSOR. If
            the role cannot be established (as is currently the case with XBID),
            it is marked UNKNOWN.
          enum:
            - INITIATOR
            - AGGRESSOR
            - UNKNOWN
        xbidOrderId:
          type: integer
          format: int64
          description: XBID order identifier assigned by the XBID system.
        xbidInitialOrderId:
          type: integer
          format: int64
          description: XBID identifier of the initial order in this order's revision chain.
        xbidParentOrderId:
          type: integer
          format: int64
          description: XBID identifier of the parent order this order was derived from.
        xbidBasketId:
          type: integer
          format: int64
          description: XBID basket identifier, when the order is part of an XBID basket.
        orderExecutionRestrictionType:
          type: string
          description: >-
            Execution restriction applied to the XBID order (e.g. fill-or-kill,
            immediate-or-cancel).
          enum:
            - NON
            - FOK
            - IOC
        xbidTradeId:
          type: integer
          format: int64
          description: XBID trade identifier, when the order has been matched.
        icebergDetails:
          $ref: '#/components/schemas/IcebergDetails'
          description: Iceberg order details, when the order is an iceberg order.
        xbidOrderType:
          type: string
          description: XBID-specific order type.
          enum:
            - REGULAR
            - ICEBERG
      required:
        - id
        - orderId
        - orderStatus
        - orderType
        - product
        - reverted
    OrderPageResponse:
      type: object
      description: >-
        Paginated list of orders. Each element of 'content' is a regular order
        (RegularOrderDto, for Intraday/Ex-post), a Gopacs order (GopacsOrderDto)
        or an XBID order (XbidOrderDto).
      properties:
        content:
          type: array
          items:
            oneOf:
              - $ref: '#/components/schemas/RegularOrderDto'
              - $ref: '#/components/schemas/GopacsOrderDto'
              - $ref: '#/components/schemas/XbidOrderDto'
        pageable:
          $ref: '#/components/schemas/PageableInfo'
        sort:
          $ref: '#/components/schemas/SortInfo'
        totalElements:
          type: integer
          format: int64
          description: Total number of orders across all pages.
        totalPages:
          type: integer
          format: int32
          description: Total number of pages available.
        size:
          type: integer
          format: int32
          description: Page size.
        number:
          type: integer
          format: int32
          description: Zero-based index of this page.
        numberOfElements:
          type: integer
          format: int32
          description: Number of elements on this page.
        first:
          type: boolean
          description: Whether this is the first page.
        last:
          type: boolean
          description: Whether this is the last page.
        empty:
          type: boolean
          description: Whether this page has no elements.
    ParticipantResponse:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
    ApiErrorResponse:
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        status:
          type: integer
          format: int32
        error:
          type: string
        message:
          type: string
        path:
          type: string
        fieldErrors:
          type: array
          items:
            $ref: '#/components/schemas/ApiFieldError'
    ApiFieldError:
      type: object
      properties:
        field:
          type: string
        rejectedValue:
          type: object
        message:
          type: string
    Page:
      type: object
      properties:
        totalElements:
          type: integer
          format: int64
        totalPages:
          type: integer
          format: int32
        pageable:
          $ref: '#/components/schemas/PageableObject'
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            type: object
        number:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        numberOfElements:
          type: integer
          format: int32
        first:
          type: boolean
        last:
          type: boolean
        empty:
          type: boolean
    PageableObject:
      type: object
      properties:
        paged:
          type: boolean
        pageSize:
          type: integer
          format: int32
        pageNumber:
          type: integer
          format: int32
        offset:
          type: integer
          format: int64
        sort:
          $ref: '#/components/schemas/SortObject'
        unpaged:
          type: boolean
    SortObject:
      type: object
      properties:
        sorted:
          type: boolean
        empty:
          type: boolean
        unsorted:
          type: boolean
  securitySchemes:
    API_KEY:
      type: apiKey
      description: API KEY
      name: API_KEY
      in: header
x-tagGroups:
  - name: Reporting v4
    tags:
      - Reporting Trades
      - Reporting Orders
