Skip to main content
GET
/
v1
/
wallet
/
{chain}
/
pnl-by-wallet
Wallet - PnL By Wallet
curl --request GET \
  --url https://api.chainstream.io/v1/wallet/{chain}/pnl-by-wallet \
  --header 'Authorization: Bearer <token>'
{
  "summary": {
    "tokens": "15322",
    "buys": "6546312",
    "sells": "4012013",
    "totalTrades": "10558325",
    "wins": "1999472",
    "losses": "1742452",
    "winRate": "0.5343",
    "buyAmountInUsd": "372090700.51",
    "sellAmountInUsd": "214526094.35",
    "totalCostInUsd": "372090700.51",
    "currentValue": "1397331840.48",
    "realizedProfitInUsd": "-2699411.26",
    "realizedProfitRatio": "-0.0072547130",
    "unrealizedProfitInUsd": "1397331840.48",
    "totalProfitInUsd": "1394632429.22",
    "avgProfitPerTradeInUsd": "132.09"
  },
  "data": [
    {
      "tokenAddress": "4MbgMQGvXBWyxKsTfrvkcRgh5FNLg1VxLnzWqbsdPh7p",
      "symbol": "SOL",
      "name": "Solana",
      "decimals": 9,
      "walletAddress": "54Pz1e35z9uoFdnxtzjp7xZQoFiofqhdayQWBMN7dsuy",
      "balance": "1254982158.71",
      "priceInUsd": "0.8466367032",
      "currentValue": "1062547123.45",
      "buys": "275",
      "sells": "110",
      "totalTrades": "385",
      "buyAmount": "1457986404.21",
      "sellAmount": "203004245.50",
      "buyAmountInUsd": "48469.17",
      "sellAmountInUsd": "6467.32",
      "avgBuyPriceInUsd": "0.0000332439",
      "avgSellPriceInUsd": "0.0000318580",
      "realizedProfitInUsd": "67.13",
      "realizedProfitRatio": "0.0013849997",
      "unrealizedProfitInUsd": "1234336333.41",
      "unrealizedProfitRatio": "25466.42",
      "totalProfitInUsd": "1234336400.54",
      "totalProfitRatio": "25466.42",
      "avgProfitPerTradeInUsd": "3205025.72",
      "logoUri": "https://..."
    }
  ],
  "hasNext": false,
  "hasPrev": false,
  "startCursor": "<string>",
  "endCursor": "<string>",
  "total": 0
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

chain
enum<string>
required

A chain name listed in supported networks

Available options:
sol,
bsc,
eth

Query Parameters

cursor
string

Pagination cursor

limit
integer<int64>
default:20

Number of results per page

Required range: 1 <= x <= 100
direction
enum<string>
default:next

Pagination direction (next or prev)

Available options:
next,
prev
walletAddresses
string
required

A list of wallet addresses in string separated by commas (,)

Example:

"54Pz1e35z9uoFdnxtzjp7xZQoFiofqhdayQWBMN7dsuy,HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K"

tokenAddress
string
required

An address of a token

Example:

"4MbgMQGvXBWyxKsTfrvkcRgh5FNLg1VxLnzWqbsdPh7p"

Response

200 - application/json
summary
object
required

PnL summary across all tokens

data
object[]
required

Array of data items

hasNext
boolean
default:false

Indicates if there are more results

hasPrev
boolean
default:false

Indicates if there are previous results

startCursor
string

Cursor for first item in current page

endCursor
string

Cursor for last item in current page

total
integer<int64>
default:0

Total number of items