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

# Get Wallet Trading Analysis

### Query details

This endpoint provides comprehensive trading analytics for a wallet including PnL analysis, win rate distributions, market cap distributions, and detailed trading statistics over a specified period.

| Parameter     | Required | Description                                                                                                                                    |
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `wallet`      | Yes      | Wallet address to analyze.                                                                                                                     |
| `blockchains` | No       | Comma-separated list of blockchain IDs (e.g., `"ethereum,base,solana:solana"`). If not provided, analysis will be performed across all chains. |
| `period`      | No       | Analysis period. Supported values: `1d`, `7d`, `30d`, `90d`. Default: `7d`.                                                                    |
| `from`        | No       | Start timestamp in milliseconds (alternative to `period`). Must be used with `to`.                                                             |
| `to`          | No       | End timestamp in milliseconds (alternative to `period`). Must be greater than `from`.                                                          |

### Step-by-Step Tutorial and Video Walkthrough

* Check out the guide: [Here](https://docs.mobula.io/guides/how-to-track-wallet-trading-performance-with-pnl-winrate)

***

### Response Structure

The endpoint returns comprehensive trading analytics including:

#### Win Rate Distribution

Distribution of trades by profit/loss percentage:

* `>500%`: Number of trades with over 500% profit
* `200%-500%`: Number of trades with 200-500% profit
* `50%-200%`: Number of trades with 50-200% profit
* `0%-50%`: Number of trades with 0-50% profit
* `-50%-0%`: Number of trades with 0-50% loss
* `<-50%`: Number of trades with over 50% loss

#### Market Cap Distribution

Distribution of traded tokens by market capitalization:

* `>1000M`: Number of tokens with market cap over \$1B
* `>100M`: Number of tokens with market cap $100M-$1B
* `10M-100M`: Number of tokens with market cap $10M-$100M
* `1M-10M`: Number of tokens with market cap $1M-$10M
* `100k-1M`: Number of tokens with market cap $100K-$1M
* `<100k`: Number of tokens with market cap under \$100K

#### Trading Statistics (`stat` object)

* `totalValue`: Current total portfolio value in USD
* `periodTotalPnlUSD`: Total PnL (realized + unrealized) for the period
* `periodRealizedPnlUSD`: Realized PnL for the period
* `periodRealizedRate`: Realized PnL rate (%)
* `periodActiveTokensCount`: Number of tokens traded during the period
* `periodWinCount`: Number of winning trades
* `periodVolumeBuy`: Total buy volume in USD
* `periodVolumeSell`: Total sell volume in USD
* `periodBuys`: Number of buy transactions
* `periodSells`: Number of sell transactions
* `periodBuyTokens`: Number of unique tokens bought
* `periodSellTokens`: Number of unique tokens sold
* `periodTradingTokens`: Number of unique tokens traded
* `holdingTokensCount`: Current number of tokens held
* `holdingDuration`: Average holding duration in days
* `tradingTimeFrames`: Number of trading sessions
* `winRealizedPnl`: Total realized profit from winning trades
* `winRealizedPnlRate`: Win rate percentage
* `nativeBalance`: Native token balance information
* `winToken`: Details of the most profitable token (if any)
* `fundingInfo`: Information about initial wallet funding

#### Period Timeframes

Array of daily PnL data points with:

* `date`: Date of the data point
* `realized`: Realized PnL for that day

#### Calendar Breakdown

Array of day-by-day breakdown entries with:

* `date`: Date of the entry
* `volumeBuy`: Buy volume for that day in USD
* `volumeSell`: Sell volume for that day in USD
* `totalVolume`: Total volume for that day in USD
* `buys`: Number of buy transactions
* `sells`: Number of sell transactions
* `realizedPnlUSD`: Realized PnL for that day in USD

#### Labels

Array of labels associated with the wallet (e.g., "Smart Money", "Early Adopter", etc.)

#### Wallet Metadata

Enriched wallet metadata (entity name, logo, labels) from known wallets database. `null` if not available.

#### Platform

Trading platform used by the wallet with full metadata (id, name, logo). `null` if not available.

***

### Usage Examples

* Analyze wallet trading performance over the last 7 days on Ethereum

```bash theme={null}
curl -X GET "https://api.mobula.io/api/2/wallet/analysis?wallet=0xBb7Ae0458b0dAe031460E6EE9f014b275db49f7f&blockchains=ethereum&period=7d"
```

* Analyze wallet across all chains for 30 days

```bash theme={null}
curl -X GET "https://api.mobula.io/api/2/wallet/analysis?wallet=0xBb7Ae0458b0dAe031460E6EE9f014b275db49f7f&period=30d"
```

* Get comprehensive 90-day trading analysis on Base

```bash theme={null}
curl -X GET "https://api.mobula.io/api/2/wallet/analysis?wallet=0x3406bf0fdf29c2928988a9420f4b320fe4eca538&blockchains=base&period=90d"
```

***

### Rate Limiting

This endpoint has a rate limit of **5 requests per minute** per API key due to the computational intensity of the analysis.

***

### Use Cases

* **Portfolio Performance Tracking**: Monitor trading performance and PnL over time
* **Wallet Scoring**: Score wallets based on trading metrics for smart money identification
* **Risk Analysis**: Analyze trading patterns and risk distribution
* **Trading Strategy Analysis**: Understand trading behavior and token preferences
* **Due Diligence**: Research wallet trading history before following or copying trades


## OpenAPI

````yaml get /2/wallet/analysis
openapi: 3.0.0
info:
  version: 1.0.0
  title: Mobula API
  description: >-
    Documentation of the Mobula API


    **Demo API**: The default server (demo-api.mobula.io) is a demo API with
    rate limits.

    For production use, please use api.mobula.io with an API key from
    https://admin.mobula.io
servers:
  - url: https://demo-api.mobula.io/api/
    description: Demo API (rate limited, for testing only)
  - url: https://api.mobula.io/api/
    description: Production API (requires API key)
security: []
tags:
  - name: V2 - Token
    description: Token details, price, security, ATH, and holder data
  - name: V2 - Market Data
    description: Market details, OHLCV history, and lighthouse metrics
  - name: V2 - Trades
    description: Token trades, enriched trades, and trade filters
  - name: V2 - Wallet
    description: Wallet positions, activity, trades, analysis, and labels
  - name: V2 - Assets
    description: Cross-chain asset details and price history
  - name: V2 - Swap
    description: Swap quoting and execution
  - name: V2 - Perps
    description: Perpetual futures quoting, execution, and positions
  - name: V2 - Bridge
    description: Cross-chain bridge quoting and intent status (Alpha Preview)
  - name: V2 - DeFi
    description: Bonding pools and pulse data
  - name: V2 - Search
    description: Universal fast search
  - name: V2 - Usage
    description: Per-key API and WebSocket usage history
  - name: V2 - Blockchains
    description: System metadata and chain listings
  - name: V2 - Prediction Markets
    description: >-
      Polymarket markets/events, wallet positions, and the full execution stack
      (auth, order build/submit/cancel, approvals, pUSD wrap/unwrap, deploy,
      deposit/withdraw, redeem). Alpha — see /api/2/pm/*.
  - name: V1 - Market Data
    description: Market prices, history, sparklines, pairs, and multi-data
  - name: V1 - Wallet
    description: Wallet portfolio, transactions, history, and NFTs
  - name: V1 - Token
    description: First buyers
  - name: V1 - Trades
    description: Market trades by pair
  - name: V1 - Metadata
    description: Token metadata, categories, trendings, and news
  - name: V1 - Assets
    description: List all assets
  - name: V1 - Search
    description: Search for assets, tokens, and pairs
  - name: V1 - DeFi
    description: Bonding pool pulse data
  - name: V1 - Blockchains
    description: Blockchain listings, pairs, and stats
  - name: V1 - Webhooks
    description: Webhook management
  - name: V1 - Feed
    description: Custom feed creation
paths:
  /2/wallet/analysis:
    get:
      tags:
        - V2 - Wallet
      summary: Get wallet trading analysis
      parameters:
        - schema:
            type: string
            minLength: 1
            description: Wallet address to analyze
          required: true
          description: Wallet address to analyze
          name: wallet
          in: query
        - schema:
            type: string
          required: false
          name: chainId
          in: query
        - schema:
            type: string
            description: >-
              Comma-separated list of chain IDs (e.g.,
              "evm:1,evm:8453,solana:solana"). If omitted, all chains.
          required: false
          description: >-
            Comma-separated list of chain IDs (e.g.,
            "evm:1,evm:8453,solana:solana"). If omitted, all chains.
          name: chainIds
          in: query
        - schema:
            type: string
            description: 'Analysis period: 1d, 7d, 30d, or 90d (default: 7d)'
          required: false
          description: 'Analysis period: 1d, 7d, 30d, or 90d (default: 7d)'
          name: period
          in: query
        - schema:
            type: number
            nullable: true
            description: Start timestamp in milliseconds (alternative to period)
          required: false
          description: Start timestamp in milliseconds (alternative to period)
          name: from
          in: query
        - schema:
            type: number
            nullable: true
            description: End timestamp in milliseconds (alternative to period)
          required: false
          description: End timestamp in milliseconds (alternative to period)
          name: to
          in: query
        - schema:
            anyOf:
              - type: boolean
              - type: string
            description: >-
              When true, includes per-chain wallet analysis using the same stat
              shape as the top-level stat field.
          required: false
          description: >-
            When true, includes per-chain wallet analysis using the same stat
            shape as the top-level stat field.
          name: includeNetworkBreakdown
          in: query
      responses:
        '200':
          description: Wallet analysis response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      winRateDistribution:
                        type: object
                        properties:
                          '>500%':
                            type: number
                          200%-500%:
                            type: number
                          50%-200%:
                            type: number
                          0%-50%:
                            type: number
                          '-50%-0%':
                            type: number
                          <-50%:
                            type: number
                        required:
                          - '>500%'
                          - 200%-500%
                          - 50%-200%
                          - 0%-50%
                          - '-50%-0%'
                          - <-50%
                      marketCapDistribution:
                        type: object
                        properties:
                          '>1000M':
                            type: number
                          '>100M':
                            type: number
                          10M-100M:
                            type: number
                          1M-10M:
                            type: number
                          100k-1M:
                            type: number
                          <100k:
                            type: number
                        required:
                          - '>1000M'
                          - '>100M'
                          - 10M-100M
                          - 1M-10M
                          - 100k-1M
                          - <100k
                      periodTimeframes:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            realized:
                              type: number
                          required:
                            - date
                            - realized
                      calendarBreakdown:
                        type: array
                        items:
                          type: object
                          properties:
                            date:
                              type: string
                            volumeBuy:
                              type: number
                            volumeSell:
                              type: number
                            totalVolume:
                              type: number
                            buys:
                              type: number
                            sells:
                              type: number
                            realizedPnlUSD:
                              type: number
                          required:
                            - date
                            - volumeBuy
                            - volumeSell
                            - totalVolume
                            - buys
                            - sells
                            - realizedPnlUSD
                      stat:
                        type: object
                        properties:
                          totalValue:
                            type: number
                          periodTotalPnlUSD:
                            type: number
                          periodRealizedPnlUSD:
                            type: number
                          periodRealizedRate:
                            type: number
                          periodActiveTokensCount:
                            type: number
                          periodWinCount:
                            type: number
                          fundingInfo:
                            type: object
                            properties:
                              from:
                                type: string
                                nullable: true
                              date:
                                type: string
                                nullable: true
                              chainId:
                                type: string
                                nullable: true
                              txHash:
                                type: string
                                nullable: true
                              amount:
                                type: string
                                nullable: true
                              formattedAmount:
                                type: number
                                nullable: true
                              currency:
                                type: object
                                nullable: true
                                properties:
                                  name:
                                    type: string
                                  symbol:
                                    type: string
                                  logo:
                                    type: string
                                    nullable: true
                                  decimals:
                                    type: number
                                  address:
                                    type: string
                                required:
                                  - name
                                  - symbol
                                  - logo
                                  - decimals
                                  - address
                              fromWalletLogo:
                                type: string
                                nullable: true
                              fromWalletTag:
                                type: string
                                nullable: true
                              fromWalletMetadata:
                                type: object
                                nullable: true
                                properties:
                                  entityName:
                                    type: string
                                    nullable: true
                                  entityLogo:
                                    type: string
                                    nullable: true
                                  entityLabels:
                                    type: array
                                    items:
                                      type: string
                                  entityType:
                                    type: string
                                    nullable: true
                                  entityDescription:
                                    type: string
                                    nullable: true
                                  entityTwitter:
                                    type: string
                                    nullable: true
                                  entityWebsite:
                                    type: string
                                    nullable: true
                                  entityGithub:
                                    type: string
                                    nullable: true
                                  entityDiscord:
                                    type: string
                                    nullable: true
                                  entityTelegram:
                                    type: string
                                    nullable: true
                                  extra:
                                    type: object
                                    additionalProperties:
                                      nullable: true
                                required:
                                  - entityName
                                  - entityLogo
                                  - entityLabels
                                  - entityType
                                  - entityDescription
                                  - entityTwitter
                                  - entityWebsite
                                  - entityGithub
                                  - entityDiscord
                                  - entityTelegram
                            required:
                              - from
                              - date
                              - chainId
                              - txHash
                              - amount
                              - formattedAmount
                              - currency
                              - fromWalletLogo
                              - fromWalletTag
                          periodVolumeBuy:
                            type: number
                          periodVolumeSell:
                            type: number
                          periodBuys:
                            type: number
                          periodSells:
                            type: number
                          nativeBalance:
                            type: object
                            nullable: true
                            properties:
                              rawBalance:
                                type: string
                              formattedBalance:
                                type: number
                              assetId:
                                type: number
                                nullable: true
                              chainId:
                                type: string
                              address:
                                type: string
                              decimals:
                                type: number
                              name:
                                type: string
                              symbol:
                                type: string
                              logo:
                                type: string
                                nullable: true
                              price:
                                type: number
                              balanceUSD:
                                type: number
                            required:
                              - rawBalance
                              - formattedBalance
                              - assetId
                              - chainId
                              - address
                              - decimals
                              - name
                              - symbol
                              - logo
                              - price
                              - balanceUSD
                          periodBuyTokens:
                            type: number
                          periodSellTokens:
                            type: number
                          periodTradingTokens:
                            type: number
                          holdingTokensCount:
                            type: number
                          holdingDuration:
                            type: number
                          tradingTimeFrames:
                            type: number
                          winRealizedPnl:
                            type: number
                          winRealizedPnlRate:
                            type: number
                          winToken:
                            type: object
                            nullable: true
                            properties:
                              address:
                                type: string
                              chainId:
                                type: string
                              name:
                                type: string
                              symbol:
                                type: string
                              logo:
                                type: string
                                nullable: true
                              decimals:
                                type: number
                            required:
                              - address
                              - chainId
                              - name
                              - symbol
                              - logo
                              - decimals
                        required:
                          - totalValue
                          - periodTotalPnlUSD
                          - periodRealizedPnlUSD
                          - periodRealizedRate
                          - periodActiveTokensCount
                          - periodWinCount
                          - fundingInfo
                          - periodVolumeBuy
                          - periodVolumeSell
                          - periodBuys
                          - periodSells
                          - nativeBalance
                          - periodBuyTokens
                          - periodSellTokens
                          - periodTradingTokens
                          - holdingTokensCount
                          - holdingDuration
                          - tradingTimeFrames
                          - winRealizedPnl
                          - winRealizedPnlRate
                          - winToken
                      networkBreakdown:
                        type: array
                        items:
                          type: object
                          properties:
                            chainId:
                              type: string
                            networkId:
                              type: number
                              nullable: true
                            stat:
                              type: object
                              properties:
                                totalValue:
                                  type: number
                                periodTotalPnlUSD:
                                  type: number
                                periodRealizedPnlUSD:
                                  type: number
                                periodRealizedRate:
                                  type: number
                                periodActiveTokensCount:
                                  type: number
                                periodWinCount:
                                  type: number
                                fundingInfo:
                                  type: object
                                  properties:
                                    from:
                                      type: string
                                      nullable: true
                                    date:
                                      type: string
                                      nullable: true
                                    chainId:
                                      type: string
                                      nullable: true
                                    txHash:
                                      type: string
                                      nullable: true
                                    amount:
                                      type: string
                                      nullable: true
                                    formattedAmount:
                                      type: number
                                      nullable: true
                                    currency:
                                      type: object
                                      nullable: true
                                      properties:
                                        name:
                                          type: string
                                        symbol:
                                          type: string
                                        logo:
                                          type: string
                                          nullable: true
                                        decimals:
                                          type: number
                                        address:
                                          type: string
                                      required:
                                        - name
                                        - symbol
                                        - logo
                                        - decimals
                                        - address
                                    fromWalletLogo:
                                      type: string
                                      nullable: true
                                    fromWalletTag:
                                      type: string
                                      nullable: true
                                    fromWalletMetadata:
                                      type: object
                                      nullable: true
                                      properties:
                                        entityName:
                                          type: string
                                          nullable: true
                                        entityLogo:
                                          type: string
                                          nullable: true
                                        entityLabels:
                                          type: array
                                          items:
                                            type: string
                                        entityType:
                                          type: string
                                          nullable: true
                                        entityDescription:
                                          type: string
                                          nullable: true
                                        entityTwitter:
                                          type: string
                                          nullable: true
                                        entityWebsite:
                                          type: string
                                          nullable: true
                                        entityGithub:
                                          type: string
                                          nullable: true
                                        entityDiscord:
                                          type: string
                                          nullable: true
                                        entityTelegram:
                                          type: string
                                          nullable: true
                                        extra:
                                          type: object
                                          additionalProperties:
                                            nullable: true
                                      required:
                                        - entityName
                                        - entityLogo
                                        - entityLabels
                                        - entityType
                                        - entityDescription
                                        - entityTwitter
                                        - entityWebsite
                                        - entityGithub
                                        - entityDiscord
                                        - entityTelegram
                                  required:
                                    - from
                                    - date
                                    - chainId
                                    - txHash
                                    - amount
                                    - formattedAmount
                                    - currency
                                    - fromWalletLogo
                                    - fromWalletTag
                                periodVolumeBuy:
                                  type: number
                                periodVolumeSell:
                                  type: number
                                periodBuys:
                                  type: number
                                periodSells:
                                  type: number
                                nativeBalance:
                                  type: object
                                  nullable: true
                                  properties:
                                    rawBalance:
                                      type: string
                                    formattedBalance:
                                      type: number
                                    assetId:
                                      type: number
                                      nullable: true
                                    chainId:
                                      type: string
                                    address:
                                      type: string
                                    decimals:
                                      type: number
                                    name:
                                      type: string
                                    symbol:
                                      type: string
                                    logo:
                                      type: string
                                      nullable: true
                                    price:
                                      type: number
                                    balanceUSD:
                                      type: number
                                  required:
                                    - rawBalance
                                    - formattedBalance
                                    - assetId
                                    - chainId
                                    - address
                                    - decimals
                                    - name
                                    - symbol
                                    - logo
                                    - price
                                    - balanceUSD
                                periodBuyTokens:
                                  type: number
                                periodSellTokens:
                                  type: number
                                periodTradingTokens:
                                  type: number
                                holdingTokensCount:
                                  type: number
                                holdingDuration:
                                  type: number
                                tradingTimeFrames:
                                  type: number
                                winRealizedPnl:
                                  type: number
                                winRealizedPnlRate:
                                  type: number
                                winToken:
                                  type: object
                                  nullable: true
                                  properties:
                                    address:
                                      type: string
                                    chainId:
                                      type: string
                                    name:
                                      type: string
                                    symbol:
                                      type: string
                                    logo:
                                      type: string
                                      nullable: true
                                    decimals:
                                      type: number
                                  required:
                                    - address
                                    - chainId
                                    - name
                                    - symbol
                                    - logo
                                    - decimals
                              required:
                                - totalValue
                                - periodTotalPnlUSD
                                - periodRealizedPnlUSD
                                - periodRealizedRate
                                - periodActiveTokensCount
                                - periodWinCount
                                - fundingInfo
                                - periodVolumeBuy
                                - periodVolumeSell
                                - periodBuys
                                - periodSells
                                - nativeBalance
                                - periodBuyTokens
                                - periodSellTokens
                                - periodTradingTokens
                                - holdingTokensCount
                                - holdingDuration
                                - tradingTimeFrames
                                - winRealizedPnl
                                - winRealizedPnlRate
                                - winToken
                          required:
                            - chainId
                            - networkId
                            - stat
                      labels:
                        type: array
                        items:
                          type: string
                      walletMetadata:
                        type: object
                        nullable: true
                        properties:
                          entityName:
                            type: string
                            nullable: true
                          entityLogo:
                            type: string
                            nullable: true
                          entityLabels:
                            type: array
                            items:
                              type: string
                          entityType:
                            type: string
                            nullable: true
                          entityDescription:
                            type: string
                            nullable: true
                          entityTwitter:
                            type: string
                            nullable: true
                          entityWebsite:
                            type: string
                            nullable: true
                          entityGithub:
                            type: string
                            nullable: true
                          entityDiscord:
                            type: string
                            nullable: true
                          entityTelegram:
                            type: string
                            nullable: true
                          extra:
                            type: object
                            additionalProperties:
                              nullable: true
                        required:
                          - entityName
                          - entityLogo
                          - entityLabels
                          - entityType
                          - entityDescription
                          - entityTwitter
                          - entityWebsite
                          - entityGithub
                          - entityDiscord
                          - entityTelegram
                      platform:
                        type: object
                        nullable: true
                        properties:
                          id:
                            type: string
                          name:
                            type: string
                          logo:
                            type: string
                            nullable: true
                        required:
                          - id
                          - name
                          - logo
                    required:
                      - winRateDistribution
                      - marketCapDistribution
                      - periodTimeframes
                      - calendarBreakdown
                      - stat
                      - labels
                      - walletMetadata
                      - platform
                required:
                  - data

````