question

Upvotes
Accepted
7 2 2 6

Exchange error when getting Rics listed on specific exchange

var end = new DateTimeOffset(beginDate, TimeSpan.Zero);
var start = beginDate.AddDays(-1);

var retExpandedChain = searchcontext.HistoricalCriteriaSearch(HistoricalCriteriaSearchRequest.Create(
null, // regex pattern, this pattern finds all instruments that end with ".N".
null, //description
null, //bond type
null, //contributer
null, //country
null, //currency
new[] { "NMQ" }, //exchange
null, //future months code
null, //instrument type
null,//option month
null, //option type
null, //coupon rate
null, //strike
null, //expiration date
null,//maturity date
DateTimeRange.Create(start, end),//range
HistoricalResultsBy.Ric));

I also tried NMQ,NSQ,NYQ,PCQ exchange codes. This used to work in TrthV1

I get error Request from client is invalid. { Detail : Invalid exchange , MessageId : REQ_0001 }

tick-history-rest-api
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
23k 22 9 14

HistoricalCriteriaSearch does not, per spec, expect 3-letter active exchange identifiers.

The parameter "exchange" expects as input numeric historical exchange codes, for the list of Exchange Codes and Names please refer to Hisotorical Exchange Codes in API Reference. This includes present and past entries.

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.

Click below to post an Idea Post Idea