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

授权

Authorization
string
header
必填

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

路径参数

chain
enum<string>
必填

支持网络中列出的区块链名称

可用选项:
sol,
base,
bsc,
polygon,
arbitrum,
optimism,
avalanche,
eth,
zksync,
sui
walletAddress
string
必填

钱包地址

示例:

"MJKqp326RZCHnAAbew9MDdui3iCKWco7fsK9sVuZTX2"

请求体

application/json
tokenAddresses
string[]

要计算盈亏的代币地址列表

示例:
[
"6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
"6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN"
]

响应

200 - application/json
success
boolean
必填

成功状态

示例:

true