Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to request several tickers at once #16

Closed
cerezoafc opened this issue Mar 16, 2018 · 1 comment
Closed

How to request several tickers at once #16

cerezoafc opened this issue Mar 16, 2018 · 1 comment

Comments

@cerezoafc
Copy link

I want to request several tickers at once, for instance US and Spain's GDP.
I have no problem requesting each series one by one. but when I add a list of tickers, I get an error message. I cannot add a "field" because these series have no available field in Datastream, as far as I know.

from pydatastream import Datastream
DWE = Datastream(username='DS:XXXXX', password='XXXXX')
DWE.fetch(['ESXGDPR.D','USGDP...D'], date_from='1980-01-01')

invalid value encountered in absolute
inside = ((abs(dx0 + dx1) + abs(dy0 + dy1)) == 0)
Traceback (most recent call last):

File "", line 1, in
gdp = DWE.fetch(['ESXGDPR.D','USGDP...D'], date_from='1980-01-01')

File "C:\Python27\lib\site-packages\pydatastream\pydatastream.py", line 513, in fetch
dat, meta = self.parse_record(raw, indx)

File "C:\Python27\lib\site-packages\pydatastream\pydatastream.py", line 295, in parse_record
status['StatusMessage'], status['Request']))

DatastreamException: Failure (error 2): $$"ER", E100, INVALID CODE OR EXPRESSION ENTERED, USGDP...D(P) --> "ESXGDPR.D,USGDP...D1980-01-01D"

Thank you

@vfilimonov
Copy link
Owner

This is a duplicate of #11 (#14 is also relevant).

Please see Note 1 in README.md for the explanations.

With respect to the GDP - you could try "ES" or "ESA" fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants