> ## Documentation Index
> Fetch the complete documentation index at: https://docs.activeviam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve one booked trade and whether the caller may reverse it.

> Returns when the trade was booked and by whom, and the quantity changes it made grouped by the book they landed in. The timestamp is ISO 8601 carrying the offset of the caller's time zone, or UTC when none was supplied. Reversal additionally requires edit access to every book the trade touched, so a caller who can read a trade cannot necessarily undo it. A trade with effects in books the caller cannot see is refused rather than partially described. This synchronous operation is read-only.



## OpenAPI

````yaml /risk-and-pricing/atoti-risk-services/apis-endpoints/openapi/openapi.mintlify.json get /api/Position/TradeDetails/{tradeId}
openapi: 3.0.4
info:
  title: Derivitec Api 1.0
  version: '1.0'
servers:
  - url: https://api.riskportal.activeviam.com
security:
  - oauth2: []
  - apikey: []
tags:
  - name: AdminUser
  - name: AtotiReport
  - name: AtotiSession
  - name: BloombergOAuth
  - name: Bond
  - name: BondYieldCurvePage
  - name: BookAccess
  - name: Books
  - name: Commodity
  - name: Counterparties
  - name: Currencies
  - name: Equity
  - name: EquityDividend
  - name: EquityPage
  - name: FeatureFlag
  - name: Fx
  - name: FxPage
  - name: GroupAccess
  - name: Home
  - name: LegacyPosition
  - name: MarketData
  - name: MarketDataProvider
  - name: MarketDataProviderAccess
  - name: Meta
  - name: Notification
  - name: Organisation
  - name: PnLReport
  - name: PortfolioAccess
  - name: Portfolios
  - name: Position
  - name: PositionFilter
  - name: PricingEnvironment
  - name: PricingEnvironmentAccess
  - name: RateAsset
  - name: RateAssetPage
  - name: Report
  - name: ReportDefinition
  - name: ReportHistoryLauncherQuery
  - name: ReportLauncher
  - name: ReportQuery
  - name: ReportQueryViewUser
  - name: ReportRestriction
  - name: ReportView
  - name: RiskReport
  - name: Tradable
  - name: TradeBooking
  - name: User
  - name: VarReport
  - name: VarReportQuery
  - name: YieldCurvePage
paths:
  /api/Position/TradeDetails/{tradeId}:
    get:
      tags:
        - Position
      summary: Retrieve one booked trade and whether the caller may reverse it.
      description: >-
        Returns when the trade was booked and by whom, and the quantity changes
        it made grouped by the book they landed in. The timestamp is ISO 8601
        carrying the offset of the caller's time zone, or UTC when none was
        supplied. Reversal additionally requires edit access to every book the
        trade touched, so a caller who can read a trade cannot necessarily undo
        it. A trade with effects in books the caller cannot see is refused
        rather than partially described. This synchronous operation is
        read-only.
      operationId: TradeDetails
      parameters:
        - name: tradeId
          in: path
          description: The identifier of the booked trade.
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: >-
            Returns the trade with `IsSuccess = true`, or `IsSuccess = false`
            when the trade does not exist or the caller cannot see every book it
            affected.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiGetTradeDetailsResponse'
        '400':
          description: BadRequest
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      security:
        - oauth2: []
        - apikey: []
components:
  schemas:
    ApiGetTradeDetailsResponse:
      required:
        - $type
      type: object
      properties:
        is_success:
          type: boolean
          description: >-
            Whether the operation completed successfully. The default is `true`;
            error outcomes set it to `false`.
          example: true
        error_messages:
          type: array
          items:
            type: string
          description: >-
            Messages explaining operation-level failures. The collection is
            empty by default.
          nullable: true
        trade_id:
          type: integer
          description: Identifies the trade, and is what a reversal request quotes back.
          format: int32
        trade_date:
          type: string
          description: >-
            When the trade was booked, as an ISO 8601 round-trip timestamp
            carrying the offset of the

            time zone the request asked for, or UTC when it asked for none.
          nullable: true
          example: '2026-09-07T14:32:10.0000000+01:00'
        booked_by_user_name:
          type: string
          description: >-
            Who booked the trade, by display name. Falls back to their user id,
            and then to the caller's

            own id, when the trade records no name.
          nullable: true
        can_reverse:
          type: boolean
          description: >-
            Whether the caller may reverse this trade, which requires edit
            access to every book it

            touched. A caller who can see the trade cannot necessarily undo it.
        position_effects_by_book:
          type: array
          items:
            $ref: '#/components/schemas/ApiTradeDetailsPositionEffectsByBook'
          description: >-
            The quantity changes the trade made, grouped by the book they landed
            in. A trade spanning

            several books has one entry per book.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.TradeBooking.ApiGetTradeDetailsResponse,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        What one booked trade did: when it was booked, by whom, which books it
        moved, and whether the

        caller may reverse it.
    ApiTradeDetailsPositionEffectsByBook:
      required:
        - $type
      type: object
      properties:
        book_id:
          type: integer
          description: Identifies the book the effects landed in.
          format: int32
        book_name:
          type: string
          description: The book's name as the portfolio shows it.
          nullable: true
        position_effects:
          type: array
          items:
            $ref: '#/components/schemas/PositionEffectViewModel'
          description: >-
            The quantity changes this trade made in the book, one per tradable
            it touched.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.TradeBooking.ApiTradeDetailsPositionEffectsByBook,
              Derivitec.Web.Core
      additionalProperties: false
      description: The part of a trade that landed in one book.
    PositionEffectViewModel:
      required:
        - $type
      type: object
      properties:
        book_id:
          type: integer
          description: Numeric Risk Portal book key assigned to the position change.
          format: int32
        book_name:
          type: string
          description: Name of the book receiving the position change.
          nullable: true
        client_transaction_id:
          type: string
          description: >-
            Caller-supplied transaction reference carried through validation and
            import.
          nullable: true
        contract_size:
          type: number
          description: >-
            Optional contract-size value supplied for this position change; no
            universal unit is defined.
          format: double
          nullable: true
        counterparty:
          type: string
          description: Counterparty label carried with the position change.
          nullable: true
        deleted:
          type: boolean
          description: Whether this view represents a deleted position effect.
        display_name:
          type: string
          description: User-facing label for the proposed position change.
          nullable: true
        id:
          type: integer
          description: Numeric position-effect key used to relate labels to this change.
          format: int32
        is_checked:
          type: boolean
          description: Client selection state for this proposed position change.
        leg:
          type: string
          description: Caller-provided leg label within a multi-leg trade structure.
          nullable: true
        position_effects_label_values:
          type: array
          items:
            $ref: '#/components/schemas/PositionEffectsLabelValueViewModel'
          description: >-
            Additional typed position metadata represented as label identifiers
            and text values.
          nullable: true
        quantity:
          type: number
          description: >-
            Position quantity produced or changed by this effect; this contract
            defines no universal unit.
          format: double
        structure:
          type: string
          description: Caller-provided grouping label for a multi-leg trade structure.
          nullable: true
        tool_tip:
          type: string
          description: >-
            Supplementary user-facing explanation for this proposed position
            change.
          nullable: true
        tradable_identifier:
          type: string
          description: Risk Portal tradable reference resolved for the position change.
          nullable: true
        tradable_type:
          type: string
          description: Product classification displayed for the resolved tradable.
          nullable: true
        trade_action:
          type: string
          description: >-
            Requested lifecycle action for the position, such as an amendment,
            deletion, close, or restoration.
          nullable: true
        upload_tradable_id_to_enfusion:
          type: boolean
          description: >-
            Whether the resolved Risk Portal tradable reference should be
            written back to the Enfusion position.
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Positions.PositionEffectViewModel,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        One proposed or imported position change with book, tradable, quantity,
        action, and display metadata.
    PositionEffectsLabelValueViewModel:
      required:
        - $type
      type: object
      properties:
        field:
          type: string
          description: Lower-case field key derived from the position-effect label.
          nullable: true
          readOnly: true
        label_id:
          type: integer
          description: >-
            Numeric discriminator identifying which position metadata label the
            value represents.
          format: int32
        position_effect_id:
          type: integer
          description: Numeric position-effect key to which this metadata value belongs.
          format: int32
        value:
          type: string
          description: Text representation of the metadata value.
          nullable: true
        $type:
          type: string
          enum:
            - >-
              Derivitec.Web.Core.Positions.PositionEffectsLabelValueViewModel,
              Derivitec.Web.Core
      additionalProperties: false
      description: >-
        One additional metadata value linked to a position effect by a typed
        label.
  securitySchemes:
    oauth2:
      type: oauth2
      description: >-
        OAuth2 access-token requested from AWS Cognito and provided as a Auth
        Bearer header
      flows:
        implicit:
          authorizationUrl: https://auth.riskportal.derivitec.com/oauth2/authorize
          scopes: {}
    apikey:
      type: apiKey
      description: API-Key requested via the site and provided as a header
      name: x-api-key
      in: header

````