Get exact realised PnL
GET
/trade/v1/portfolio/pnl/realizedAuthorization
personal_access_token portfolio:readAuthorizationBearer <token>
Personal access token issued from the web app's Settings → API tokens page. Send as Authorization: Bearer agt_….
In: header
Scope: portfolio:read
Query Parameters
granularity*string
Required UTC bucket resolution. Use hour or day with fixed windows, and week with all.
Value in
- "hour"
- "day"
- "week"
window*string
Required UTC calendar window. Use 1d, 7d, or 30d with hour/day buckets, and all with week buckets.
Value in
- "1d"
- "7d"
- "30d"
- "all"
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X GET "https://example.com/trade/v1/portfolio/pnl/realized?granularity=hour&window=1d"{ "amountScale": 0, "asOf": "2019-08-24T14:15:22Z", "buckets": [ { "directMerges": "string", "redemptions": "string", "sales": "string", "timestamp": "2019-08-24T14:15:22Z", "total": "string" } ], "coverageStartedAt": "2019-08-24T14:15:22Z", "currency": "string", "currentBucketPartial": true, "granularity": "hour", "pendingOperations": 0, "reportingStartedAt": "2019-08-24T14:15:22Z", "throughEvent": { "eventSeq": "string", "shardId": 0 }, "timezone": "string", "totals": { "allTime": { "directMerges": "string", "redemptions": "string", "sales": "string", "total": "string" }, "last30Days": { "directMerges": "string", "redemptions": "string", "sales": "string", "total": "string" }, "last7Days": { "directMerges": "string", "redemptions": "string", "sales": "string", "total": "string" } }, "window": "1d"}