跳转到主要内容
GET
/
v2
/
wallet
/
{chain}
/
{walletAddress}
/
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="
}

授权

Authorization
string
header
必填

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

路径参数

chain
enum<string>
必填

支持网络列表中的链名称 Supported blockchain chains

可用选项:
sol,
eth,
bsc
walletAddress
string
必填

钱包地址

查询参数

tokenAddresses
string
必填

代币地址列表,以逗号 (,) 分隔的字符串。最多允许 100 个代币地址

响应

200 - application/json

成功响应

Full PnL details result with cursor pagination.

data
object[]
必填
summary
object
必填

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

endCursor
string | null
示例:

"eyJpZCI6ImVuZCJ9"

hasNext
boolean
示例:

false

hasPrev
boolean
示例:

false

startCursor
string | null
示例:

"eyJpZCI6InN0YXJ0In0="