Skip to main content
GET
/
v2
/
wallet
/
{chain}
/
{walletAddress}
/
pnl-by-token
Wallet - PnL By Token
curl --request GET \
  --url https://api.dex.chainstream.io/v2/wallet/{chain}/{walletAddress}/pnl-by-token \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "avgBuyPriceInUsd": "0.00003324391014165111",
      "avgProfitPerTradeInUsd": "3206068.5728287027967835484926836364",
      "avgSellPriceInUsd": "0.00003185807445122603",
      "balance": "1254982158.7106050000000000",
      "buyAmount": "1457986404.2130240000000000",
      "buyAmountInUsd": "48469.1690094067802589",
      "buys": "275",
      "currentValue": "1062513957.429816153652557077014",
      "priceInUsd": "0.8466367032033868",
      "realizedProfitInUsd": "67.1297848453256596",
      "realizedProfitRatio": "0.00138499970635554473",
      "sellAmount": "203004245.5024190000000000",
      "sellAmountInUsd": "6467.3243671310312402",
      "sells": "110",
      "tokenAddress": "4MbgMQGvXBWyxKsTfrvkcRgh5FNLg1VxLnzWqbsdPh7p",
      "totalProfitInUsd": "1234336400.539050576761666169683200000000",
      "totalProfitRatio": "25466.423827061972608618047859693225",
      "totalTrades": "385",
      "unrealizedProfitInUsd": "1234336333.409265731436006569683200000000",
      "unrealizedProfitRatio": "25466.422442062266253073315832775971",
      "walletAddress": "54Pz1e35z9uoFdnxtzjp7xZQoFiofqhdayQWBMN7dsuy",
      "decimals": 6,
      "logoUri": "https://s1.chainstream.io/tokens/images/example.webp",
      "name": "The Real World",
      "symbol": "TRW"
    }
  ],
  "summary": {
    "avgProfitPerTradeInUsd": "3206068.5728287027967835484926836364",
    "buyAmountInUsd": "48469.1690094067802589",
    "buys": "275",
    "currentValue": "1062513957.429816153652557077014",
    "losses": "69",
    "realizedProfitInUsd": "67.1297848453256596",
    "realizedProfitRatio": "0.0013849997063555447320269173",
    "sellAmountInUsd": "6467.3243671310312402",
    "sells": "110",
    "tokens": "1",
    "totalCostInUsd": "48469.1690094067802589",
    "totalProfitInUsd": "1234336400.5390505767616661696832",
    "totalTrades": "385",
    "unrealizedProfitInUsd": "1234336333.4092657314360065696832",
    "winRate": "0.5688",
    "wins": "91"
  },
  "endCursor": "eyJpZCI6ImVuZCJ9",
  "hasNext": false,
  "hasPrev": false,
  "startCursor": "eyJpZCI6InN0YXJ0In0="
}

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 Supported blockchain chains

Available options:
sol,
eth,
bsc
walletAddress
string
required

An address of a wallet

Query Parameters

tokenAddresses
string
required

A list of token addresses in string separated by commas (,). Maximum 100 token addresses allowed

Response

200 - application/json

Successful response

Full PnL details result with cursor pagination.

data
object[]
required
summary
object
required

Aggregated PnL summary across all items (mirrors TS PnlDetailSummaryDTO).

endCursor
string | null
Example:

"eyJpZCI6ImVuZCJ9"

hasNext
boolean
Example:

false

hasPrev
boolean
Example:

false

startCursor
string | null
Example:

"eyJpZCI6InN0YXJ0In0="