{"_id":"5787f613fa959e190001a6c5","version":{"_id":"563cc7119799fb0d00047688","__v":17,"project":"563cc7119799fb0d00047685","createdAt":"2015-11-06T15:28:17.683Z","releaseDate":"2015-11-06T15:28:17.683Z","categories":["563cc7129799fb0d00047689","566f37f37ffa002300c3cd5b","56914e9bd47b020d002225ac","5692b19ffe72e00d00e4f0a8","56940bc2d8c04d1700e5adb6","56940bc83e9d080d00f064f0","56951b2dfcb1032d0089df7a","569522aecaa32519009c410c","569523ce562335190016da97","569523fddcaf0d1700cb86bf","56980e4a8560a60d00e2c3c3","569921a41693520d002e1305","5699323b7465970d00650b82","569e6cc4fbee990d0072d927","56a2768a0aefae0d00b7fe66","5862e862b8b7fa23009665b7","592835c7bc8bca0f000cc9ff"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Model T","version_clean":"1.0.0","version":"1"},"__v":2,"parentDoc":null,"user":"563cc6fa8894d20d00014ea3","editedParams":true,"editedParams2":true,"project":"563cc7119799fb0d00047685","category":{"_id":"56914e9bd47b020d002225ac","__v":7,"pages":["5691500e3c4f510d00ec9baa","5691543972f2810d007e4cc1","5692a6d74c4d6d0d00f7cb4b","5694070ebcd0a90d0044d2a6","56952386fcb1032d0089df94","5695238fcaa32519009c4114","569923123da4370d009d20c9"],"project":"563cc7119799fb0d00047685","version":"563cc7119799fb0d00047688","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-09T18:16:59.760Z","from_sync":false,"order":1,"slug":"rest-api","title":"Accounts"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-07-14T20:29:07.554Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"name":"","code":"{\n  \"accountID\": \"cb260aca-2bb6-42f0-819e-4cafb17d3383.1465398654474\",\n  \"accountNo\": \"DWGW000003\",\n  \"lastUpdated\": \"2016-07-19T20:48:38.717Z\",\n  \"performance\": [\n    {\n      \"realizedDayPL\": 0,\n      \"unrealizedDayPL\": 36.38,\n      \"cumRealizedPL\": 0,\n      \"date\": \"2016-07-19\",\n      \"equity\": 4553.95\n    }\n  ]\n}","language":"json","status":200}]},"settings":"","examples":{"codes":[{"language":"http","code":"GET /v1/users/02e57c7d-d071-4c63-b491-1194a9939ea5/accountPerformance/02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456 HTTP/1.1\nHost: api.drivewealth.io\nAccept: application/json\nContent-Type: application/json\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-07-14T17:50:15.806Z\n","name":"Default (Current Trading Day)"},{"name":"1 Week","language":"http","code":"GET /v1/users/02e57c7d-d071-4c63-b491-1194a9939ea5/accountPerformance/02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456/history?period=1w HTTP/1.1\nHost: api.drivewealth.io\nAccept: application/json\nContent-Type: application/json\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-07-14T17:50:15.806Z\n"},{"name":"3 Months","language":"http","code":"GET /v1/users/02e57c7d-d071-4c63-b491-1194a9939ea5/accountPerformance/02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456/history?period=3m HTTP/1.1\nHost: api.drivewealth.io\nAccept: application/json\nContent-Type: application/json\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-07-14T17:50:15.806Z\n"},{"code":"GET /v1/users/02e57c7d-d071-4c63-b491-1194a9939ea5/accountPerformance/02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456/dateRange?startDate=20170101&endDate=20170110 HTTP/1.1\nHost: api.drivewealth.io\nAccept: application/json\nContent-Type: application/json\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-07-14T17:50:15.806Z","language":"http","name":"Specific Range - Jan 1 thru Jan 10"}]},"method":"get","auth":"required","params":[{"_id":"5787f613fa959e190001a6c8","ref":"","in":"path","required":true,"desc":"User ID","default":"02e57c7d-d071-4c63-b491-1194a9939ea5","type":"string","name":"userID"},{"_id":"5787f613fa959e190001a6c7","ref":"","in":"path","required":true,"desc":"Account ID","default":"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456","type":"string","name":"accountID"},{"_id":"5787f613fa959e190001a6c6","ref":"","in":"path","required":false,"desc":"Used for specific date range, accepts a start and end date. See `startDate` and `endDate` query params for usage.","default":"","type":"string","name":"dateRange"},{"_id":"58755027d8906c0f00d2b19c","ref":"","in":"path","required":false,"desc":"Used for relative date range, accepts a number and a unit of time. See `period` query param for usage.","default":"","type":"string","name":"history"},{"_id":"58755027d8906c0f00d2b19b","ref":"","in":"query","required":false,"desc":"Start date","default":"YYYYMMDD","type":"string","name":"startDate"},{"_id":"58755027d8906c0f00d2b19a","ref":"","in":"query","required":false,"desc":"End date","default":"YYYYMMDD","type":"string","name":"endDate"},{"_id":"58755027d8906c0f00d2b199","ref":"","in":"query","required":false,"desc":"Relative date range. Accepts a number and a unit of time.<br>E.g.<br />• `3d` - 3 Days<br />• `2w` - 2 Weeks<br />• `1m` - 1 month","default":"","type":"string","name":"period"}],"url":"/users/:userID/accountPerformance/:accountID/"},"isReference":true,"order":1,"body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Accounts Created Before 3/1/2016\",\n  \"body\": \"Please note that this service only has account performance from 3/1/2016 onwards. Accounts created after this date will have performance records since account inception.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"`accountID`\",\n    \"0-1\": \"Account ID\",\n    \"1-0\": \"`accountNo`\",\n    \"1-1\": \"Account Number\",\n    \"2-0\": \"`lastUpdated`\",\n    \"2-1\": \"Timestamp of most recent update\",\n    \"3-0\": \"`performance []`\",\n    \"3-1\": \"Array of daily performance objects\",\n    \"4-0\": \"`performance.realizedDayPL`\",\n    \"4-1\": \"Realized PL for this day (see `performance.date`)\",\n    \"5-0\": \"`performance.unrealizedDayPL`\",\n    \"5-1\": \"Unrealized PL for this day (see `performance.date`)\",\n    \"6-0\": \"`performance.cumRealizedPL`\",\n    \"6-1\": \"Cumulative realized PL for this account since inception.\",\n    \"7-0\": \"`performance.date`\",\n    \"7-1\": \"Date of object\",\n    \"8-0\": \"`performance.equity`\",\n    \"8-1\": \"Total equity for this day (see `performance.date`)\"\n  },\n  \"cols\": 2,\n  \"rows\": 9\n}\n[/block]","excerpt":"Provides daily realized and unrealized PL for a specific account","slug":"account-performance","type":"endpoint","title":"Account Performance"}

getAccount Performance

Provides daily realized and unrealized PL for a specific account

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

userID:
required
string02e57c7d-d071-4c63-b491-1194a9939ea5
User ID
accountID:
required
string02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456
Account ID
dateRange:
string
Used for specific date range, accepts a start and end date. See `startDate` and `endDate` query params for usage.
history:
string
Used for relative date range, accepts a number and a unit of time. See `period` query param for usage.

Query Params

startDate:
stringYYYYMMDD
Start date
endDate:
stringYYYYMMDD
End date
period:
string
Relative date range. Accepts a number and a unit of time.<br>E.g.<br />• `3d` - 3 Days<br />• `2w` - 2 Weeks<br />• `1m` - 1 month

Examples


Result Format


Documentation

[block:callout] { "type": "info", "title": "Accounts Created Before 3/1/2016", "body": "Please note that this service only has account performance from 3/1/2016 onwards. Accounts created after this date will have performance records since account inception." } [/block] [block:api-header] { "type": "basic", "title": "Response" } [/block] [block:parameters] { "data": { "h-0": "Attribute", "h-1": "Description", "0-0": "`accountID`", "0-1": "Account ID", "1-0": "`accountNo`", "1-1": "Account Number", "2-0": "`lastUpdated`", "2-1": "Timestamp of most recent update", "3-0": "`performance []`", "3-1": "Array of daily performance objects", "4-0": "`performance.realizedDayPL`", "4-1": "Realized PL for this day (see `performance.date`)", "5-0": "`performance.unrealizedDayPL`", "5-1": "Unrealized PL for this day (see `performance.date`)", "6-0": "`performance.cumRealizedPL`", "6-1": "Cumulative realized PL for this account since inception.", "7-0": "`performance.date`", "7-1": "Date of object", "8-0": "`performance.equity`", "8-1": "Total equity for this day (see `performance.date`)" }, "cols": 2, "rows": 9 } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}