question

Upvotes
Accepted
69 9 17 18

HistoricalCriteriaSearch - More detailed example

Hi, we currently try to make a HistoricalCriteriaSearch request. Looks like we are doing something wrong and we have the feeling that there are 'hidden' dependencies regarding the available search fields. We are performing the following request:

{ "Request": { "RicPattern": "^DTEGn", "CurrencyCodes": [ "EUR" ], "OptionMonthCodes": ["X" ], "Range": { "Start": "2016-11-07T00:00:00.000Z", "End": "2017-11-08T00:00:00.000Z" } } }

And we get this response:

{ "error": { "message": "Gateway ETH returned error status code: BadRequest from (http://rp.cp.hdc.reuint.com/TickHistoryWS/search) Error ID: [29427a15-c7e9-4079-9183-216ee22f14c2]" } }

Can you please advice? We need this search request to lookup expired options and futures, and we really rely on this...

Thx in advance!

dss-rest-apitick-history-rest-apihistorical
icon clock
10 |1500

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

1 Answer

Upvotes
Accepted
13.7k 26 8 12

@Philipp

The REST API Reference tree description of the parameters of the HistoricalCriteriaSearch call shows that for this API call currency codes must be encoded using the ISO-4217 code number, not the text. Instead of EUR, use 978. This request will deliver data instead of an error:

{ "Request": { "RicPattern": "^DTEGn", "CurrencyCodes": [ "978" ], "OptionMonthCodes": ["X" ], "Range": { "Start": "2016-11-07T00:00:00.000Z", "End": "2017-11-08T00:00:00.000Z" } } }
icon clock
10 |1500

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

Thx a lot!

Click below to post an Idea Post Idea