Post transactions

In order for the Robo Advisor to calculate a portfolio's TWR you provide an overview of transactions you get from your broker, see How it works.

Transactions:

  • hold the datetime on when they occured
  • hold on or more movements
  • a movement can by a cash deposit or withdrawal, a buy order, a sell order, a fee, see TRANSACTION_TYPE

Prerequisites

Endpoint

POST /v1/portfolios/{id}/transactions

Example response

Below example represents a cash deposit for 10.000 euro and two buy orders.

[
  {
    "external_id": "{{your-id}}-0",
    "movements": [
      {
        "datetime": "2020-06-15T03:54:39.563477+00:00",
        "instrument_id": "EUR",
        "type": "CASH_DEPOSIT_WITHDRAWAL",
        "quantity": 10000
      }
    ]
  },
  {
    "external_id": "{{your-id}}-1",
    "movements": [
      {
        "datetime": "2020-06-16T03:54:39.563477+00:00",
        "instrument_id": "IE00BM67HQ30",
        "type": "BUY_SELL",
        "quantity": 8
      },
      {
        "datetime": "2020-06-16T03:54:39.563477+00:00",
        "instrument_id": "USD",
        "type": "BUY_SELL",
        "quantity": -187.57
      }
    ]
  },
  {
    "external_id": "P01EAY036SCAF46VC3RB01DG4NW-2",
    "movements": [
      {
        "datetime": "2020-06-16T03:54:39.563477+00:00",
        "instrument_id": "LU1681044720",
        "type": "BUY_SELL",
        "quantity": 2
      },
      {
        "datetime": "2020-06-16T03:54:39.563477+00:00",
        "instrument_id": "USD",
        "type": "BUY_SELL",
        "quantity": -631.59
      }
    ]
  }
]

Try it with Postman

  1. Select the POST method and provide the URL https://advisor.investsuite.com/api/v1/portfolios/{id}/transactions.
  2. Add authorization: select type Bearer Token, fill in the token you created earlier, see Authentication.
  3. Create a Request Body similar to example above
  4. Click "Send". You should receive and empty response body. In the Console you should now see the portfolio performance.
Last Updated: 6/30/2020, 1:18:59 PM