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

# Get Player Trades

> Gets all trades the player has either opened or accepted, optionally filtered by trade status.

## Error codes

This operation may return the following PlayFab errors:

| Error | Code |
| --- | --- |
| ProductDisabledForTitle | 1609 |




## OpenAPI

````yaml post /Client/GetPlayerTrades
openapi: 3.0.0
info:
  version: '260922'
  title: PlayFab Client API
  description: >-
    APIs which provide the full range of PlayFab features available to the
    client - authentication, account and data management, inventory, friends,
    matchmaking, reporting, and platform-specific functionality
  termsOfService: https://playfab.com/terms/
  contact:
    url: https://community.playfab.com/index.html
  license:
    name: Apache 2.0
    url: https://github.com/PlayFab/API_Specs/blob/master/LICENSE
servers:
  - url: https://{titleId}.playfabapi.com
    description: PlayFab title endpoint
    variables:
      titleId:
        default: your_title_id
        description: Your PlayFab title ID (hex).
security: []
tags:
  - name: Account Management
    description: Account Management APIs
  - name: Advertising
    description: Advertising APIs
  - name: Analytics
    description: Analytics APIs
  - name: Authentication
    description: Authentication APIs
  - name: Character Data
    description: Character Data APIs
  - name: Characters
    description: Characters APIs
  - name: Content
    description: Content Service APIs
  - name: Friend List Management
    description: Friend List Management APIs
  - name: Matchmaking
    description: Matchmaking APIs
  - name: Platform Specific Methods
    description: Platform Specific Methods APIs
  - name: Player Data Management
    description: Player Data Management APIs
  - name: Player Item Management
    description: Player Item Management APIs
  - name: PlayStream
    description: PlayStream Management APIs
  - name: Server-Side Cloud Script
    description: Server-Side Cloud Script APIs
  - name: Shared Group Data
    description: Shared Group Data APIs
  - name: Title-Wide Data Management
    description: Title-Wide Data Management APIs
  - name: Trading
    description: Trading Management APIs
paths:
  /Client/GetPlayerTrades:
    post:
      tags:
        - Trading
      summary: Get Player Trades
      description: >
        Gets all trades the player has either opened or accepted, optionally
        filtered by trade status.


        ## Error codes


        This operation may return the following PlayFab errors:


        | Error | Code |

        | --- | --- |

        | ProductDisabledForTitle | 1609 |
      operationId: GetPlayerTrades
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetPlayerTradesRequest'
      responses:
        '200':
          $ref: '#/components/responses/GetPlayerTradesResponse'
        '400':
          $ref: '#/components/responses/ApiErrorWrapper'
      security:
        - SessionTicket: []
components:
  schemas:
    GetPlayerTradesRequest:
      type: object
      properties:
        StatusFilter:
          allOf:
            - $ref: '#/components/schemas/TradeStatus'
          description: >-
            Returns only trades with the given status. If null, returns all
            trades.
      example:
        StatusFilter: Filled
    TradeStatus:
      type: string
      enum:
        - Invalid
        - Opening
        - Open
        - Accepting
        - Accepted
        - Filled
        - Cancelled
    GetPlayerTradesResponse:
      type: object
      properties:
        AcceptedTrades:
          description: History of trades which this player has accepted.
          type: array
          items:
            $ref: '#/components/schemas/TradeInfo'
          x-isclass: true
        OpenedTrades:
          description: >-
            The trades for this player which are currently available to be
            accepted.
          type: array
          items:
            $ref: '#/components/schemas/TradeInfo'
          x-isclass: true
      example:
        OpenedTrades:
          - Status: Filled
            TradeId: D819CEC225EA9948C351
            OfferingPlayerId: CD803BF233CE76CC
            OfferedInventoryInstanceIds:
              - '1359447'
              - '635691'
            OfferedCatalogItemIds:
              - gun_1
              - skin_3
            RequestedCatalogItemIds:
              - rare_hat_7
            AcceptedPlayerId: 461535E1EF4150A86889
            AcceptedInventoryInstanceIds:
              - 95C1797ADDAC24DC0383
              - 0F7793DF55CCEAF21B84
            OpenedAt: '2015-04-07T09:04:28+00:00'
            FilledAt: '2015-04-07T09:20:53+00:00'
        AcceptedTrades:
          - Status: Filled
            TradeId: 20BC5A5DCD966_D4935E795ABAE6
            OfferingPlayerId: 20BC5A5DCD966
            OfferedInventoryInstanceIds:
              - 23BDCB
            OfferedCatalogItemIds:
              - boost_10
            RequestedCatalogItemIds:
              - gem_5
              - card_3
            AcceptedPlayerId: CD803BF233CE76CC
            AcceptedInventoryInstanceIds:
              - 2DDD0187
              - 35D2A00
            OpenedAt: '2015-05-01T11:45:19+00:00'
            FilledAt: '2015-05-01T15:07:34+00:00'
    ApiErrorWrapper:
      description: The basic wrapper around every failed API response
      type: object
      properties:
        code:
          description: Numerical HTTP code
          type: integer
        status:
          description: String HTTP code
          type: string
        error:
          description: Playfab error code
          type: string
        errorCode:
          description: Numerical PlayFab error code
          type: integer
        errorMessage:
          description: Description for the PlayFab errorCode
          type: string
        errorDetails:
          description: Detailed description of individual issues with the request object
          type: object
      required:
        - code
        - errorCode
    TradeInfo:
      type: object
      properties:
        AcceptedInventoryInstanceIds:
          description: >-
            Item instances from the accepting player that are used to fulfill
            the trade. If null, no one has accepted the trade.
          type: array
          items:
            type: string
        AcceptedPlayerId:
          description: >-
            The PlayFab ID of the player who accepted the trade. If null, no one
            has accepted the trade.
          type: string
        AllowedPlayerIds:
          description: >-
            An optional list of players allowed to complete this trade. If null,
            anybody can complete the trade.
          type: array
          items:
            type: string
        CancelledAt:
          description: If set, The UTC time when this trade was canceled.
          type: string
        FilledAt:
          description: If set, The UTC time when this trade was fulfilled.
          type: string
        InvalidatedAt:
          description: If set, The UTC time when this trade was made invalid.
          type: string
        OfferedCatalogItemIds:
          description: The catalogItem Ids of the item instances being offered.
          type: array
          items:
            type: string
        OfferedInventoryInstanceIds:
          description: The itemInstance Ids that are being offered.
          type: array
          items:
            type: string
        OfferingPlayerId:
          description: The PlayFabId for the offering player.
          type: string
        OpenedAt:
          description: The UTC time when this trade was created.
          type: string
        RequestedCatalogItemIds:
          description: The catalogItem Ids requested in exchange.
          type: array
          items:
            type: string
        Status:
          allOf:
            - $ref: '#/components/schemas/TradeStatus'
          description: Describes the current state of this trade.
        TradeId:
          description: The identifier for this trade.
          type: string
  responses:
    GetPlayerTradesResponse:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
                description: >-
                  The Http status code. If X-ReportErrorAsSuccess header is set
                  to true, this will report the actual http error code.
              status:
                type: string
                description: The Http status code as a string.
              data:
                $ref: '#/components/schemas/GetPlayerTradesResponse'
            example:
              code: 200
              status: OK
              data:
                OpenedTrades:
                  - Status: Filled
                    TradeId: D819CEC225EA9948C351
                    OfferingPlayerId: CD803BF233CE76CC
                    OfferedInventoryInstanceIds:
                      - '1359447'
                      - '635691'
                    OfferedCatalogItemIds:
                      - gun_1
                      - skin_3
                    RequestedCatalogItemIds:
                      - rare_hat_7
                    AcceptedPlayerId: 461535E1EF4150A86889
                    AcceptedInventoryInstanceIds:
                      - 95C1797ADDAC24DC0383
                      - 0F7793DF55CCEAF21B84
                    OpenedAt: '2015-04-07T09:04:28+00:00'
                    FilledAt: '2015-04-07T09:20:53+00:00'
                AcceptedTrades:
                  - Status: Filled
                    TradeId: 20BC5A5DCD966_D4935E795ABAE6
                    OfferingPlayerId: 20BC5A5DCD966
                    OfferedInventoryInstanceIds:
                      - 23BDCB
                    OfferedCatalogItemIds:
                      - boost_10
                    RequestedCatalogItemIds:
                      - gem_5
                      - card_3
                    AcceptedPlayerId: CD803BF233CE76CC
                    AcceptedInventoryInstanceIds:
                      - 2DDD0187
                      - 35D2A00
                    OpenedAt: '2015-05-01T11:45:19+00:00'
                    FilledAt: '2015-05-01T15:07:34+00:00'
    ApiErrorWrapper:
      description: This is the outer wrapper for all responses with errors
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorWrapper'
  securitySchemes:
    SessionTicket:
      type: apiKey
      in: header
      name: X-Authorization
      description: >-
        This API requires a client session ticket, available from any Client
        Login function.

````

## Related topics

- [Get Player Trades](/api-reference/trading/get-player-trades.md)
- [Trading](/services/playfab/economy-monetization/economy/trading/index.md)
- [Using Player inventory](/services/playfab/player-progression/player-data/player-inventory.md)
- [Profile Reads Meter API Description](/services/playfab/pricing/meters/profile-reads.md)
- [Get Trade Status](/services/playfab/api-references/rest/client/trading/get-trade-status.md)
