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

# Get Trader Update History

> Get trader DDX balance and profile updates over time



## OpenAPI

````yaml /api-specs/public-rest-unified.json get /exchange/api/v1/trader_updates
openapi: 3.1.0
info:
  title: DerivaDEX API Documentation
  version: '1.0'
  description: ''
servers:
  - url: https://testnet.derivadex.io
    description: DerivaDEX testnet
security: []
tags:
  - name: Venue-Wide Tables
    description: These APIs expose venue-wide public tables and reference data.
    x-source-api: Public REST API
  - name: System
    description: These APIs return system info.
    x-source-api: Public REST API
  - name: Trade
    description: These APIs provide data for a particular trader.
    x-source-api: Public REST API
  - name: Market
    description: These APIs return key high level metrics for markets.
    x-source-api: Public REST API
  - name: Trade
    description: These APIs provide data for a particular trader.
    x-source-api: Public Exchange REST API
  - name: Market
    description: These APIs return key high level metrics for markets.
    x-source-api: Public Exchange REST API
  - name: System
    description: These APIs return system info.
    x-source-api: Public Exchange REST API
paths:
  /exchange/api/v1/trader_updates:
    get:
      tags:
        - Market
      summary: Get Trader Update History
      description: Get trader DDX balance and profile updates over time
      parameters:
        - in: query
          name: trader
          schema:
            type: string
          description: The trader address, with the discriminant prefix.
          example: '0x00b993e587c15a9e0a0fe4f111de98fd6b5ce7067d'
        - name: reason
          in: query
          schema:
            type: integer
            enum:
              - 0
              - 1
              - 2
              - 3
              - 4
              - 5
              - 6
              - 7
              - 8
              - 9
          example: 0
          description: >
            The type of trader update. Multiple trader update values can be
            provided. Values include:
              0: Deposit - DDX was deposited on-chain,
              1: WithdrawDDX - DDX withdrawal was claimed on-chain,
              2: WithdrawDDXIntent - DDX was locked for withdrawal,
              3: TradeMiningReward - DDX was rewarded for participation in trade mining,
              4: ProfileUpdate - DDX fee preferences were changed,
              5: FeeDistribution - DDX was rewarded for participation as a custodian during checkpointing,
              6: Admission - Trader is allowed access to the platform due to KYC (re-)approval, unbanning, or other reasons.
              7: Denial - Trader is denied access to the platform due to KYC blacklist, expiration, or other reasons.
              8: Fee - Fees were charged in DDX from trade fills.
              9: WithdrawDDXRejection - Withdraw DDX rejection.
        - in: query
          name: limit
          schema:
            type: integer
            default: 500
          description: The number of rows to return
        - in: query
          name: globalOrdinal
          schema:
            type: integer
          description: >-
            The global ordinal boundary used when fetching the next timeseries
            page.
          example: 100
        - in: query
          name: order
          schema:
            type: string
            enum:
              - asc
              - desc
            default: asc
          description: The ordering of the results.
      responses:
        '200':
          description: trader update data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExchangeAPITraderUpdateSuccessResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatsAPIErrorResponse'
        '500':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StatsAPIErrorResponse'
components:
  schemas:
    ExchangeAPITraderUpdateSuccessResponse:
      type: object
      additionalProperties: false
      properties:
        nextGlobalOrdinal:
          type:
            - number
            - 'null'
          description: >-
            Pointer for the global ordinal boundary of the next page. Will
            return null when there is no more data left to fetch.
          examples:
            - 100
            - null
        value:
          type: array
          items:
            type: object
            properties:
              globalOrdinal:
                type: number
                description: >-
                  The global ordinal for a trader update that identifies it
                  uniquely.
                examples:
                  - 9
              epochId:
                type: number
                description: The epoch in which this transaction occured.
                examples:
                  - 100
              txOrdinal:
                type: number
                description: The transaction ordinal, within the epoch.
                examples:
                  - 3432
              ordinal:
                type: number
                description: The ordinal within this particular transaction.
                examples:
                  - 0
              withdrawDdxRejection:
                type: number
                enum:
                  - 0
                  - 1
                description: >-
                  The withdraw rejection type when applicable. Optional field
                  only present on rejections.
                examples:
                  - 0
              reason:
                type: number
                enum:
                  - 0
                  - 1
                  - 2
                  - 3
                  - 4
                  - 5
                  - 6
                description: The reason of trader update.
                examples:
                  - 0
                  - 1
                  - 2
                  - 3
                  - 4
                  - 5
              traderAddress:
                type: string
                description: >-
                  The trader address prefixed with the blockchain discriminant
                  of the trader.
                examples:
                  - '0x00b993e587c15a9e0a0fe4f111de98fd6b5ce7067d'
              amount:
                type: string
                description: The amount of DDX was modified in this trader.
                examples:
                  - '1000'
              newAvailDdxBalance:
                type: string
                description: The new DDX balance after updating this trader.
                examples:
                  - '1200'
              newLockedDdxBalance:
                type: string
                description: The new locked DDX balance after updating this trader.
                examples:
                  - '100'
              payFeesInDdx:
                type: boolean
                description: >-
                  A flag which when set will attempt to pay trading fees using
                  the DDX held in this trader.
                examples:
                  - true
              blockNumber:
                type: number
                description: The block number in which this strategy update was processed.
                examples:
                  - '344100'
              txHash:
                type: string
                description: >-
                  The on-chain transaction hash corresponding to this trader
                  update (for Deposit and WithdrawDDX kinds)
                examples:
                  - >-
                    0xfcdae2edac7063ae3a3fb0e74b48816a0593644a3b2f5d701c8e5fafec70828e
              createdAt:
                type: string
                format: date-time
                description: The time when this row was added to the database.
                examples:
                  - '2023-01-06T16:37:27.929Z'
            required:
              - globalOrdinal
              - epochId
              - reason
              - traderAddress
              - createdAt
            additionalProperties: false
            description: A transaction which represents an update to a trader.
          description: The value of the response
        success:
          type: boolean
          const: true
          description: Whether the request was successful
        timestamp:
          type: number
          description: The timestamp of the response
          examples:
            - 1673031089
      required:
        - nextGlobalOrdinal
        - success
        - timestamp
        - value
      description: Successful response for the Trader Update API
    StatsAPIErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          const: false
        errorMsg:
          anyOf:
            - type: string
            - type: array
              items:
                type: object
                additionalProperties: false
      required:
        - success
      additionalProperties: false

````