openapi: 3.0.2 info: title: DriveWealth Accounts AutoPilot API version: '1.0' servers: - url: https://bo-api.drivewealth.io/back-office description: Sandbox server (Uses test data) - url: https://bo-api.drivewealth.net/back-office description: Production Server (Uses LIVE data) tags: - name: AutoPilot x-displayName: AutoPilot paths: /managed/autopilot/{partnerID}: post: deprecated: true tags: - AutoPilot parameters: - in: path name: partnerID schema: type: string required: true example: 66304da9-3h6f-2234-935f-ac6b7933d706 description: This is the parentIBID or userID of the registered investment advisor. summary: Create Autopilot Run description: Create an Autopilot Run. requestBody: content: application/json: schema: $ref: '#/components/schemas/autopilotReq' required: true responses: '200': description: Creating an Autopilot Run was Successful. content: application/json: schema: $ref: '#/components/schemas/autopilotRes' security: - bearerAuth: [] dwAppKey: [] - sessionToken: [] dwAppKey: [] /managed/autopilot/{rebalanceRunID}: get: deprecated: true tags: - AutoPilot parameters: - in: path name: rebalanceRunID schema: type: string required: true example: ria_rebalance_ebf7e878-e2d6-4b3d-a333-b8ff05b92b83 description: The unique re-balance run identifier `rebalanceRunID` associated with a specific re-balance. summary: Retrieve Autopilot Run description: Retrieves an Autopilot Run by rebalanceRunID. responses: '200': description: Retrieving an Autopilot Run by rebalanceRunID was Successful. content: application/json: schema: $ref: '#/components/schemas/runStatusRes' security: - bearerAuth: [] dwAppKey: [] - sessionToken: [] dwAppKey: [] /accounts/{accountID}/portfolio: get: deprecated: true tags: - AutoPilot parameters: - in: path name: accountID schema: $ref: '#/components/schemas/accountID' required: true summary: Retrieve Portfolio by Account description: Retrieve Portfolio details by accountID. responses: '200': description: Fetching Portfolio details was Successful. content: application/json: schema: $ref: '#/components/schemas/PortfolioStatusRes' security: - bearerAuth: [] dwAppKey: [] - sessionToken: [] dwAppKey: [] /users/{userID}/managed/autopilot: get: deprecated: true tags: - AutoPilot summary: List AutoPilot Runs by Advisor description: Fetches a list of autopilot runs by userID. parameters: - in: path name: userID schema: $ref: '#/components/schemas/userID' required: true example: cc07f91b-7ee1-4868-b8fc-823c70a1b932 description: The User's unique identifier. - in: query name: from schema: type: string required: false example: '2022-12-08T18:36:40.609Z' description: The date and time in which to start from. - in: query name: to schema: type: string required: false example: '2022-12-25T18:36:40.609Z' description: The date and time in which to end at. - in: query name: direction schema: type: string enum: - NEXT - PREVIOUS required: false example: NEXT - in: query name: offset schema: type: string required: false example: '2022-12-08T18:36:40.609Z' responses: '200': description: Fetching A List Of Autopilot Runs By userID was Successful. content: application/json: schema: $ref: '#/components/schemas/AutoPilotRunsByUserID' security: - bearerAuth: [] dwAppKey: [] - sessionToken: [] dwAppKey: [] components: schemas: fundID: type: string example: fund_4c16152c-f8e7-4a5a-af6b-c36f4e5cc6e7 description: The unique identifier of a fund. runStatusRes: type: object properties: id: type: string example: ria_rebalance_ebf7e764-e2d6-4b3d-a333-b8ff05b92b89 description: The unique re-balance run identifier `rebalanceRunID` associated with a specific re-balance. riaID: type: string example: 66304da9-3h6f-2234-935f-ac6b7933d706 description: This is the parentIBID or userID of the registered investment advisor creating the re-balance run. status: type: string example: REBALANCE_NOT_STARTED description: Status of the re-balance run. See [Autopilot Run Status](https://developer.drivewealth.com/reference/get-autopilot-run-status) for status values. updated: type: string example: '2022-12-27T06:07:28.955Z' description: A timestamp of when the re-balance run was updated. created: type: string example: '2022-12-27T06:06:28.955Z' description: A timestamp of when the re-balance run was created. moneyMovement: type: boolean example: true description: Was this run part of the regular AutoPilot money movement process? regularRebalance: type: boolean example: true description: Was this run part of the regular AutoPilot rebalancing process? reviewOnly: type: boolean example: true orders: type: object description: An object containing the details of submitted orders for the re-balance. properties: total: type: number example: 0 description: Total number of orders submitted. submitted: type: string example: https://uat.drivewealth.autopilot.s3.amazonaws.com/44304da9.... description: Amazon S3 download containing the details of each submitted order. outcome: type: string example: https://uat.drivewealth.autopilot.s3.... description: Amazon S3 download containing the status and final outcome of the orders that were submitted. amountBuys: type: number example: -1059.35 description: An aggregate value of all buy orders. Expect a negative number. amountSells: type: number example: 862.69 description: An aggregate value of all sell orders. cleanedUp: type: string example: null allocations: type: object description: An object containing the details of the allocations in a re-balance. properties: submitted: type: string example: https://uat.drivewealth.autopilot.s3.... description: Amazon S3 download containing the details of each submitted allocation. outcome: type: string example: https://uat.drivewealth.autopilot.s3.... description: Amazon S3 download containing the status and final outcome of each allocation that was submitted. subAccounts: type: object description: An object containing details on user accounts and their holdings. properties: total: type: number example: 4 description: The total number of user accounts under the advisor. rebalanced: type: number example: 3 description: The total number of user accounts that were rebalanced. error: type: number example: 0 description: The total number of allocation errors at the users account level during the rebalance. outcome: type: string example: https://uat.drivewealth.autopilot.s3.... description: Amazon S3 download containing the final outcome of the rebalance, includes users account details and their holdings. AutoPilotRunsByUserID: type: array description: A list of autopilot runs by userID. items: oneOf: - $ref: '#/components/schemas/AutoPilotRunByUserID' portfolioHoldings: type: object properties: id: $ref: '#/components/schemas/fundID' type: $ref: '#/components/schemas/fundType' name: $ref: '#/components/schemas/fundName' target: $ref: '#/components/schemas/fundTarget' actual: type: number example: 0.3054 description: The percentage weight of a Fund in a Portfolio. value: type: number example: 33604.12 description: The current value of the Fund in a Portfolio in USD. rebalanceRequired: type: boolean example: true description: A flag that determines if a re-balance is required based on total drift. holdings: $ref: '#/components/schemas/holdings' portfolioID: type: string example: portfolio_87fec25f-c350-4a53-83a0-fc6be0c2989e description: The unique identifier of a portfolio. autopilotReq: type: object required: - reviewOnly - forceRebalance properties: reviewOnly: type: boolean example: true description: True, if a review should occur without a forced rebalance. forceRebalance: type: boolean example: true description: True, if a forces rebalance should occur. subAccounts: type: array description: A list of user's accountIDs to be rebalanced. items: oneOf: - $ref: '#/components/schemas/accountID' holdingsObject: type: object description: An object in the holdings array that holds the instrumentID and target. properties: instrumentID: type: string example: 5b85fabb-d57c-44e6-a7f6-a3efc760226c description: A unique ID created by DriveWealth to identify a specific instrument. target: type: number example: 0.5 description: The target percentage for the specific instrumentID within a fund. userID: type: string example: cc07f91b-7ee1-4868-b8fc-823c70a1b932 description: A unique identifier created for each User on DriveWealth's platform. autopilotRes: type: object properties: id: type: string example: ria_rebalance_ebf7e764-e2d6-4b3d-a333-b8ff05b92b89 description: The unique re-balance run identifier `rebalanceRunID` associated with a specific re-balance. created: type: string example: '2022-12-27T06:06:28.955Z' description: A timestamp of when the re-balance run was created. status: type: string example: REBALANCE_NOT_STARTED description: Status of the re-balance run. See [Autopilot Run Status](https://developer.drivewealth.com/reference/get-autopilot-run-status) for status values. riaID: $ref: '#/components/schemas/riaID' riaID: type: string example: 66304da9-3h6f-2234-935f-ac6b7933d706 description: This is the parentIBID or userID of the registered investment advisor creating the re-balance run. AutoPilotRunByUserID: type: object properties: id: $ref: '#/components/schemas/autoPilotRebalanceID' created: type: string example: '2022-12-11T22:28:21.810Z' description: The date and time that the autopilot re-balance was created. status: $ref: '#/components/schemas/autoPilotStatus' moneyMovement: type: string example: true description: True, if the re-balance was apart of a funding or withdrawal process. regularRebalance: type: string example: false description: True, if the re-balance was apart of the regularly scheduled re-balancing cycle. accountID: type: string example: cc07f91b-7ee1-4868-b8fc-823c70a1b932.1407775317759 description: The user's unique account identifier. autoPilotStatus: type: string example: REBALANCE_NOT_STARTED description: The current status of the re-balance run. enum: - REBALANCE_NOT_STARTED - REBALANCE_ABORTED - REBALANCE_REVIEW_COMPLETED - REBALANCE_NO_ORDERS_GENERATED - REBALANCE_10 - REBALANCE_20 - REBALANCE_30 - REBALANCE_40 - REBALANCE_50 - REBALANCE_60 - REBALANCE_70 - REBALANCE_80 - REBALANCE_90 - REBALANCE_COMPLETED - REBALANCE_FAILED - AMOUNTCASH_ORDERS_AGGREGATED - ORDERQTY_ORDERS_AGGREGATED - ORDERQTY_ORDERS_PREPARED - AMOUNTCASH_ORDERS_PREPARED - SELL_ORDERQTY_ORDERS_SUBMITTED - SUBACCOUNT_ORDERS_ADJUSTED - SELL_AMOUNTCASH_ORDERS_SUBMITTED - SELL_AMOUNTCASH_ORDERS_COMPLETED - SELL_AMOUNTCASH_ORDERS_FAILED - SELL_AMOUNTCASH_ORDERS_TIMEDOUT - SELL_ORDERQTY_ORDERS_COMPLETED - SELL_ORDERQTY_ORDERS_FAILED - SELL_ORDERQTY_ORDERS_TIMEDOUT - BUY_ORDERQTY_ORDERS_SUBMITTED - BUY_ORDERQTY_ORDERS_COMPLETED - BUY_ORDERQTY_ORDERS_FAILED - BUY_ORDERQTY_ORDERS_TIMEDOUT - BUY_AMOUNTCASH_ORDERS_SUBMITTED - BUY_AMOUNTCASH_ORDERS_COMPLETED - BUY_AMOUNTCASH_ORDERS_FAILED - BUY_AMOUNTCASH_ORDERS_TIMEDOUT - ORDERS_CLEANEDUP - RIA_NEXT_REBALANCE_UPDATED - ALLOCATION_PREPARED - ALLOCATION_SUBMITTED - ALLOCATION_NOT_STARTED - ALLOCATION_10 - ALLOCATION_20 - ALLOCATION_30 - ALLOCATION_40 - ALLOCATION_50 - ALLOCATION_60 - ALLOCATION_70 - ALLOCATION_80 - ALLOCATION_90 - ALLOCATION_COMPLETED - ALLOCATION_FAILED - ALLOCATION_TIMEDOUT - SUBACCOUNT_HOLDINGS_UPDATED - SUBACCOUNT_HOLDINGS_UPDATE_FAILED - SUCCESS fundTarget: type: number example: 0.75 description: The individual targeted weight of the instrument. fundType: type: string example: FUND description: The type of fund. enum: - FUND - CASH_RESERVE PortfolioStatusRes: type: object properties: id: $ref: '#/components/schemas/portfolioID' equity: type: number example: 11003.76 description: The account value of the customers account. totalDrift: type: number example: 0.012 description: Total drift away from target. rebalanceRequired: type: boolean example: true description: A flag that determines if a re-balance is required based on total drift. nextPortfolioRebalance: type: string example: '2018-12-11T15:00:00.846Z' description: The date of the next portfolio re-balance. lastPortfolioRebalance: type: string example: '2017-12-11T15:00:00.846Z' description: The date of the last portfolio rebalance. holdings: type: array items: oneOf: - $ref: '#/components/schemas/portfolioHoldings' autoPilotRebalanceID: type: string example: ria_rebalance_721ff5c3-f6f2-48d8-aaa3-41a49a044f2c description: The unique identifier of the auto pilot re-balance run. fundName: type: string example: Large Capitalization Fund description: A user defined name that describes the underlying fund. holdings: type: array description: A list of the securities held in a Fund. items: oneOf: - $ref: '#/components/schemas/holdingsObject' securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT dwAppKey: type: apiKey in: header name: dw-client-app-key sessionToken: type: apiKey in: header name: dw-auth-token