{"_id":"5692a6d74c4d6d0d00f7cb4b","editedParams":true,"editedParams2":true,"project":"563cc7119799fb0d00047685","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":0,"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"},"parentDoc":null,"user":"563cc6fa8894d20d00014ea3","updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-01-10T18:45:43.366Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"language":"http","code":"GET /v1/users/02e57c7d-d071-4c63-b491-1194a9939ea5/accounts/ HTTP/1.1\nHost: api.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":"curl","code":"curl -X GET -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\" 'https://api.drivewealth.io/v1/users/02e57c7d-d071-4c63-b491-1194a9939ea5/accounts/'"}]},"method":"get","results":{"codes":[{"name":"","code":"[\n    {\n        \"accountID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548320228\",\n        \"accountNo\": \"DPAJ000003\",\n        \"userID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n        \"accountType\": 1,\n        \"cash\": 9950.04,\n        \"currencyID\": \"USD\",\n        \"defaultGoalID\": \"64924fd9-8ef6-48ac-ade2-c628cbfbd6b9\",\n        \"freeTradeBalance\": 0,\n        \"goodFaithViolations\": 0,\n        \"ibID\": \"80f9b672-120d-4b73-9cc9-42fb3262c4b9\",\n        \"interestFree\": false,\n        \"margin\": 1,\n        \"nickname\": \"Bob's Practice Account\",\n        \"openedWhen\": \"2016-01-11T21:38:40Z\",\n        \"goals\": [],\n        \"orders\": [],\n        \"patternDayTrades\": 0,\n        \"positions\": [\n            {\n                \"accountID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548320228\",\n                \"accountNo\": \"DPAJ000003\",\n                \"costBasis\": 43.98,\n                \"initQty\": 6,\n                \"instrumentID\": \"675cc7c2-e24b-42fa-9d1f-4b3a97ae8d2f\",\n                \"side\": \"B\",\n                \"openQty\": 6\n            }\n        ],\n        \"status\": 2,\n        \"tradingType\": \"C\",\n        \"updatedWhen\": \"2016-01-11T21:59:09.967Z\",\n        \"createdWhen\": \"2016-01-11T21:38:40.228Z\",\n        \"bodMoneyMarket\": 0,\n        \"bodEquityValue\": 0,\n        \"bodCashAvailForWith\": 0,\n        \"bodCashAvailForTrading\": 0,\n        \"rtCashAvailForTrading\": -49.96,\n        \"rtCashAvailForWith\": -49.96,\n        \"longOnly\": true\n    },\n    {\n        \"accountID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456\",\n        \"accountNo\": \"DWTE000005\",\n        \"userID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n        \"accountType\": 2,\n        \"cash\": 25000,\n        \"currencyID\": \"USD\",\n        \"defaultGoalID\": \"353c5517-c10f-4505-81d9-c7887b6fe10e\",\n        \"freeTradeBalance\": 0,\n        \"goodFaithViolations\": 0,\n        \"ibID\": \"80f9b672-120d-4b73-9cc9-42fb3262c4b9\",\n        \"interestFree\": false,\n        \"margin\": 1,\n        \"nickname\": \"Bob's Live Account\",\n        \"openedWhen\": \"2016-01-11T21:43:37Z\",\n        \"goals\": [],\n        \"orders\": [\n            {\n                \"orderID\": \"DA.c69f5f51-04ce-4796-a748-67306cdbcb17\",\n                \"accountID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5.1452548617456\",\n                \"userID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n                \"cumQty\": 0,\n                \"accountNo\": \"DWTE000005\",\n                \"commission\": 0,\n                \"createdByID\": \"02e57c7d-d071-4c63-b491-1194a9939ea5\",\n                \"createdWhen\": \"2016-01-11T22:01:09.066Z\",\n                \"execType\": \"0\",\n                \"grossTradeAmt\": 0,\n                \"instrumentID\": \"675cc7c2-e24b-42fa-9d1f-4b3a97ae8d2f\",\n                \"lastPx\": 0,\n                \"lastQty\": 0,\n                \"leavesQty\": 3,\n                \"orderNo\": \"DAQB000017\",\n                \"orderQty\": 3,\n                \"ordStatus\": \"0\",\n                \"ordType\": \"1\",\n                \"price\": 0,\n                \"rateAsk\": 0,\n                \"rateBid\": 0,\n                \"side\": \"B\",\n                \"accountType\": 2,\n                \"autoStop\": 0,\n                \"limitPrice\": 0,\n                \"timeInForce\": \"0\",\n                \"isoTimeRestingOrderExpires\": \"2016-01-12T21:00:00.000Z\",\n                \"internalMemo\": \"OGW ACH\",\n                \"amountCash\": 0\n            }\n        ],\n        \"patternDayTrades\": 0,\n        \"positions\": [],\n        \"status\": 2,\n        \"tradingType\": \"C\",\n        \"createdWhen\": \"2016-01-11T21:43:37.455Z\",\n        \"bodMoneyMarket\": 0,\n        \"bodEquityValue\": 0,\n        \"bodCashAvailForWith\": 0,\n        \"bodCashAvailForTrading\": 0,\n        \"rtCashAvailForTrading\": 0,\n        \"rtCashAvailForWith\": 0,\n        \"accountMgmtType\": 0,\n        \"longOnly\": true\n    }\n]","language":"json","status":200},{"code":"Account not found [accountID={UNKNOWN_ACCOUNT_ID}]","language":"json","status":404}]},"settings":"","auth":"required","params":[{"_id":"5691500e3c4f510d00ec9bac","ref":"","in":"path","required":true,"desc":"User ID","default":"02e57c7d-d071-4c63-b491-1194a9939ea5","type":"string","name":"userID"}],"url":"/users/:userID/accounts/"},"isReference":true,"order":3,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response\"\n}\n[/block]\nIf user has more than one account, multiple account objects will be returned. Every account has a default list of attributes.\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`accountType`\",\n    \"0-1\": \"Account type: `1` - Practice or `2` - Live.\",\n    \"h-0\": \"Attribute\",\n    \"h-1\": \"Description\",\n    \"1-0\": \"`cash`\",\n    \"1-1\": \"Cash available in the account.\",\n    \"2-0\": \"`freeTradeBalance`\",\n    \"2-1\": \"Available free trade credits.\",\n    \"3-0\": \"`goodFaithViolations`\",\n    \"3-1\": \"Number of good faith violations. [Learn more about how we flag \\\"good faith violations\\\".](http://help.drivewealth.com/customer/en/portal/articles/1559003-what-are-possible-cash-account-violations-)\",\n    \"4-0\": \"`interestFree`\",\n    \"4-1\": \"Either `true` if account is interest free or `false` (default).\",\n    \"5-0\": \"`orders`\",\n    \"5-1\": \"Array of pending (aka \\\"resting\\\") orders.  Learn more about orders from the [Get - Stop Order](doc:get_stop) and [Get - Limit Order](doc:get-limit-order) Methods.\",\n    \"6-0\": \"`patternDayTrades`\",\n    \"6-1\": \"Number of pattern day trades flagged. [Learn more about how we flag \\\"pattern day trades\\\".](http://help.drivewealth.com/customer/en/portal/articles/1910047-what-is-a-%22pattern-day-trader%22-)\",\n    \"7-0\": \"`positions`\",\n    \"7-1\": \"Array of positions held in this account. Learn more about positions from the [Get - Market Order](doc:get_market) and [Get - Limit Order](doc:get-limit-order) Methods.\",\n    \"8-0\": \"`status`\",\n    \"8-1\": \"Account status `1` - Pending, `2` - Open, `3` - Open no new trades, `9` - Closed.\",\n    \"9-0\": \"`tradingType`\",\n    \"9-1\": \"Trading type, either `C` for cash (default) and `M` for margin.\",\n    \"10-0\": \"`bodMoneyMarket`\",\n    \"10-1\": \"Beginning of day money market value. [Please note account cash is swept daily into money market account.](http://help.drivewealth.com/customer/en/portal/articles/1519506-can-i-earn-interest-on-my-deposits-)\",\n    \"11-0\": \"`bodEquityValue`\",\n    \"11-1\": \"Beginning of day equity value.\",\n    \"12-0\": \"`bodCashAvailForWith`\",\n    \"12-1\": \"Beginning of day cash amount available for withdrawal.\",\n    \"13-0\": \"`bodCashAvailForTrading`\",\n    \"13-1\": \"Beginning of day cash amount available for trading.\",\n    \"14-0\": \"`rtCashAvailForTrading`\",\n    \"14-1\": \"Real time cash available for trading.\",\n    \"15-0\": \"`rtCashAvailForWith`\",\n    \"15-1\": \"Real time cash available for withdrawal.\",\n    \"17-0\": \"`longOnly`\",\n    \"17-1\": \"Either `true` (default) if account can only long (i.e. prevented from shorting) or `false`.\",\n    \"16-0\": \"`accountMgmtType`\",\n    \"16-1\": \"Account management type:\\n`0` - Self-directed (default) \\n`1` - Managed\"\n  },\n  \"cols\": 2,\n  \"rows\": 18\n}\n[/block]","excerpt":"Lists all accounts of a user.","slug":"accounts_list","type":"endpoint","title":"List All Accounts"}

getList All Accounts

Lists all accounts of a user.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

userID:
required
string02e57c7d-d071-4c63-b491-1194a9939ea5
User ID

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Response" } [/block] If user has more than one account, multiple account objects will be returned. Every account has a default list of attributes. [block:parameters] { "data": { "0-0": "`accountType`", "0-1": "Account type: `1` - Practice or `2` - Live.", "h-0": "Attribute", "h-1": "Description", "1-0": "`cash`", "1-1": "Cash available in the account.", "2-0": "`freeTradeBalance`", "2-1": "Available free trade credits.", "3-0": "`goodFaithViolations`", "3-1": "Number of good faith violations. [Learn more about how we flag \"good faith violations\".](http://help.drivewealth.com/customer/en/portal/articles/1559003-what-are-possible-cash-account-violations-)", "4-0": "`interestFree`", "4-1": "Either `true` if account is interest free or `false` (default).", "5-0": "`orders`", "5-1": "Array of pending (aka \"resting\") orders. Learn more about orders from the [Get - Stop Order](doc:get_stop) and [Get - Limit Order](doc:get-limit-order) Methods.", "6-0": "`patternDayTrades`", "6-1": "Number of pattern day trades flagged. [Learn more about how we flag \"pattern day trades\".](http://help.drivewealth.com/customer/en/portal/articles/1910047-what-is-a-%22pattern-day-trader%22-)", "7-0": "`positions`", "7-1": "Array of positions held in this account. Learn more about positions from the [Get - Market Order](doc:get_market) and [Get - Limit Order](doc:get-limit-order) Methods.", "8-0": "`status`", "8-1": "Account status `1` - Pending, `2` - Open, `3` - Open no new trades, `9` - Closed.", "9-0": "`tradingType`", "9-1": "Trading type, either `C` for cash (default) and `M` for margin.", "10-0": "`bodMoneyMarket`", "10-1": "Beginning of day money market value. [Please note account cash is swept daily into money market account.](http://help.drivewealth.com/customer/en/portal/articles/1519506-can-i-earn-interest-on-my-deposits-)", "11-0": "`bodEquityValue`", "11-1": "Beginning of day equity value.", "12-0": "`bodCashAvailForWith`", "12-1": "Beginning of day cash amount available for withdrawal.", "13-0": "`bodCashAvailForTrading`", "13-1": "Beginning of day cash amount available for trading.", "14-0": "`rtCashAvailForTrading`", "14-1": "Real time cash available for trading.", "15-0": "`rtCashAvailForWith`", "15-1": "Real time cash available for withdrawal.", "17-0": "`longOnly`", "17-1": "Either `true` (default) if account can only long (i.e. prevented from shorting) or `false`.", "16-0": "`accountMgmtType`", "16-1": "Account management type:\n`0` - Self-directed (default) \n`1` - Managed" }, "cols": 2, "rows": 18 } [/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 }}