Placing the order

Prerequisites

 ✓   User's account is `ACTIVE`
Details

Before a user can start investing money, the account must be funded and in ACTIVE status, which means that all checks have been passed.


 ✓   A portfolio configuration exists
Details

Before the user can place a portfolio order, a portfolio configuration must exist. Make sure you've completed the first two steps in the Enabling portfolio investments tutorial before attempting this sub-task.


Overview

Placing a portfolio order follows our standard order approach. However, instead of calculating the order volume for each individual instrument, you only need to specify the desired investment amount to place a portfolio order. The Investment API handles the conversion to individual orders in the background based on the instrument weight specified in the portfolio allocation.

   Place a portfolio order

To place a portfolio order, send the following request:

POST /portfolios/orders

Example request

{
  "user_id": "4b9732bd-7496-491-8a5f-6360479d7fed",
  "account id": "00ef0be8-d564-43af-b3c7-11b7a2188030",
  "cash_amount": "100.00",
  "currency" : "EUR",
  "side": "BUY"
}

In the example request, a user has placed a portfolio order for 100€. Furthermore, the request returns a portfolio_order_id which allows you to transparently track the progress of a portfolio order in its entirety. You can find more details about this process in the guide 'Understanding portfolio orders'.

This concludes the step-by-step process of how to enable portfolio investments to your users from scratch. Now you have all the knowledge you need to start integrating the portfolio functionality into your application.

COMING SOON

The Investment API will support smart order functionality. This will ensure that each cash inflow and outflow is performed so that, after the order execution, the current holdings of a user matches the defined portfolio allocation.


   Portfolio order placed

Congratulations, you can now place portfolio orders!


Next steps