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

# User Profile

> Per-wallet performance profile, PnL, win rate, volume, ROI, hold time and trade counts, one row per wallet for the requested duration.



## OpenAPI

````yaml /openapi.json post /api/v1/profiles/user
openapi: 3.0.3
info:
  title: DataDash Analytics API
  version: 1.0.0
servers: []
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /api/v1/profiles/user:
    post:
      tags:
        - Profiles
      summary: User Profile
      description: >-
        Per-wallet performance profile, PnL, win rate, volume, ROI, hold time
        and trade counts, one row per wallet for the requested duration.
      operationId: listProfilesUser
      requestBody:
        content:
          application/json:
            schema:
              properties:
                filter:
                  $ref: '#/components/schemas/UserProfileFilter'
                orderBy:
                  description: >-
                    Sort keys in priority order; the first is the primary sort.
                    Defaults to the table's configured ranking when omitted.
                  items:
                    properties:
                      direction:
                        default: asc
                        enum:
                          - asc
                          - desc
                        type: string
                      field:
                        enum:
                          - userId
                          - realizedPnl
                          - wins
                          - losses
                          - profit
                          - loss
                          - volume
                          - profitFactor
                          - positions
                          - winRate
                          - realizedBuyCost
                          - roi
                          - holdTime
                          - numTrades
                          - numSplitTrades
                          - numMergeTrades
                          - numRedeemTrades
                          - numConvertTrades
                          - numP2pTrades
                          - numPredictions
                          - avgTradesPerPrediction
                          - count
                          - rank
                        type: string
                    required:
                      - field
                    type: object
                  type: array
                page:
                  $ref: '#/components/schemas/PageInput'
                searchKey:
                  description: 'Free-text search over: User (prefix match/full-text search).'
                  type: string
              required:
                - page
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/UserProfileRow'
                type: array
          description: List of User Profile rows
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            invalid request (malformed body, unknown field, or failed
            validation)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: missing or invalid credentials
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: credentials lack access to this resource
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: internal error
components:
  schemas:
    UserProfileFilter:
      description: Filters to apply, combined with AND. Use a group for OR.
      items:
        $ref: '#/components/schemas/UserProfileFilterNode'
      minItems: 1
      type: array
    PageInput:
      properties:
        limit:
          minimum: 1
          type: integer
        offset:
          minimum: 0
          type: integer
      required:
        - limit
      type: object
    UserProfileRow:
      properties:
        avgTradesPerPrediction:
          description: Average number of trades per prediction
          format: float
          title: Avg Trades Per Prediction
          type: number
        count:
          description: A special property that will count the number of wallets
          format: int64
          title: Count
          type: integer
        holdTime:
          description: Average hold time in seconds
          format: int32
          title: Hold Time
          type: integer
        loss:
          description: Total loss
          format: double
          title: Loss
          type: number
        losses:
          description: Number of losing positions
          format: int32
          title: Losses
          type: integer
        numConvertTrades:
          description: Number of convert trades
          format: int32
          title: Num Convert Trades
          type: integer
        numMergeTrades:
          description: Number of merge trades
          format: int32
          title: Num Merge Trades
          type: integer
        numP2pTrades:
          description: Number of peer-to-peer trades
          format: int32
          title: Num P2P Trades
          type: integer
        numPredictions:
          description: Number of predictions
          format: int32
          title: Num Predictions
          type: integer
        numRedeemTrades:
          description: Number of redeem trades
          format: int32
          title: Num Redeem Trades
          type: integer
        numSplitTrades:
          description: Number of split trades
          format: int32
          title: Num Split Trades
          type: integer
        numTrades:
          description: Number of trades
          format: int32
          title: Num Trades
          type: integer
        positions:
          description: Total number of positions
          format: int32
          title: Positions
          type: integer
        profit:
          description: Total profit
          format: double
          title: Profit
          type: number
        profitFactor:
          description: Ratio of profit to loss
          format: float
          title: Profit Factor
          type: number
        rank:
          description: User rank by PnL for the duration
          format: int32
          title: Rank
          type: integer
        realizedBuyCost:
          description: Total cost of closed buys
          format: double
          title: Realized Buy Cost
          type: number
        realizedPnl:
          description: Realized profit and loss
          format: double
          title: Realized PNL
          type: number
        roi:
          description: Return on investment percentage
          format: float
          title: Roi
          type: number
        userId:
          description: User wallet address
          title: User
          type: string
        volume:
          description: Total trading volume
          format: double
          title: Volume
          type: number
        winRate:
          description: Winning percentage
          format: float
          title: Win Rate
          type: number
        wins:
          description: Number of winning positions
          format: int32
          title: Wins
          type: integer
      type: object
    Error:
      properties:
        code:
          description: machine-readable error code
          type: string
        message:
          description: human-readable description
          type: string
      required:
        - code
        - message
      type: object
    UserProfileFilterNode:
      description: A single condition, or a group combining conditions with AND/OR.
      oneOf:
        - $ref: '#/components/schemas/UserProfileCondition'
        - $ref: '#/components/schemas/UserProfileFilterGroup'
    UserProfileCondition:
      description: >-
        A single field condition. in/notIn take an array of values;
        matches/notMatches take one search term.
      oneOf:
        - $ref: '#/components/schemas/UserProfileNumericCondition'
        - $ref: '#/components/schemas/UserProfileAddressCondition'
        - $ref: '#/components/schemas/UserProfileDurationCondition'
    UserProfileFilterGroup:
      description: >-
        A group of conditions and nested groups, combined with the group's
        operator.
      properties:
        filters:
          items:
            oneOf:
              - $ref: '#/components/schemas/UserProfileCondition'
              - $ref: '#/components/schemas/UserProfileFilterInnerGroup'
          minItems: 1
          type: array
        operator:
          enum:
            - AND
            - OR
          type: string
      required:
        - operator
        - filters
      type: object
    UserProfileNumericCondition:
      properties:
        field:
          enum:
            - realizedPnl
            - wins
            - losses
            - profit
            - loss
            - volume
            - profitFactor
            - positions
            - winRate
            - realizedBuyCost
            - roi
            - holdTime
            - numTrades
            - numSplitTrades
            - numMergeTrades
            - numRedeemTrades
            - numConvertTrades
            - numP2pTrades
            - numPredictions
            - avgTradesPerPrediction
            - rank
          type: string
        operator:
          enum:
            - eq
            - neq
            - lt
            - lte
            - gt
            - gte
          type: string
        value:
          oneOf:
            - format: double
              type: number
            - items:
                format: double
                type: number
              minItems: 1
              type: array
      required:
        - field
        - operator
        - value
      type: object
    UserProfileAddressCondition:
      description: inCohort/notInCohort take cohort ids instead of addresses.
      properties:
        field:
          enum:
            - userId
          type: string
        operator:
          enum:
            - in
            - notIn
            - matches
            - notMatches
            - inCohort
            - notInCohort
          type: string
        value:
          oneOf:
            - type: string
            - items:
                type: string
              minItems: 1
              type: array
      required:
        - field
        - operator
        - value
      type: object
    UserProfileDurationCondition:
      properties:
        field:
          enum:
            - duration
          type: string
        operator:
          enum:
            - in
            - notIn
            - matches
            - notMatches
          type: string
        value:
          oneOf:
            - enum:
                - 1D
                - 1W
                - 1M
                - 1Y
                - ALL
              type: string
            - items:
                enum:
                  - 1D
                  - 1W
                  - 1M
                  - 1Y
                  - ALL
                type: string
              minItems: 1
              type: array
      required:
        - field
        - operator
        - value
      type: object
    UserProfileFilterInnerGroup:
      description: >-
        A nested group. Its members must be conditions, which bounds grouping at
        two levels.
      properties:
        filters:
          items:
            $ref: '#/components/schemas/UserProfileCondition'
          minItems: 1
          type: array
        operator:
          enum:
            - AND
            - OR
          type: string
      required:
        - operator
        - filters
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: API key issued for programmatic access.
      in: header
      name: X-Api-Key
      type: apiKey
    BearerAuth:
      bearerFormat: JWT
      description: User access token.
      scheme: bearer
      type: http

````