Portfolio orders

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.

Prerequisites

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

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

Placing a portfolio order

To place a portfolio order, send the following request:

POST /portfolios/orders

Example request

{
  "user_id": "4b9732bd-7496-4e91-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'.

You'll receive an HTTP response indicating whether the request was correctly handled. Successful portfolio order creation will result in an HTTP 202 Accepted response containing a portfolio_order_id in its payload. Because order processing is asynchronous, further details and status updates will be delivered via webhooks.

WARNING

Webhooks notify you of events in business processes, not the success or failure of the initialisation of those processes.

Please be sure to check the HTTP status of the response to your requests and handle failure cases appropriately.


See Asynchronous order processing and tracking for more details.

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.


Congratulations, you can now place portfolio orders!

Was this page helpful?