跳转到主要内容
POST
/
v2
/
wallet
/
{chain}
/
{walletAddress}
/
calculate-pnl
钱包 - 计算盈亏
curl --request POST \
  --url https://api.dex.chainstream.io/v2/wallet/{chain}/{walletAddress}/calculate-pnl \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tokenAddresses": [
    "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
    "So11111111111111111111111111111111111111112"
  ]
}
'
{
  "success": true
}

授权

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
必填

钱包地址

请求体

application/json
tokenAddresses
string[] | null
示例:
[
"6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"So11111111111111111111111111111111111111112"
]

响应

200 - application/json

成功响应

success
boolean
必填
示例:

true