The Number of Orders Request

The purpose of this functionality is to provide a snapshot of the number of orders for a particular provider, account and optionally an instrument.

The nrOfOrderIds format

The nrOfOrderIds request receives a total of 4 parameters which will filter the number of orders.
The parameters are separated by a vertical bar ‘|’ character. Parameters in [ ] can be omitted.
nrOfOrderIds( Provider | Account | [Instrument] | [Working] )

The standard call of the RTD function which uses nrOfOrderIds:

=RTD(“qst.rtd”, “”, “nrOfOrderIds( Provider | Account | [Instrument] | [Working] )”)

The nrOfOrderIds parameters are explained below:

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

  • Account – filter by account number

  • Instrument – [optional] filter by a specific instrument, if missing it will filter by provider and account

  • Working – [optional] filter by active orders by using the keyword “WRK”, if missing it will display all orders (including canceled ones)

Note

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

Note

This request works like a snapshot, if new orders are added in the meanwhile, the request needs to be requeried to provide the updated number.

Because Excel caches the response, when requering from Excel it is needed to change the request each time: a simple add/remove of a space is enough. If the parameters are listed separately and concatenated for the request, adding/removing a space in the cell of a parameter will trigger the requery.

Example of nrOfOrderIds 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.

  1. Requesting the number of all active orders from account 1:

=RTD(“qst.rtd”, “”, “nrOfOrderIds( PTS | 1 | | WRK )”)
../_images/nrOfOrderIds_wrk.png

  1. Requesting the number of all orders from account 1 and instrument ZCH26:

=RTD(“qst.rtd”, “”, “nrOfOrderIds( PTS | 1 | ZCH26 | )”)
../_images/nrOfOrderIds_ins.png

  1. Requesting the number of all active orders from account 1 and instrument ZCH26:

=RTD(“qst.rtd”, “”, “nrOfOrderIds( PTS | 1 | ZCH26 | WRK )”)
In the screenshot the nrOfOrderIds parameters are first concatenated: =CONCAT(D2,”|”,D3,”|”,D4,”|”,D5) , resulting in the string “PTS|1|ZCH26|WRK” stored in cell D6.
This is then passed as a parameter to the main request: =RTD(“qst.rtd”,””,”nrOfOrderIds(”& D6 & “)”).
../_images/nrOfOrderIds_wrk_ins.png