Portfolios

Create portfolios order

Changed on

Places a buy or sell portfolio order for the specified account, distributing the cash amount across instruments according to the account's allocation weights.

One underlying instrument order is generated per instrument in the allocation.

See the Portfolios guide (TOL / BYOL) for implementation details.

post/portfolios/orders

Request

  • Base URL: https://sandbox.upvest.co
  • URL: https://sandbox.upvest.co/portfolios/orders
  • Auth: OAuth 2 (client credentials, token URL https://sandbox.upvest.co/auth/token, scopes: portfolios:admin)

Headers

idempotency-keystring uuid required
Example:ccb07f42-4104-44ad-8e1f-c660bb7b269c

A UUID to be used as an idempotency key. This prevents a duplicate request from being replayed. https://docs.upvest.co/documentation/concepts/api_concepts/idempotency

Request body

user_idstring uuid required

Unique identifier of the user, as a UUID.

account_idstring uuid required

Universally Unique Identifier (UUID) of the account.

cash_amountstring required

A positive decimal amount, as a string.

currency'EUR' | 'GBP' required

Alphabetic three-letter ISO 4217 currency code.

  • EUR — Euro.
  • GBP — Pound Sterling.
side'BUY' | 'SELL' required

Side of the portfolio order.

  • BUY -
  • SELL -
post_taxboolean

Cash amount is post-tax value

Response

Portfolios order

idstring uuid required

Universally Unique Identifier (UUID) of a portfolio order.

created_atstring date-time required

Date and time when the resource was created. RFC 3339-5, ISO8601 UTC

updated_atstring date-time required

Date and time when the resource was last updated. RFC 3339-5, ISO8601 UTC

user_idstring uuid

Unique identifier of the user, as a UUID.

account_idstring uuid required

Universally Unique Identifier (UUID) of the account.

allocation_idstring uuid

Universally Unique Identifier (UUID) of a portfolio allocation.

cash_amountstring required

A positive decimal amount, as a string.

currency'EUR' | 'GBP' required

Alphabetic three-letter ISO 4217 currency code.

  • EUR — Euro.
  • GBP — Pound Sterling.
status'NEW' | 'PROCESSING' | 'FILLED' | 'SETTLED' | 'CANCELLED' required

Execution status of the Portfolio Order.

  • NEW -
  • PROCESSING -
  • FILLED -
  • SETTLED -
  • CANCELLED -
type'BUY' | 'SELL' | 'REBALANCING'

Type of the Portfolio Order.

  • BUY -
  • SELL -
  • REBALANCING -
post_taxboolean required

Cash amount is post-tax value

client_referencestring required

A reference string provided by the client to correlate the portfolio order with a record in the client's own system.

initiation_flow'API' | 'SAVINGS_PLAN' | 'AUTO_INVESTMENT' required

Identifies what triggered the portfolio order.

  • API — initiated directly via the client API.
  • SAVINGS_PLAN — initiated by a savings plan execution.
  • AUTO_INVESTMENT — initiated automatically by auto-investment to invest incoming cash.
cancellation_reason'ACCOUNT_IS_EMPTY' | 'CANCELLED_BY_CLIENT' | 'CANCELLED_BY_UPVEST' | 'PORTFOLIO_IS_BALANCED' | 'SELL_LIMIT_EXCEEDED'

Explains the reason why the order was cancelled .

  • ACCOUNT_IS_EMPTY -
  • CANCELLED_BY_CLIENT -
  • CANCELLED_BY_UPVEST -
  • PORTFOLIO_IS_BALANCED -
  • SELL_LIMIT_EXCEEDED -
cancellation_detailsstring

Changes

    • warning

      added the new AUTO_INVESTMENT enum value to the response property for the response status