Skip to main content
POST
/
investments
/
portfolio
/
preview
Preview portfolio buy transaction
curl --request POST \
  --url https://{host}/investments/portfolio/preview \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-user-id: <x-user-id>' \
  --data '
{
  "portfolioId": "64f0c51e7fb3fc001234abcd",
  "orderAmount": 250.5,
  "allocationMethod": "holdings"
}
'
{
  "executionWindow": {
    "express": {
      "etfs": {
        "executionType": "REALTIME",
        "start": "2024-07-12T13:00:00.000Z",
        "end": "2024-07-12T15:30:00.000Z"
      },
      "stocks": {
        "executionType": "REALTIME",
        "start": "2024-07-12T09:30:00.000Z",
        "end": "2024-07-12T16:00:00.000Z"
      }
    },
    "smart": {
      "etfs": {
        "executionType": "MARKET_HOURS",
        "start": "2024-07-12T13:00:00.000Z",
        "end": "2024-07-12T18:00:00.000Z"
      },
      "stocks": {
        "executionType": "MARKET_HOURS",
        "start": "2024-07-12T09:30:00.000Z",
        "end": "2024-07-12T16:00:00.000Z"
      }
    }
  },
  "fees": {
    "express": {
      "fx": {
        "currency": "EUR",
        "amount": 0.5
      },
      "commission": {
        "currency": "EUR",
        "amount": 0.25
      },
      "realtimeExecution": {
        "currency": "EUR",
        "amount": 1
      }
    },
    "smart": {
      "fx": {
        "currency": "EUR",
        "amount": 0.5
      },
      "commission": {
        "currency": "EUR",
        "amount": 0.25
      }
    }
  },
  "orders": {
    "express": [
      {
        "isin": "US0378331005",
        "side": "Buy",
        "quantity": 0.5,
        "consideration": {
          "currency": "EUR",
          "amount": 50
        }
      }
    ],
    "smart": [
      {
        "isin": "US0378331005",
        "side": "Buy",
        "quantity": 0.5,
        "consideration": {
          "currency": "EUR",
          "amount": 50
        }
      }
    ]
  },
  "foreignCurrencyRates": {
    "US0378331005": {
      "rate": 1.1,
      "currency": "USD"
    }
  }
}

Authorizations

Authorization
string
header
required

Auth0-issued access token that includes the scopes listed for the endpoint.

Headers

x-user-id
string
required

User identifier for the M2M client to specify which user's data to access.

Body

application/json
portfolioId
string
required

Portfolio identifier (MongoDB ObjectId)

orderAmount
number<double>
required

Amount to invest in whole currency units (e.g., 100.0 for 100 EUR)

Required range: x >= 0.01
allocationMethod
enum<string>
required

Method for distributing the investment across assets

Available options:
targetAllocation,
holdings

Response

Portfolio buy preview retrieved successfully

Preview of a transaction showing execution options, fees, and estimated orders

executionWindow
object

Execution window for both express and smart execution scenarios

fees
object

Fees breakdown for both express and smart execution scenarios

orders
object

Orders preview for both express and smart execution scenarios

foreignCurrencyRates
object

Foreign currency exchange rates keyed by ISIN

willSkipOrders
boolean

Whether orders will be skipped due to low amounts

willResultInLowQuantityHolding
boolean

Whether the transaction will result in a low quantity holding

hasETFOrders
boolean

Whether the transaction includes ETF orders