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
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.
Requesting the number of all active orders from account 1:
=RTD(“qst.rtd”, “”, “nrOfOrderIds( PTS | 1 | | WRK )”)
Requesting the number of all orders from account 1 and instrument ZCH26:
=RTD(“qst.rtd”, “”, “nrOfOrderIds( PTS | 1 | ZCH26 | )”)
Requesting the number of all active orders from account 1 and instrument ZCH26:
=RTD(“qst.rtd”, “”, “nrOfOrderIds( PTS | 1 | ZCH26 | WRK )”)