When an order is fully or partially filled, a new position is created. Netpositions give an overview of exposure and average purchase price across multiple positions. Simply an aggregated/summarized position by instrument on a selected client, account or group of accounts.
The profit/loss, exposure and currency are determined by the calculation entity requested. All values are available in real-time. Hence, if only ClientKey is specified the calculation currency is the client's base currency. But if a AccountKey is specified, the base currency values will be returned in account currency. When AccountGroupKey is specified, calculations are returned in the client's base currency, but only for the accounts in the given group.
You may start one netposition subscription on the client level, and another on a specific account.
To get all positions under a given Netposition, use the NetPositionId filter on the Positions endpoint.
We highly recommend writing your application to leverage NetPositions rather than relying on updates and repeatedly iterating a list of individual positions.
Getting NetPositions, Positions and Orders
Getting a list of your open orders, positions or NetPositions is simple. Below are some examples of the most common operations.
You must always specify the client/account/account perspective, so either use the /me endpoints for default client level, or specify a ClientKey and optionally an AccountKey or AccountGroupKey.
Example: How to get list of orders, positions or NetPositions on an account or across all accounts
The fastest and simplest way to get a list of orders, positions or NetPositions across all accounts, calculated in client currency, for the logged in user is to use the /me endpoint. It is available on all portfolio services.
Get my positions:
To get all positions under a given account, with all values calculated in account currency, specify the clientkey and accountkey.
Get all positions on a specific account:
Get all positions on a specific account group:
Example: How to get specific order, position or NetPosition details.
If you want to get all available data on a given entity, you will need the OrderId, PositionId or NetPositionId. The output fields will vary with the AssetType, account settings, commissions rules, etc. In it's simplest form, the request syntax is:
Get details for a specific order:
Get details for a specific position:
Get details for a specific Netposition from the client level:
Full example of a position details request:
Example: How to get all positions under a Netposition
To get a list of all positions under a given Netposition, use the NetPositionId filter argument. The calculation currency is determined by the ClientKey, or if AccountKey is specified the account currency.
Example: How to get market active orders only
You may want to omit the passive order types that are not market active before a given price threshold or event takes place. such as the family of stop and trailing orders.
Get the current market active orders only:
Example: How to get a list of positions under a underlying client.
For partners, getting orders, positions or NetPositions for an underlying client, or client account is no different than getting them for your own client. You simply specify the ClientKey and optionally AccountKey for the underlying partner or client.
Get all positions on a underlying client's account:
ClosedPositions and the client's position netting mode
For clients, two netting modes are available, End of day and Intraday. The main difference is that with Intraday netting, positions are moved from Positions lists to the ClosedPositions endpoint as they are closed.
With End of day netting, closed positions stay on the Positions lists until end of day. In both cases, final settlement still occurs at end of day. It can be practical to only see active open positions, so this endpoint allows qualified clients to switch the netting mode. See this article for an in-depth explanation.
Example: How to get a list of closed positions for a client on Intraday netting
Get all closed positions on a client's account:
Netposition Status (Explicit close vs implicit close)
Since Saxo supports explicit netting of positions, one subtle distinction to note is the difference between an explicitly closed position vs. an implicitly closed position. If one specifies a RelatedPositionId when placing an order, the resulting position will be explicitly related to the related position.
- A Netposition consisting only of closed, explicitly related positions, will have status Closed
- If one or more positions are PartiallyFilled, then the Status will be PartiallyFilled
- If the sum of unrelated positions is 0, the Status will be Square
- In all other instances, the NetPosition will have Status Open