{"_id":"569801fc8d2a770d00d2fd34","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"},"project":"563cc7119799fb0d00047685","category":{"_id":"569523fddcaf0d1700cb86bf","pages":["5697d359d231880d00676f1d","5697d37a8d2a770d00d2fcdf","5697d392d231880d00676f1f","5697d3ce69393517000c8402","5697d3e0d231880d00676f21","5697e1f53503e40d0061f4b0","5697e538d231880d00676f4a","5697f5b42cf4060d004eaa80","5697fcd02cf4060d004eaaa0","569801fc8d2a770d00d2fd34","5698058f69393517000c8467","5698085bd231880d00676f9d"],"version":"563cc7119799fb0d00047688","__v":12,"project":"563cc7119799fb0d00047685","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-01-12T16:04:13.558Z","from_sync":false,"order":8,"slug":"reports","title":"Reports"},"parentDoc":null,"user":"56957802fe18811700c9c07e","__v":8,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-14T20:15:56.777Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"settings":"","examples":{"codes":[{"code":"","language":"text"}]},"method":"post","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":true,"order":2,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Definition\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"http://reports.drivewealth.io/DriveWealth\",\n      \"language\": \"http\",\n      \"name\": \" \"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Examples\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"POST /DriveWealth?sessionKey=02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z&ReportName=PositionRestingOrder&ReportFormat=JSON&AccountNumber=DWTE000005&wlpID=DW&LanguageID=en_US HTTP/1.1\\nHost: reports.drivewealth.io\\nAccept: application/json\\nContent-Type: application/json\\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z\",\n      \"language\": \"http\"\n    },\n    {\n      \"code\": \"curl -X POST -H \\\"Accept: application/json\\\" -H \\\"Content-Type: application/json\\\" -H \\\"x-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z\\\" -d '' 'http://reports.drivewealth.io/DriveWealth?sessionKey=02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z&ReportName=PositionRestingOrder&ReportFormat=JSON&AccountNumber=DWTE000005&wlpID=DW&LanguageID=en_US'\",\n      \"language\": \"curl\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request Arguments\"\n}\n[/block]\n\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Argument\",\n    \"h-1\": \"Example\",\n    \"h-2\": \"Description\",\n    \"0-0\": \"`ReportName`\",\n    \"0-1\": \"`\\\"PositionRestingOrder\\\"`\",\n    \"0-2\": \"Internal report variable.\",\n    \"h-3\": \"Required\",\n    \"0-3\": \"**Yes**\",\n    \"1-0\": \"`ReportFormat`\",\n    \"1-1\": \"`\\\"JSON\\\"`\",\n    \"1-2\": \"Report formats.<br />**Options**: `\\\"PDF\\\"`, `\\\"HTML\\\"`, `\\\"XLS\\\"` or `\\\"JSON\\\"`.\",\n    \"1-3\": \"**Yes**\",\n    \"2-3\": \"**Yes**\",\n    \"3-3\": \"**Yes**\",\n    \"4-3\": \"**No**\",\n    \"5-3\": \"**No**\",\n    \"2-0\": \"`sessionKey`\",\n    \"3-0\": \"`AccountNumber`\",\n    \"4-0\": \"`wlpID`\",\n    \"5-0\": \"`LanguageID`\",\n    \"2-1\": \"`\\\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.`<br />`YYYY-MM-DDTHH:MM:SS.SSSZ\\\"`\",\n    \"3-1\": \"`\\\"xxxxxxxxxx\\\"`\",\n    \"4-1\": \"`\\\"DW\\\"`\",\n    \"5-1\": \"`\\\"en_US\\\"`\",\n    \"2-2\": \"Session key.\",\n    \"3-2\": \"Account number.\",\n    \"4-2\": \"WLP ID.<br />Note: Default to `\\\"DW\\\"`.\",\n    \"5-2\": \"Language.<br />**Options**: `\\\"en_US\\\"` (Default), `\\\"zh_CN\\\"`, `\\\"es_ES\\\"`, `\\\"pt_BR\\\"` or `\\\"ja_JP\\\"`.\"\n  },\n  \"cols\": 4,\n  \"rows\": 6\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Result Format\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:textarea]\n{\n  \"text\": \"The response (using `ReportFormat` set to `JSON`) returns a single array.\",\n  \"sidebar\": true\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n    \\\"accountNo\\\": \\\"DWTE000005\\\",\\n    \\\"accountID\\\": \\\"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456\\\",\\n    \\\"accountType\\\": \\\"1\\\",\\n    \\\"positions\\\": [{\\n        \\\"costBasis\\\": 332.99,\\n        \\\"initQty\\\": 1.4105,\\n        \\\"side\\\": \\\"Buy\\\",\\n        \\\"openQty\\\": 1.4105,\\n        \\\"instrument\\\": {\\n            \\\"instrumentID\\\": \\\"063c3371-1b57-468c-a641-e2e1221bda10\\\",\\n            \\\"name\\\": \\\"Sherwin-Williams Company, The\\\",\\n            \\\"currencyID\\\": \\\"USD\\\",\\n            \\\"symbol\\\": \\\"SHW\\\",\\n            \\\"tradeStatus\\\": 1,\\n            \\\"sector\\\": \\\"Basic Materials\\\"\\n        },\\n        \\\"price\\\": 264.35,\\n        \\\"mtm\\\": 372.87,\\n        \\\"mtmPL\\\": 39.88\\n    }, {\\n        \\\"costBasis\\\": 25.02,\\n        \\\"initQty\\\": 3,\\n        \\\"side\\\": \\\"Buy\\\",\\n        \\\"openQty\\\": 3,\\n        \\\"instrument\\\": {\\n            \\\"instrumentID\\\": \\\"675cc7c2-e24b-42fa-9d1f-4b3a97ae8d2f\\\",\\n            \\\"name\\\": \\\"Aluminum Corporation Of China Limited\\\",\\n            \\\"currencyID\\\": \\\"USD\\\",\\n            \\\"symbol\\\": \\\"ACH\\\",\\n            \\\"tradeStatus\\\": 1,\\n            \\\"urlImage\\\": \\\"http://syscdn.drivewealth.net/images/symbols/ach.png\\\",\\n            \\\"sector\\\": \\\"Basic Materials\\\"\\n        },\\n        \\\"price\\\": 8.35,\\n        \\\"mtm\\\": 25.05,\\n        \\\"mtmPL\\\": 0.03\\n    }],\\n    \\\"orders\\\": [{\\n        \\\"orderID\\\": \\\"CK.49fa3d27-a5d4-4a2b-bc06-fb5bd7290c76\\\",\\n        \\\"orderNo\\\": \\\"CKEP000027\\\",\\n        \\\"cumQty\\\": 0,\\n        \\\"createdWhen\\\": \\\"2015-11-17T14:46:42.626Z\\\",\\n        \\\"grossTradeAmt\\\": 0,\\n        \\\"lastPx\\\": 0,\\n        \\\"lastQty\\\": 0,\\n        \\\"leavesQty\\\": 15,\\n        \\\"orderQty\\\": 15,\\n        \\\"ordStatus\\\": \\\"0\\\",\\n        \\\"ordType\\\": \\\"Stop\\\",\\n        \\\"price\\\": 100,\\n        \\\"side\\\": \\\"Sell\\\",\\n        \\\"autoStop\\\": 0,\\n        \\\"limitPrice\\\": 0,\\n        \\\"timeInForce\\\": \\\"1\\\",\\n        \\\"amountCash\\\": 0,\\n        \\\"instrument\\\": {\\n            \\\"instrumentID\\\": \\\"a67422af-8504-43df-9e63-7361eb0bd99e\\\",\\n            \\\"name\\\": \\\"Apple, Inc.\\\",\\n            \\\"currencyID\\\": \\\"USD\\\",\\n            \\\"symbol\\\": \\\"AAPL\\\",\\n            \\\"tradeStatus\\\": 1,\\n            \\\"urlImage\\\": \\\"http://syscdn.drivewealth.net/images/symbols/aapl.png\\\",\\n            \\\"sector\\\": \\\"Technology\\\"\\n        }\\n    }]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"200 OK\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]","excerpt":"Provides the user their current open positions and resting orders.","slug":"open-positions-and-resting-orders","type":"endpoint","title":"Open Positions and Resting Orders"}

postOpen Positions and Resting Orders

Provides the user their current open positions and resting orders.

[block:api-header] { "type": "basic", "title": "Definition", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "http://reports.drivewealth.io/DriveWealth", "language": "http", "name": " " } ], "sidebar": true } [/block] [block:api-header] { "type": "basic", "title": "Examples", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "POST /DriveWealth?sessionKey=02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z&ReportName=PositionRestingOrder&ReportFormat=JSON&AccountNumber=DWTE000005&wlpID=DW&LanguageID=en_US HTTP/1.1\nHost: reports.drivewealth.io\nAccept: application/json\nContent-Type: application/json\nx-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z", "language": "http" }, { "code": "curl -X POST -H \"Accept: application/json\" -H \"Content-Type: application/json\" -H \"x-mysolomeo-session-key: 02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z\" -d '' 'http://reports.drivewealth.io/DriveWealth?sessionKey=02e57c7d-d071-4c63-b491-1194a9939ea5.2016-01-13T22:34:53.101Z&ReportName=PositionRestingOrder&ReportFormat=JSON&AccountNumber=DWTE000005&wlpID=DW&LanguageID=en_US'", "language": "curl" } ], "sidebar": true } [/block] [block:api-header] { "type": "basic", "title": "Request Arguments" } [/block] [block:parameters] { "data": { "h-0": "Argument", "h-1": "Example", "h-2": "Description", "0-0": "`ReportName`", "0-1": "`\"PositionRestingOrder\"`", "0-2": "Internal report variable.", "h-3": "Required", "0-3": "**Yes**", "1-0": "`ReportFormat`", "1-1": "`\"JSON\"`", "1-2": "Report formats.<br />**Options**: `\"PDF\"`, `\"HTML\"`, `\"XLS\"` or `\"JSON\"`.", "1-3": "**Yes**", "2-3": "**Yes**", "3-3": "**Yes**", "4-3": "**No**", "5-3": "**No**", "2-0": "`sessionKey`", "3-0": "`AccountNumber`", "4-0": "`wlpID`", "5-0": "`LanguageID`", "2-1": "`\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.`<br />`YYYY-MM-DDTHH:MM:SS.SSSZ\"`", "3-1": "`\"xxxxxxxxxx\"`", "4-1": "`\"DW\"`", "5-1": "`\"en_US\"`", "2-2": "Session key.", "3-2": "Account number.", "4-2": "WLP ID.<br />Note: Default to `\"DW\"`.", "5-2": "Language.<br />**Options**: `\"en_US\"` (Default), `\"zh_CN\"`, `\"es_ES\"`, `\"pt_BR\"` or `\"ja_JP\"`." }, "cols": 4, "rows": 6 } [/block] [block:api-header] { "type": "basic", "title": "Result Format", "sidebar": true } [/block] [block:textarea] { "text": "The response (using `ReportFormat` set to `JSON`) returns a single array.", "sidebar": true } [/block] [block:code] { "codes": [ { "code": "{\n \"accountNo\": \"DWTE000005\",\n \"accountID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456\",\n \"accountType\": \"1\",\n \"positions\": [{\n \"costBasis\": 332.99,\n \"initQty\": 1.4105,\n \"side\": \"Buy\",\n \"openQty\": 1.4105,\n \"instrument\": {\n \"instrumentID\": \"063c3371-1b57-468c-a641-e2e1221bda10\",\n \"name\": \"Sherwin-Williams Company, The\",\n \"currencyID\": \"USD\",\n \"symbol\": \"SHW\",\n \"tradeStatus\": 1,\n \"sector\": \"Basic Materials\"\n },\n \"price\": 264.35,\n \"mtm\": 372.87,\n \"mtmPL\": 39.88\n }, {\n \"costBasis\": 25.02,\n \"initQty\": 3,\n \"side\": \"Buy\",\n \"openQty\": 3,\n \"instrument\": {\n \"instrumentID\": \"675cc7c2-e24b-42fa-9d1f-4b3a97ae8d2f\",\n \"name\": \"Aluminum Corporation Of China Limited\",\n \"currencyID\": \"USD\",\n \"symbol\": \"ACH\",\n \"tradeStatus\": 1,\n \"urlImage\": \"http://syscdn.drivewealth.net/images/symbols/ach.png\",\n \"sector\": \"Basic Materials\"\n },\n \"price\": 8.35,\n \"mtm\": 25.05,\n \"mtmPL\": 0.03\n }],\n \"orders\": [{\n \"orderID\": \"CK.49fa3d27-a5d4-4a2b-bc06-fb5bd7290c76\",\n \"orderNo\": \"CKEP000027\",\n \"cumQty\": 0,\n \"createdWhen\": \"2015-11-17T14:46:42.626Z\",\n \"grossTradeAmt\": 0,\n \"lastPx\": 0,\n \"lastQty\": 0,\n \"leavesQty\": 15,\n \"orderQty\": 15,\n \"ordStatus\": \"0\",\n \"ordType\": \"Stop\",\n \"price\": 100,\n \"side\": \"Sell\",\n \"autoStop\": 0,\n \"limitPrice\": 0,\n \"timeInForce\": \"1\",\n \"amountCash\": 0,\n \"instrument\": {\n \"instrumentID\": \"a67422af-8504-43df-9e63-7361eb0bd99e\",\n \"name\": \"Apple, Inc.\",\n \"currencyID\": \"USD\",\n \"symbol\": \"AAPL\",\n \"tradeStatus\": 1,\n \"urlImage\": \"http://syscdn.drivewealth.net/images/symbols/aapl.png\",\n \"sector\": \"Technology\"\n }\n }]\n}", "language": "json", "name": "200 OK" } ], "sidebar": true } [/block]