question

Upvotes
Accepted
7 3 3 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 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
32.2k 40 11 19

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 512.0 KiB each and 1.0 MiB total.

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.