TickHistoryTimeAndSalesExtractionRequest - Getting last price nearest to a date

Instead of getting all prices for a date/time range, how would a single get the price for a Ric nearest a supplied time. So if I want a price for BT.L nearest to say 30th Jan 2018 at time 15:30:00, then I want the latest price on that time or the nearest time before that. I only want a single record returned per Ric.

Best Answer

Answers

  • I confirm, also for 12.2.

    See TRTH
    12.1 Release notes
    page 6:

    You can query multiple
    instruments, each with its own date/time range. It is not possible to specify
    a point in time; it must be a range (i.e. use a start and end
    time).

    Consequence: you must
    make your own algorithm & code to select from the results the data closest to
    the point in time you are interested in.

    Note: data is only returned for the specified range, there is no look back. If it is too short there might be no data. You must find a tradeoff between range size and volume of data to manage, taking volatility into account.

  • TRTH 12.1 Release notes page 6:

    You can query multiple instruments each with its own date/time range. It is impossible to specify a point in time; it must be a range (start to end times).

    This is in EAP (Early Access Program).

    You need your own algorithm & code to select from the results the data closest to the point in time you want.

    Note: data is only returned for the specified range, there is no look back. If it is too short there might be no data. You must find a trade off between range size and data volume, taking volatility into account.

    See this thread for more details.

    TRTH 12.2 is the same