# Get wallet PnL (Premium)

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

GET https://api.g.alchemy.com/trading/v1/{apiKey}/premium/wallets/{address}/pnl

**Private preview:** Paths, parameters, response fields, and tier names are provisional.

**Compute units:** 1,400 (proposed; pending validation).

Measure realized profit or loss over the selected period. History is hourly for 1d and 7d, and daily for 30d and all. General and Premium use different methodologies and their numbers are not comparable.

Omit networks to combine all supported EVM networks. To query Solana, set networks to solana-mainnet alone. Do not mix Solana and EVM networks.

Each history point and the summary identify the combined networks in a networks array.

Reference: https://www.alchemy.com/docs/data/trading-api/endpoints/wallets/get-wallet-pnl-premium

## Path Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| apiKey | string | Yes |  |
| address | string | Yes |  |

## Query Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| networks | any | No | Networks to combine. Omit to combine all supported EVM networks. Request solana-mainnet on its own; do not combine Solana with EVM networks. |
| period | enum | No | Realized PnL measurement period. |

## Code Examples

### cURL

```bash
curl --request GET \
  --url https://api.g.alchemy.com/trading/v1/docs-demo/premium/wallets/0x7942262a7a5637e6eb0eec9b91b55ec232141f87/pnl
```

### JavaScript

```javascript
const options = {method: 'GET'};

fetch('https://api.g.alchemy.com/trading/v1/docs-demo/premium/wallets/0x7942262a7a5637e6eb0eec9b91b55ec232141f87/pnl', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.g.alchemy.com/trading/v1/docs-demo/premium/wallets/0x7942262a7a5637e6eb0eec9b91b55ec232141f87/pnl"

response = requests.get(url)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.g.alchemy.com/trading/v1/docs-demo/premium/wallets/0x7942262a7a5637e6eb0eec9b91b55ec232141f87/pnl"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.get("https://api.g.alchemy.com/trading/v1/docs-demo/premium/wallets/0x7942262a7a5637e6eb0eec9b91b55ec232141f87/pnl")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://api.g.alchemy.com/trading/v1/docs-demo/premium/wallets/0x7942262a7a5637e6eb0eec9b91b55ec232141f87/pnl");
var client = new RestClient(options);
var request = new RestRequest("");
var response = await client.GetAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /{apiKey}/premium/wallets/{address}/pnl
method: GET
operation:
  summary: Get wallet PnL (Premium)
  operationId: get-wallet-pnl-premium
  tags:
    - Wallets
  x-shape-pending: true
  description: |-
    **Private preview:** Paths, parameters, response fields, and tier names are provisional.

    **Compute units:** 1,400 (proposed; pending validation).

    Measure realized profit or loss over the selected period. History is hourly for 1d and 7d, and daily for 30d and all. General and Premium use different methodologies and their numbers are not comparable.

    Omit networks to combine all supported EVM networks. To query Solana, set networks to solana-mainnet alone. Do not mix Solana and EVM networks.

    Each history point and the summary identify the combined networks in a networks array.
  parameters:
    - name: apiKey
      in: path
      required: true
      schema:
        type: string
        default: docs-demo
        description: For higher throughput, [create your own API key](https://dashboard.alchemy.com/signup)
    - name: networks
      in: query
      required: false
      description: Networks to combine. Omit to combine all supported EVM networks. Request solana-mainnet on its own; do not combine Solana with EVM networks.
      schema:
        type: array
        minItems: 1
        uniqueItems: true
        items:
          type: string
          enum:
            - eth-mainnet
            - base-mainnet
            - arb-mainnet
            - bnb-mainnet
            - avax-mainnet
            - robinhood-mainnet
            - arc-mainnet
            - solana-mainnet
            - tempo-mainnet
            - hyperliquid-mainnet
        oneOf:
          - items:
              type: string
              enum:
                - eth-mainnet
                - base-mainnet
                - arb-mainnet
                - bnb-mainnet
                - avax-mainnet
                - robinhood-mainnet
                - arc-mainnet
                - tempo-mainnet
                - hyperliquid-mainnet
          - maxItems: 1
            items:
              type: string
              enum:
                - solana-mainnet
        x-shape-pending: true
      style: form
      explode: true
    - name: address
      in: path
      required: true
      schema:
        type: string
        description: Wallet address.
        x-shape-pending: true
      example: '0x7942262a7a5637e6eb0eec9b91b55ec232141f87'
    - name: period
      in: query
      schema:
        type: string
        enum:
          - 1d
          - 7d
          - 30d
          - all
        default: 30d
        x-shape-pending: true
      description: Realized PnL measurement period.
  responses:
    '200':
      description: Successful response.
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                x-shape-pending: true
                type: object
                properties:
                  history:
                    type: array
                    items:
                      type: object
                      properties:
                        timestamp:
                          type:
                            - string
                            - 'null'
                          format: date-time
                          description: ISO 8601 UTC timestamp; null means unknown.
                          x-shape-pending: true
                        realizedPnlUsd:
                          type:
                            - string
                            - 'null'
                          pattern: ^-?[0-9]+(\.[0-9]+)?$
                          description: Realized profit or loss in this interval, in USD. Decimal string; null means unknown.
                          x-shape-pending: true
                        trades:
                          type: integer
                          minimum: 0
                          description: Number of trades in this interval.
                          x-shape-pending: true
                        networks:
                          type: array
                          minItems: 1
                          uniqueItems: true
                          items:
                            type: string
                            enum:
                              - eth-mainnet
                              - base-mainnet
                              - arb-mainnet
                              - bnb-mainnet
                              - avax-mainnet
                              - robinhood-mainnet
                              - arc-mainnet
                              - solana-mainnet
                              - tempo-mainnet
                              - hyperliquid-mainnet
                          oneOf:
                            - items:
                                type: string
                                enum:
                                  - eth-mainnet
                                  - base-mainnet
                                  - arb-mainnet
                                  - bnb-mainnet
                                  - avax-mainnet
                                  - robinhood-mainnet
                                  - arc-mainnet
                                  - tempo-mainnet
                                  - hyperliquid-mainnet
                            - maxItems: 1
                              items:
                                type: string
                                enum:
                                  - solana-mainnet
                          x-shape-pending: true
                          description: Networks combined in this result. Solana is returned on its own.
                      required:
                        - networks
                        - timestamp
                        - realizedPnlUsd
                        - trades
                    x-shape-pending: true
                  summary:
                    x-shape-pending: true
                    type: object
                    properties:
                      realizedPnlUsd:
                        type:
                          - string
                          - 'null'
                        pattern: ^-?[0-9]+(\.[0-9]+)?$
                        description: Realized profit or loss over the selected period, in USD. Decimal string; null means unknown.
                        x-shape-pending: true
                      trades:
                        type: integer
                        minimum: 0
                        description: Number of trades.
                        x-shape-pending: true
                      wins:
                        type: integer
                        minimum: 0
                        description: Number of winning outcomes.
                        x-shape-pending: true
                      losses:
                        type: integer
                        minimum: 0
                        description: Number of losing outcomes.
                        x-shape-pending: true
                      winRate:
                        type: number
                        minimum: 0
                        maximum: 100
                        description: Win rate as a percentage.
                        x-shape-pending: true
                      networks:
                        type: array
                        minItems: 1
                        uniqueItems: true
                        items:
                          type: string
                          enum:
                            - eth-mainnet
                            - base-mainnet
                            - arb-mainnet
                            - bnb-mainnet
                            - avax-mainnet
                            - robinhood-mainnet
                            - arc-mainnet
                            - solana-mainnet
                            - tempo-mainnet
                            - hyperliquid-mainnet
                        oneOf:
                          - items:
                              type: string
                              enum:
                                - eth-mainnet
                                - base-mainnet
                                - arb-mainnet
                                - bnb-mainnet
                                - avax-mainnet
                                - robinhood-mainnet
                                - arc-mainnet
                                - tempo-mainnet
                                - hyperliquid-mainnet
                          - maxItems: 1
                            items:
                              type: string
                              enum:
                                - solana-mainnet
                        x-shape-pending: true
                        description: Networks combined in this result. Solana is returned on its own.
                    required:
                      - networks
                      - realizedPnlUsd
                      - trades
                      - wins
                      - losses
                      - winRate
                required:
                  - history
                  - summary
            required:
              - data
          example:
            data:
              history:
                - timestamp: '2026-10-04T00:00:00Z'
                  realizedPnlUsd: '-864.9089818330417'
                  trades: 5
                  networks:
                    - eth-mainnet
                - timestamp: '2026-10-05T00:00:00Z'
                  realizedPnlUsd: '-42.54051770975006'
                  trades: 1
                  networks:
                    - eth-mainnet
              summary:
                realizedPnlUsd: '-907.4494995427917'
                winRate: 25
                trades: 6
                wins: 1
                losses: 3
                networks:
                  - eth-mainnet
    '400':
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Invalid request parameters.
    '401':
      description: Invalid API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Invalid API key.
    '429':
      description: Request limit reached. Retry with backoff.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Request limit reached. Retry with backoff.
    '503':
      description: Data temporarily unavailable. Retry with backoff.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  message:
                    type: string
                    description: Detailed error message.
                    x-shape-pending: true
                required:
                  - message
                x-shape-pending: true
            required:
              - error
          example:
            error:
              message: Data temporarily unavailable. Retry with backoff.
```
