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

# Search Profiles

> Filter, query, and sort wallet profiles based on specified metrics and conditions.



## OpenAPI

````yaml post /v1/solana/dex/profiles/wallets/search-profiles
openapi: 3.1.0
info:
  version: 1.0.1
  title: Prism API v1
servers:
  - url: https://refract.prismapi.io
    x-fern-server-name: production
security: []
paths:
  /v1/solana/dex/profiles/wallets/search-profiles:
    post:
      tags:
        - Solana DEX
      summary: Search Profiles
      description: >-
        Filter, query, and sort wallet profiles based on specified metrics and
        conditions.
      operationId: searchWalletProfiles
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    query:
                      $ref: >-
                        #/components/schemas/SolanaDexWalletProfileSearchPayloadQuery
                    filter:
                      $ref: '#/components/schemas/SolanaDexProfileSearchPayloadFilter'
                    sort:
                      $ref: '#/components/schemas/SolanaDexProfileSearchPayloadSort'
                    dynamic_labels:
                      $ref: >-
                        #/components/schemas/SolanaDexProfileSearchPayloadDynamicLabels
                    options:
                      $ref: >-
                        #/components/schemas/SolanaDexWalletProfilePayloadOptions
                - $ref: '#/components/schemas/PayloadPagination'
            examples:
              default:
                value:
                  query:
                    text: cupsey
                    fields:
                      - identity.name
                  filter:
                    metrics.7d.cumulative_pnl:
                      $gt: 65000
                      $lt: 100000
                  options:
                    include_metadata: true
                    include_labels: true
                    include_metrics:
                      - 7d
                  sort:
                    field: metrics.7d.cumulative_pnl
                    direction: desc
                  dynamic_labels:
                    smart:
                      metrics.30d.winrate:
                        $gt: 70
                  limit: 10
      responses:
        '200':
          description: List of wallet profiles found from the search.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PaginatedResponse'
                  - type: object
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/SolanaDexWalletProfile'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - HttpApiKeyAuth: []
components:
  schemas:
    SolanaDexWalletProfileSearchPayloadQuery:
      x-fern-type-name: SolanaDexWalletProfileSearchPayloadQuery
      allOf:
        - $ref: '#/components/schemas/SolanaDexProfileSearchPayloadQuery'
        - type: object
          properties:
            fields:
              type: array
              description: >-
                Wallet profile fields that the text value should be matched
                against.
              items:
                $ref: >-
                  #/components/schemas/SolanaDexWalletProfileSearchPayloadQueryTargetsEnum
    SolanaDexProfileSearchPayloadFilter:
      x-fern-type-name: SolanaDexProfileSearchPayloadFilter
      type: object
      description: >
        Conditions that a profile must satisfy to be included in the results.

        Each key is either a field path paired with comparison operators, or a
        logical operator (`$and`, `$or`) that combines nested filter objects.
      properties:
        $and:
          type: array
          description: Logical AND. A profile must satisfy every nested filter to match.
          items:
            $ref: '#/components/schemas/SolanaDexProfileSearchPayloadFilter'
        $or:
          type: array
          description: >-
            Logical OR. A profile must satisfy at least one nested filter to
            match.
          items:
            $ref: '#/components/schemas/SolanaDexProfileSearchPayloadFilter'
      additionalProperties:
        $ref: '#/components/schemas/SolanaDexProfileSearchPayloadFilterOperators'
      example:
        $or:
          - metrics.7d.cumulative_pnl:
              $gt: 65000
              $lt: 100000
          - metrics.30d.max_drawdown:
              $lt: 20
    SolanaDexProfileSearchPayloadSort:
      x-fern-type-name: SolanaDexProfileSearchPayloadSort
      type: object
      description: Rule that determines the order in which matching profiles are returned.
      required:
        - field
        - direction
      properties:
        field:
          type: string
          description: Field path to sort results by.
        direction:
          $ref: '#/components/schemas/SolanaDexProfileSearchPayloadSortDirectionEnum'
    SolanaDexProfileSearchPayloadDynamicLabels:
      x-fern-type-name: SolanaDexProfileSearchPayloadDynamicLabels
      type: object
      description: >
        Map of custom label names to filter rules.

        Each returned profile is tagged with a label when its data satisfies the
        corresponding filter, allowing you to annotate results with ad-hoc
        categories defined at query time.
      additionalProperties:
        $ref: '#/components/schemas/SolanaDexProfileSearchPayloadFilter'
      example:
        smart:
          metrics.30d.winrate:
            $gt: 70
    SolanaDexWalletProfilePayloadOptions:
      x-fern-type-name: SolanaDexWalletProfilePayloadOptions
      type: object
      description: >-
        Controls which optional sections are included in each returned wallet
        profile.
      properties:
        include_metadata:
          type: boolean
          description: When true, includes the `metadata` object in each returned profile.
        include_identity:
          type: boolean
          description: When true, includes the `identity` object in each returned profile.
        include_labels:
          type: boolean
          description: When true, includes the `labels` array in each returned profile.
        include_metrics:
          type: array
          description: >-
            Time windows for which metrics should be included. Windows not
            listed are omitted from the response.
          items:
            $ref: '#/components/schemas/SolanaDexWalletProfileTimeWindowEnum'
    PayloadPagination:
      type: object
      properties:
        limit:
          type: integer
          description: Maximum number of results to return in a single page.
          minimum: 1
          maximum: 100
          default: 20
        cursor:
          type: string
          description: >-
            Opaque cursor returned by a previous response. Pass it to fetch the
            next page of results.
    PaginatedResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total number of matching items
        cursor:
          type: string
          description: Cursor for pagination
    SolanaDexWalletProfile:
      x-fern-type-name: SolanaDexWalletProfile
      type: object
      properties:
        updated_at:
          type: string
          format: date-time
        synced_at:
          type: string
          format: date-time
        wallet_address:
          type: string
        labels:
          $ref: '#/components/schemas/SolanaDexWalletProfileLabels'
        matched_labels:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        dynamic_labels:
          $ref: '#/components/schemas/SolanaDexProfileDynamicLabels'
        metadata:
          $ref: '#/components/schemas/SolanaDexWalletProfileMetadata'
        identity:
          $ref: '#/components/schemas/SolanaDexWalletProfileIdentity'
        metrics:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SolanaDexWalletProfileMetrics'
    SolanaDexProfileSearchPayloadQuery:
      x-fern-type-name: SolanaDexProfileSearchPayloadQuery
      type: object
      description: >-
        Full-text query used to match profiles by a text value against one or
        more fields.
      required:
        - text
        - fields
      properties:
        text:
          type: string
          description: Text value to match against the selected fields.
        fields:
          type: array
          description: Fields that the text value should be matched against.
          items:
            type: string
        fuzzy:
          type: boolean
          description: >-
            When true, matches values that are approximately similar to `text`,
            allowing for minor typos and variations.
          default: false
        autocomplete:
          type: boolean
          description: >-
            When true, matches values that start with `text`, useful for
            type-ahead lookups.
          default: false
    SolanaDexWalletProfileSearchPayloadQueryTargetsEnum:
      x-fern-type-name: SolanaDexWalletProfileSearchPayloadQueryTargetsEnum
      type: string
      enum:
        - wallet_address
        - identity.name
        - identity.twitter_username
        - identity.telegram_username
    SolanaDexProfileSearchPayloadFilterOperators:
      x-fern-type-name: SolanaDexProfileSearchPayloadFilterOperators
      type: object
      description: >-
        Comparison operators applied to a single field. At least one operator
        must be provided.
      properties:
        $eq:
          description: Equal to.
          oneOf:
            - type: string
            - type: number
            - type: boolean
        $ne:
          description: Not equal to.
          oneOf:
            - type: string
            - type: number
            - type: boolean
        $gt:
          type: number
          description: Greater than.
        $lt:
          type: number
          description: Less than.
        $gte:
          type: number
          description: Greater than or equal to.
        $lte:
          type: number
          description: Less than or equal to.
        $in:
          type: array
          description: In the list.
          items:
            oneOf:
              - type: string
              - type: number
          minItems: 1
        $nin:
          type: array
          description: Not in the list.
          items:
            oneOf:
              - type: string
              - type: number
          minItems: 1
      additionalProperties: false
      minProperties: 1
    SolanaDexProfileSearchPayloadSortDirectionEnum:
      x-fern-type-name: SolanaDexProfileSearchPayloadSortDirectionEnum
      type: string
      description: Direction to sort results in.
      enum:
        - asc
        - desc
    SolanaDexWalletProfileTimeWindowEnum:
      x-fern-type-name: SolanaDexWalletProfileTimeWindowEnum
      type: string
      enum:
        - 30d
        - 14d
        - 7d
        - 3d
        - 1d
      x-fern-enum:
        30d:
          name: Window30d
        14d:
          name: Window14d
        7d:
          name: Window7d
        3d:
          name: Window3d
        1d:
          name: Window1d
    SolanaDexWalletProfileLabels:
      x-fern-type-name: SolanaDexWalletProfileLabels
      type: array
      items:
        $ref: '#/components/schemas/SolanaDexWalletProfileLabelEnum'
    SolanaDexProfileDynamicLabels:
      x-fern-type-name: SolanaDexProfileDynamicLabels
      type: array
      items:
        type: string
    SolanaDexWalletProfileMetadata:
      x-fern-type-name: SolanaDexWalletProfileMetadata
      type: object
      properties:
        last_trade_at:
          type: string
          format: date-time
    SolanaDexWalletProfileIdentity:
      x-fern-type-name: SolanaDexWalletProfileIdentity
      type: object
      properties:
        name:
          type: string
        twitter_username:
          type: string
        telegram_username:
          type: string
    SolanaDexWalletProfileMetrics:
      x-fern-type-name: SolanaDexWalletProfileMetrics
      type: object
      properties:
        risk_score:
          type: number
        consistency_score:
          type: number
        largest_win:
          type: number
        largest_loss:
          type: number
        max_consecutive_wins:
          type: integer
        max_consecutive_losses:
          type: integer
        avg_buy_size:
          type: number
        avg_sell_size:
          type: number
        avg_buy_mcap:
          type: number
        avg_sell_mcap:
          type: number
        avg_daily_pnl:
          type: number
        avg_daily_roi:
          type: number
        avg_daily_trade_count:
          type: integer
        avg_daily_traded_tokens:
          type: integer
        avg_daily_volume:
          type: number
        avg_holding_duration:
          type: integer
        avg_trade_delta:
          type: integer
        avg_pnl:
          type: number
        avg_roi:
          type: number
        avg_token_pnl:
          type: number
        avg_token_roi:
          type: number
        token_roi_distribution:
          type: object
          additionalProperties:
            type: integer
        trade_count:
          type: integer
        buy_count:
          type: integer
        sell_count:
          type: integer
        position_count:
          type: integer
        win_count:
          type: integer
        loss_count:
          type: integer
        pnl:
          type: number
        win_pnl:
          type: number
        loss_pnl:
          type: number
        volume:
          type: number
        buy_volume:
          type: number
        sell_volume:
          type: number
        winrate:
          type: number
        volume_weighted_winrate:
          type: number
        roi:
          type: number
        volume_weighted_roi:
          type: number
        time_weighted_roi:
          type: number
        pnl_volume_ratio:
          type: number
        token_hit_ratio:
          type: number
        win_loss_size_ratio:
          type: number
        profit_factor:
          type: number
        profit_expectancy:
          type: number
        recovery_factor:
          type: number
        winrate_stability:
          type: number
        winrate_volatility:
          type: number
        pnl_stability:
          type: number
        pnl_volatility:
          type: number
        roi_stability:
          type: number
        roi_volatility:
          type: number
        sharpe_ratio:
          type: number
        sortino_ratio:
          type: number
        max_drawdown:
          type: number
        risk_of_ruin:
          type: number
        turnover:
          type: number
    SolanaDexWalletProfileLabelEnum:
      x-fern-type-name: SolanaDexWalletProfileLabelEnum
      type: string
      enum:
        - kol
        - trencher
        - conviction
        - smart
        - whale
        - degen
        - sniper
        - swing
        - holder
  responses:
    BadRequest:
      description: 'Bad request: Invalid request parameters'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: 'Bad request: Invalid request parameters'
    Unauthorized:
      description: 'Unauthorized: Invalid or missing API key'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: 'Unauthorized: Invalid or missing API key'
    Forbidden:
      description: 'Forbidden: Access denied for the current API plan'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: 'Forbidden: Access denied for the current API plan'
    TooManyRequests:
      description: 'Too many requests: Rate limit exceeded'
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: 'Too many requests: Rate limit exceeded'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Internal server error
  securitySchemes:
    HttpApiKeyAuth:
      type: apiKey
      name: x-api-key
      description: >-
        Your Prism API key. You can get one for free in the [Prism
        Dashboard](https://dashboard.prismapi.io).
      in: header

````