The Position Details Request

The purpose of this functionality is to provide different details about a position. It is recommended using this request together with the positionAtIndex request, which provides the position id needed for extracting the details.

The positionDetails format

The positionDetails request receives a total of 4 parameters from which the position is identified, along with the requested detail.
The parameters are separated by a vertical bar ‘|’ character.
positionDetails( Provider | Account | PositionId | PositionDetail )

The standard call of the RTD function which uses positionDetails:

=RTD("qst.rtd", "", "positionDetails( Provider | Account | PositionId | PositionDetail )")

The positionDetails parameters are explained below:

  • Provider – the order entry provider, ex. PTS, QOR

  • Account – account that contains the position (QST needs to be connected to this account)

  • PositionId – the id of the position

  • PositionDetail – the position field requested

Note

The order of these parameters is mandatory, ex. Parameter 1, Provider, cannot be switched with parameter 2, Account. The parameters are not case sensitive.

The PositionDetail parameter represents the specific information requested for a position.
Possible PositionDetail values:
  • SM – summary, compiles the standard details of a position

  • SD - side (Buy/Sell)

  • QT – position quantity

  • INS – instrument symbol

  • PR – position price

  • OD – order id (only for fills)

  • EXP – position instrument expiration date

Note

You can only request one specific piece of information per request, if you need information about the position as a whole and not a specific detail, it is recommended using the SM (summary) parameter.

Example of positionDetails request

After selecting any desired cell from the Excel spreadsheet, copy paste the RTD function in the formula bar, having replaced the RTD parameters accordingly. Or enter the parameters separately and combine them for the RTD request.

In the examples below, the positionDetails parameters are passed to the main request as a concatenation function, ex: =RTD(“qst.rtd”,””,”positionDetails(” & CONCAT(B1,”|”,B2,”|”,B9,”|”,B5) & “)”), where CONCAT(B1,”|”,B2,”|”,B9,”|”,B5) would be equivalent to the string PTS|886|NETESU26|EXP.
  1. Requesting the expiration date for the ESU26 net position:

=RTD("qst.rtd", "", "positionDetails( PTS | 886 | NETESU26 | EXP )")
../_images/positionDetails_exp.png

  1. Requesting the order id for fill #10745956:

=RTD("qst.rtd", "", "positionDetails( PTS | 886 | 10745956 | OD )")
../_images/positionDetails_ord.png

  1. Requesting the price for the open position :

=RTD("qst.rtd", "", "positionDetails( PTS | 886 | 22 | PR )")
../_images/positionDetails_price.png

  1. Requesting the summary (detailed info) for ZCU26 net position:

=RTD("qst.rtd", "", "positionDetails( PTS | 2 | NETZCU26 | SM )")
../_images/positionDetails_sm.png