Market Value for tickers is not working even where other functionality works:
The following code:
xxx = ds.get_data(tickers= '@AMZN', fields = "MV",start=str(start), end =str(end), freq = 'D')
Would be very grateful for advice on this.
Thank you in advance
In get_data method the "fields" kwarg must be a Python list. When you provide a multi-character string (like "MV") instead of a list, the string is converted to the list of characters (resulting in ['M','V']). Since both 'M' and 'V' are invalid Datastream datatypes, you get the error "$$ER: E100,INVALID CODE OR EXPRESSION ENTERED". Use
ds.get_data(tickers='@AMZN', fields=['MV'], start=str(start), end=str(end), freq='D')