Message to indicate some event related to positions. Cash deposits and withdrawals are not included in position notifications. Instead they are reported as funding events.
Additional Fields
Name | Type | Description |
---|---|---|
Amount | Decimal | Amount (e.g. number of securities) ordered. |
AssetType | AssetType | AssetType of instrument traded. |
BuySell | Identifies the side of the transaction. | |
ClientName | String | Name of the client. |
Commission | decimal | The commission on the position (if there is any). |
ConversionRate | decimal | The conversion rate used at the time of the transaction. |
CorrelationKey | String | Correlationkey, relating orders for better visual correlation. |
CurrencyCode | String | The currency of the transaction. |
DisplayAndFormat | InstrumentDisplayAndFormat | Information about the instrument and how to display it. |
ExchangeFee | Decimal | Exchange fee charged for the trade. The currency is the currency of the contract. |
ExchangeInfo | InstrumentExchangeDetails | Information about the instrument's exchange and trading status. |
ExecutionTime | UtcDateTime | Timestamp when the business transaction represented by the notification occurred. |
FillAmount | Decimal | Partial fill amount. |
FixingDate | Date | The fixing date |
OpenPrice | Decimal | Price per security. |
OpenSpot | Decimal | Forex spot rate. |
OpenSwap | Decimal | Forex forward points added to OpenSpot. May be a negative value. |
OptionData | Information related to options. | |
OriginalAccountId | String | Account that the position originally belonged to (if it has been moved). |
OriginatingPositionId | String | Identifies the option this position is associated with. |
OriginatingToolId | Int | Can be used to identify the Saxo system that originated the event. |
PositionEvent | PositionEvent | Describes the position event.
|
PositionId | String | Identifies the position. |
PremiumAmount | Decimal | The premium of an FX option. |
Price | Decimal | Identifies the price of the transaction. |
PriceType | PriceType |
|
RelatedOrderCount | Int | The number of related orders (maximum 2). |
RelatedPositionId | String | Identifies the position that this order/position is related to. |
SourceOrderId | String | Identifies the order that was the source for this position. |
SpotDate | Date | The date when the initial transfer of the product of the transaction takes place. |
StampDuty | Decimal | Tax applied by an exchange. |
Symbol | String | Symbol- A combination of letters used to uniquely identify a traded instrument. e.g. ODAX/X13C8950:xeur. |
TotalCost | Decimal | Total cost of the trade. |
TradedValue | Decimal | |
UserId | String | UserId. |
UIC | Int | Uic of instrument traded |
ValueDate | Date | The date when the final transfer of the product of the transaction takes place |
Sample Message
An example of a position event message:
{ "ReferenceId": "U_939", "Timestamp": "2018-07-11T13:39:30.190120Z", "Data": [ { "AccountId": "IB-AMA-Cash", "ActivityTime": "2018-07-10T06:33:14.126104Z", "ActivityType": "Positions", "Amount": 3, "AssetType": "Stock", "BuySell": "Buy", "ClientId": "2147045884", "Commission": 15, "ConversionRate": 1, "CorrelationKey": "6f04c63d-5868-4b42-9269-cc55915f9fa9", "CurrencyCode": "USD", "DisplayAndFormat": { "BarrierFormat": "Normal", "Currency": "USD", "Decimals": 2, "Description": "Apple Inc.", "Format": "Normal", "OrderDecimals": 2, "StrikeFormat": "Normal", "Symbol": "AAPL:xnas" }, "ExchangeInfo": { "ExchangeId": "NASDAQ" }, "ExecutionTime": "2018-07-10T06:33:14.125075Z", "OpenPrice": 180.5, "PositionEvent": "New", "PositionId": "150733135", "Price": 180.5, "PriceType": "Amount", "SequenceId": "35349", "SourceOrderId": "54016921", "Symbol": "AAPL:xnas", "Uic": 211, "ValueDate": "2018-07-12" } ] }
PositionEvent
The type of position event is provided in the PositionEvent field. Possible event types are:
Position Event | Description |
---|---|
Deleted | The position is deleted. |
New | The position is created. |
OptionExercised | The position has been deleted as the option has been exercised. |
OptionExpired | The position has been deleted when an option expired. |
Updated | The position has been updated. |