API Reference
GET
/v1/positions Positions
获取组合净值、总盈亏与当前持仓列表。
Parameters
This endpoint has no path or query parameters.
Request body
This endpoint does not accept a JSON request body.
Responses
200 OK
400 Bad Request
401 Unauthorized
404 Not Found
502 Upstream Error
Examples
curl -X GET 'https://api.jd.io/v1/positions' \
-H 'Authorization: Bearer <USER_API_KEY>' {
"ok": true,
"data": {
"balanceUsdc": 10,
"portfolioValue": 10,
"totalPnl": 10,
"positions": [
{
"id": "<ID>",
"conditionId": "<CONDITIONID>",
"marketTitle": "<MARKET_ID>",
"marketSlug": "<MARKET_ID>",
"iconUrl": "<ICONURL>",
"outcome": "<OUTCOME>",
"shares": 10,
"avgPrice": 0.42,
"currentPrice": 0.42,
"value": 10,
"pnl": 10,
"pnlPercent": 12.5,
"negativeRisk": true,
"redeemable": true
}
]
}
}