question

Upvote
Accepted
16 0 1 2

.WithView( Format)?

Dear all , i'm using the SDK to get historical data, i don't find the possibilities that exist for

.WithView( ), can somebody tel me what are the possibilities and where is the documentation about that , I know that we can use

.WithView("BID") for the forex, also

.WithView("TRDPRC_1") for other instrument, but what are the different options for the string argument ?

eikoneikon-com-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.

Upvote
Accepted
38.1k 71 35 53

You can use ITimeSeriesDataService.GetViewList(...) which returns a list of available Time Series views for a specific RIC.

IViewListRequest GetViewList( string ric, Action<IEnumerable<View>> viewsCallback, Action<TimeSeriesError> errorCallback = null );


IViewListRequest GetViewList( string ric, string feed, Action<IEnumerable<View>> viewsCallback, Action<TimeSeriesError> errorCallback = null )

The View contains view name, description, and intervals.

The sample code is:

   IViewListRequest viewRequest = timeSeries.GetViewList("IBM.N",
                v =>               {                      
                  foreach (View view in v)
                    {
                        List<string> intervalList = new List<string>();
                        foreach (Interval interval in view.Intervals)
                        {
		 intervalList.Add(interval.Type.ToString()+"("+interval.Length+")");
                        }
		Console.WriteLine("View: {0}({1}) => Interval: {2}", view.Name, view.Flags.ToString(), String.Join(", ", intervalList.ToArray()));                       
                    }                }                );

The available views for IBM.N are:

View Name: ASK (None) => Intervals: Tick(1), Minute(1), Minute(5), Minute(10), Minute(30), Minute(60), Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: BID (None) => Intervals: Tick(1), Minute(1), Minute(5), Minute(10), Minute(30), Minute(60), Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: BLKVOLUM (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: MID_PRICE (None) => Intervals: Tick(1), Minute(1), Minute(5), Minute(10), Minute(30), Minute(60)
View Name: MTD_TRTN (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: NDA_RAW (Raw) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: NETCHNG_1 (None) => Intervals: Tick(1)
View Name: PCTCHNG (None) => Intervals: Tick(1)
View Name: QTD_TRTN (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRDPRC_1 (Default) => Intervals: Tick(1), Minute(1), Minute(5), Minute(10), Minute(30), Minute(60), Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1), Trades(1), Quotes(1), TradeAndQuotes(1), None(1)
View Name: TRNOVR_UNS (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN_1M (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN_1W (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN_2Y (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN_3MT (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN_3Y (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN_4Y (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TRTN_5Y (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: TSDB_RAW (Raw) => Intervals: Minute(1), Minute(30), Daily(1), Trades(1), Quotes(1), None(1)
View Name: TSFCP_RAW (Raw) => Intervals: Minute(1), Minute(30), Daily(1), Trades(1), Quotes(1), None(1)
View Name: VWAP (None) => Intervals: Tick(1), Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: YR_TRTN (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)
View Name: YTD_TRTN (None) => Intervals: Daily(1), Weekly(1), Monthly(1), Quarterly(1), Yearly(1)

view.png (111.8 KiB)
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.

Upvotes
39.2k 75 11 27

In addition to info provided by Jirapongse I would strongly advocate using Excel with Eikon add-in for data retrieval modeling. Eikon Excel add-in provides Formula Builder GUI helper, which facilitates searching for instruments, views, fields, parameters applicable to fields and so on. Once you finish going through Formula Builder, the wizard inserts a worksheet function into Excel worksheet, which retrieves the data and allows you to quickly verify if the data retrieved is what you expect. Once you've figured out how to retrieve data you're looking for into Excel, replicating the data retrieval in code is a fairly straightforward task.

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