OpenAPI

In this position netting profile, opposing positions are netted out at the end of the trading day. During the trading day opposing positions are shown in the SaxoTraderGO "Positions" tab.

In this example we first bought and then sold 100.000 EUR. The first row is the net position, which is shown as Squared to indicate that it has no market exposure. Underneath are the positions making up the squared net position. 

These are the endpoints to GET this information:

  • /port/v1/positions: This will return 2 positions (one long, and one short).
  • /port/v1/netpositions: This will return a net position with a NetPositionBase.Amount value of 0.

Further notice:

  • It is possible to place individual stop and limit orders on each position. This can be done by using the /trade/v2/orders endpoint to place a stop/limit order and setting the PositionId field.
  • It is possible to explicitly close a position. (This can be done by using the trade/v2/orders endpoint to place market order and setting the PositionId field.
  • It is possible to exercise an individual (option) position by calling /trade/v1/positions/{positionid}/exercise.

Finally, since we do not distinguish between opened and closed positions, there is only a single value for P/L on margin positions. This is the UnrealizedMarginProfitLoss returned from the /port/v1/balances endpoint.

What to be aware of when switching to end of day FIFO netting

  • A position can have related orders (stop loss and/or take profit), but this isn't a requirement.
  • Opposing positions are netted end of day and will be available as positions in the /port/v1/positions and /port/v1/netpositions resources.
  • Netted positions are not moved to closed positions. The /port/v1/closedpositions resource will therefore return an empty array even if a position is squared.
  • It is possible to exercise individual option positions by calling /trade/v1/positions/{positionid}/exercise.

See also the live sample on netting (with source).