---
title: "Get Pnl By Token"
method: POST
path: "/api/v1/developer/wallet/pnl-by-token"
tags: ["PNL", "DEVELOPER", "WALLET"]
---

# Get Pnl By Token

`POST /api/v1/developer/wallet/pnl-by-token`

## Request body

- PayloadAddressHoldingsByToken[] — Payload for PNL by token.
  - `chain` string, required — Lowercase chain name
  - `address` string, required — Wallet address
  - `token_address` string, required — Token contract address

## Response `200`

Successful Response

- ResponseEnvelopeUnionPnlByTokenPnlError
  - `data` union — Single item response data of type T
    - PnlByToken
      - `chain` string, required — Lowercase chain name
      - `address` string, required — Wallet address
      - `token_address` string, required — Token contract address
      - `current_tokens` string, required — Current token balance (native units)
      - `current_balance` CurrencyAmount, required
        - `currency` 'USD'
        - `amount` string, required — Value in the specified currency
      - `current_price` CurrencyAmount, required
        - `currency` 'USD'
        - `amount` string, required — Value in the specified currency
      - `unrealized_pnl` CurrencyAmount
        - `currency` 'USD'
        - `amount` string, required — Value in the specified currency
      - `realized_pnl` CurrencyAmount
        - `currency` 'USD'
        - `amount` string, required — Value in the specified currency
      - `average_cost` CurrencyAmount
        - `currency` 'USD'
        - `amount` string, required — Value in the specified currency
      - `unrealized_pnl_ratio_change` number, nullable — Unrealized PnL ratio change (decimal)
      - `attributes` TokenAttributes
        - `total_liquidity_usd` LiquidityResults
          - `amount` number, nullable — Liquidity amount (USD)
          - `details` string, nullable — Status when amount unavailable (e.g. LIQUIDITY_TOO_HIGH)
        - `price_diff_1d` number, nullable — Price change (USD) over last 24h
        - `price_diff_pct_1d` number, nullable — Price change (%) over last 24h
        - `price_diff_1h` number, nullable — Price change (USD) over last 1h
        - `price_diff_pct_1h` number, nullable — Price change (%) over last 1h
        - `total_supply` number, nullable — Total token supply
        - `fully_diluted_valuation_usd` number, nullable — Fully diluted valuation (USD)
        - `volume_1h` number, nullable — Trading volume over last 1h
        - `volume_1d` number, nullable — Trading volume over last 24h
        - `volume_usd_1h` number, nullable — Trading volume (USD) over last 1h
        - `volume_usd_1d` number, nullable — Trading volume (USD) over last 24h
        - `volume_24h` number, nullable — Trading volume over last 24h
        - `volume_usd_24h` number, nullable — Trading volume (USD) over last 24h
        - `trade_count_1h` integer, nullable — Trade count over last 1h
        - `trade_count_1d` integer, nullable — Trade count over last 24h
        - `all_time_high` number, nullable — All-time high price (USD)
        - `all_time_low` number, nullable — All-time low price (USD)
        - `image_url` string, nullable — Token logo URL
        - `token_creation_time` string, date-time, nullable — Token creation timestamp (UTC)
        - `holders_count` integer, nullable — Number of token holders
        - `stellar_fields` object, nullable — Stellar-specific metadata
      - `historical_breakdown` PnlDataPerTransaction[], nullable — Historical breakdown of the token transactions
        - `trade` Trade, required
          - `token_address` string, required — Token contract address
          - `token_amount` string, required — Amount of tokens traded (native units)
          - `token_price_usd` string, nullable, required — Token price at time of trade (USD)
          - `timestamp` string, date-time, required — Trade execution time (UTC)
        - `average_cost` CurrencyAmount, required
          - `currency` 'USD'
          - `amount` string, required — Value in the specified currency
        - `realized_pnl` CurrencyAmount, required
          - `currency` 'USD'
          - `amount` string, required — Value in the specified currency
    - PnlError
      - `chain` string, required — Lowercase chain name
      - `address` string, required — Wallet address
      - `message` string, required — Error description
  - `items` union[], nullable — Response items of type T
    - union
      - PnlByToken
        - `chain` string, required — Lowercase chain name
        - `address` string, required — Wallet address
        - `token_address` string, required — Token contract address
        - `current_tokens` string, required — Current token balance (native units)
        - `current_balance` CurrencyAmount, required
          - `currency` 'USD'
          - `amount` string, required — Value in the specified currency
        - `current_price` CurrencyAmount, required
          - `currency` 'USD'
          - `amount` string, required — Value in the specified currency
        - `unrealized_pnl` CurrencyAmount
          - `currency` 'USD'
          - `amount` string, required — Value in the specified currency
        - `realized_pnl` CurrencyAmount
          - `currency` 'USD'
          - `amount` string, required — Value in the specified currency
        - `average_cost` CurrencyAmount
          - `currency` 'USD'
          - `amount` string, required — Value in the specified currency
        - `unrealized_pnl_ratio_change` number, nullable — Unrealized PnL ratio change (decimal)
        - `attributes` TokenAttributes
          - `total_liquidity_usd` LiquidityResults
            - `amount` number, nullable — Liquidity amount (USD)
            - `details` string, nullable — Status when amount unavailable (e.g. LIQUIDITY_TOO_HIGH)
          - `price_diff_1d` number, nullable — Price change (USD) over last 24h
          - `price_diff_pct_1d` number, nullable — Price change (%) over last 24h
          - `price_diff_1h` number, nullable — Price change (USD) over last 1h
          - `price_diff_pct_1h` number, nullable — Price change (%) over last 1h
          - `total_supply` number, nullable — Total token supply
          - `fully_diluted_valuation_usd` number, nullable — Fully diluted valuation (USD)
          - `volume_1h` number, nullable — Trading volume over last 1h
          - `volume_1d` number, nullable — Trading volume over last 24h
          - `volume_usd_1h` number, nullable — Trading volume (USD) over last 1h
          - `volume_usd_1d` number, nullable — Trading volume (USD) over last 24h
          - `volume_24h` number, nullable — Trading volume over last 24h
          - `volume_usd_24h` number, nullable — Trading volume (USD) over last 24h
          - `trade_count_1h` integer, nullable — Trade count over last 1h
          - `trade_count_1d` integer, nullable — Trade count over last 24h
          - `all_time_high` number, nullable — All-time high price (USD)
          - `all_time_low` number, nullable — All-time low price (USD)
          - `image_url` string, nullable — Token logo URL
          - `token_creation_time` string, date-time, nullable — Token creation timestamp (UTC)
          - `holders_count` integer, nullable — Number of token holders
          - `stellar_fields` object, nullable — Stellar-specific metadata
        - `historical_breakdown` PnlDataPerTransaction[], nullable — Historical breakdown of the token transactions
          - `trade` Trade, required
            - `token_address` string, required — Token contract address
            - `token_amount` string, required — Amount of tokens traded (native units)
            - `token_price_usd` string, nullable, required — Token price at time of trade (USD)
            - `timestamp` string, date-time, required — Trade execution time (UTC)
          - `average_cost` CurrencyAmount, required
            - `currency` 'USD'
            - `amount` string, required — Value in the specified currency
          - `realized_pnl` CurrencyAmount, required
            - `currency` 'USD'
            - `amount` string, required — Value in the specified currency
      - PnlError
        - `chain` string, required — Lowercase chain name
        - `address` string, required — Wallet address
        - `message` string, required — Error description
  - `error` string, nullable — Error message
  - `cursor` string, nullable — Pagination cursor for next page

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/allium/apis/allium-account-api.md) · [All operations](https://skmtc.net/allium/apis/allium-account-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/allium/allium-account-api/versions/6c79c032c85d/schema)
