P&L trend
Description
Per-address cumulative and daily P&L for a token on a given chain and window.
Use cases
- Whale / smart-money performance
- Sentiment from large holder outcomes
Update: Daily
Endpoint
- Method:
POST - Path:
/open/v1/chain/trade/token/profitLossTrend
Credits
- Cost:
2
Prerequisites
vsTokenId —
POST /vs-token/listif missing
coinKey —
POST /vs-token/detail(chainAddresses)
address — user input or
POST /chain/trade/token/holdPage
Request body (JSON)
| Field | Type | Required | Description |
|---|---|---|---|
| vsTokenId | long | Yes | Token id |
| coinKey | string | Yes | e.g. BTC_BTC |
| address | string | Yes | Wallet |
| startTime | long | No | Start (ms) |
| endTime | long | Yes | End (ms) |
Response — data[]
| Field | Type | Serialized | Description |
|---|---|---|---|
| vsTokenId | long | string | Token id |
| symbol | string | string | Ticker |
| name | string | string | Name |
| date | long | long | Row time (ms) |
| total | number | string | Cumulative P&L |
| day | number | string | Daily P&L |
| price | number | string | Price |
Semantics
| Field | Meaning | Tip |
|---|---|---|
| total | Since position | Lifetime P&L |
| day | That day | + profit − loss |
Example
json
{
"vsTokenId": 1,
"coinKey": "BTC_BTC",
"address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6",
"endTime": 1773479265534
}cURL (Linux/macOS)
bash
curl --location --request POST 'http://${host}/api/open/v1/chain/trade/token/profitLossTrend' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: xxxxx' \
--header 'X-TIMESTAMP: xxxxx' \
--header 'X-SIGN: xxxxx' \
--header 'Accept: */*' \
--data-raw '{
"vsTokenId": 1,
"coinKey": "BTC_BTC",
"address": "3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6",
"endTime": 1773479265534
}'cURL (Windows CMD)
cmd
curl --location --request POST "http://${host}/api/open/v1/chain/trade/token/profitLossTrend" ^
--header "Content-Type: application/json" ^
--header "X-API-KEY: xxxxx" ^
--header "X-TIMESTAMP: xxxxx" ^
--header "X-SIGN: xxxxx" ^
--header "Accept: */*" ^
--data-raw "{ \"vsTokenId\": 1, \"coinKey\": \"BTC_BTC\", \"address\": \"3M219KR5vEneNb47ewrPfWyb5jQ2DjxRP6\", \"endTime\": 1773479265534}"Sample success
json
{
"code": 200,
"message": "success",
"data": [
{
"vsTokenId": "1",
"symbol": "BTC",
"name": "Bitcoin",
"date": 1542038400000,
"total": "0",
"day": "0",
"price": "6359.49"
}
],
"requestId": "xxx-xxx-xxx"
}