For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 1 2 5

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.

dss-rest-apidatascope-selectdss
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @william.a.maguire

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If so please can you click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
13.7k 26 8 12

@william.a.maguire, I'm sorry, such a call is not available. I passed your message to the product team, you are not the first to ask for this.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @Christiaan Meihsl, not sure what's the current situation of this request. Is a single record request supported by DSS REST now? If not, the triage of this question will be extended 1 month next time.

@Nipat Kunvutipongsak, as far as I know such a request is not yet supported. Release 12.1 introduced a new call: Single Price History (12.0 introduced Single Historical Price), but both of these deliver a single price for a day, not for a specific time. I believe these calls are only for DSS users, not TRTH users, but I'm not 100% sure. Once the 12.1 release notes are published we will have more info.

@Christiaan Meihsl Thanks a lot. :)

Show more comments

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.