OpenAPI

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

NameTypeDescription

Amount

decimal

Amount (e.g. number of securities) ordered.

AssetTypeAssetTypeAssetType of instrument traded.

BuySell

BuySell

Identifies the side of the transaction. 
Buy: Buy the security. 
Sell: Sell the security.

Commission

decimal

The commission on the position (if there is any).

ConversionRate

decimal

The conversion rate used at the time of the transaction.

CorrelationKey

stringCorrelationkey, relating orders for better visual correlation.

CurrencyCode

string

The currency of the transaction.

DisplayAndFormatInstrumentDisplayAndFormatInformation 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.

FixingDateDateThe 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

OptionData


Information related to options.

OriginatingPositionId

int

Identifies the option this position is associated with.

PositionEvent

PositionEvent

Describes the position event. 

  • Deleted: The position is deleted. 
  • New: The position is created. 
  • OptionExercised: The position has been deleted when an option was exercised. 
  • OptionExpired: The position has been deleted when an option expired. 
  • Updated: The position has been updated.

PositionId

String

Identifies the position.

PremiumAmount

decimal

The premium of an FX option.

PricedecimalIdentifies the price of the transaction.

PriceType

PriceType

  • Amount: The quoted price is an amount 
  • Ccy1Percentage: The quoted price is a percentage of the first currency of the pair 
  • Ccy1Pips: The quoted price is in pips of the first currency of the currency pair 
  • Ccy2Percentage: The quoted price is a percentage of the second currency of the pair 
  • Ccy2Pips: The quoted price is in pips of the second currency of the currency pair 
  • ThirdCurrency: The quoted price is in the third currency

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.

SymbolstringSymbol- A combination of letters used to uniquely identify a traded instrument. e.g. ODAX/X13C8950:xeur.
UICIntUic 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 EventDescription
DeletedThe position is deleted.
NewThe position is created.
OptionExercised

The position has been deleted as the option has been exercised.

OptionExpiredThe position has been deleted when an option expired.
UpdatedThe position has been updated.