apologist / eoddata-client Goto Github PK
View Code? Open in Web Editor NEWPython client to get historical data from eoddata web service.
License: The Unlicense
Python client to get historical data from eoddata web service.
License: The Unlicense
symbol_history_period_by_range() fails with 'd' and 'w'
The XML response from eoddata.com is missing the the Symbol attribute in at least one element. This results in a KeyError. Eoddata has not responded regarding this issue.
<RESPONSE xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://ws.eoddata.com/Data" Source="Data.SymbolHistoryPeriodByDateRange" Message="Success" Date="0001-01-01T00:00:00">
<QUOTES>
<QUOTE Symbol="NFLX" Description="Netflix Inc" Name="Netflix Inc" DateTime="2017-05-22T00:00:00" Open="157.86" High="158.6" Low="156.43" Close="157.16" Volume="3744000" OpenInterest="0" Previous="0" Change="0" Bid="0" Ask="0" PreviousClose="0" NextOpen="0" Modified="2017-05-22T13:01:05.44"/>
<QUOTE Symbol="NFLX" Description="Netflix Inc" Name="Netflix Inc" DateTime="2017-05-23T00:00:00" Open="157.75" High="158.31" Low="156.8" Close="157.95" Volume="3370900" OpenInterest="0" Previous="0" Change="0" Bid="0" Ask="0" PreviousClose="0" NextOpen="0" Modified="2017-05-23T15:49:19"/>
<QUOTE Symbol="NFLX" Description="Netflix Inc" Name="Netflix Inc" DateTime="2017-05-24T00:00:00" Open="158.35" High="158.48" Low="157.17" Close="157.75" Volume="2989700" OpenInterest="0" Previous="0" Change="0" Bid="0" Ask="0" PreviousClose="0" NextOpen="0" Modified="2017-05-24T16:07:48.783"/>
<QUOTE Symbol="NFLX" Description="Netflix Inc" Name="Netflix Inc" DateTime="2017-05-25T00:00:00" Open="161" High="164.1" Low="160.55" Close="163.05" Volume="8560900" OpenInterest="0" Previous="0" Change="0" Bid="0" Ask="0" PreviousClose="0" NextOpen="0" Modified="2017-05-25T16:00:52.4"/>
<QUOTE Symbol="NFLX" Description="Netflix Inc" Name="Netflix Inc" DateTime="2017-05-26T00:00:00" Open="162.84" High="163.05" Low="161.12" Close="162.43" Volume="4834200" OpenInterest="0" Previous="0" Change="0" Bid="0" Ask="0" PreviousClose="0" NextOpen="0" Modified="0001-01-01T00:00:00"/>
<QUOTE DateTime="2017-05-29T00:00:00" Open="162.43" High="162.43" Low="162.43" Close="162.43" Volume="0" OpenInterest="0" Previous="0" Change="0" Bid="0" Ask="0" PreviousClose="0" NextOpen="0" Modified="0001-01-01T00:00:00"/>
<QUOTE Symbol="NFLX" Description="Netflix Inc" Name="Netflix Inc" DateTime="2017-05-30T00:00:00" Open="163.6" High="164.75" Low="162.77" Close="163.44" Volume="3057913" OpenInterest="0" Previous="0" Change="0" Bid="0" Ask="0" PreviousClose="0" NextOpen="0" Modified="2017-05-30T12:36:32.783"/>
</QUOTES>
</RESPONSE>
File "/Users/xxx/SpyderProjects/charts/charts.py", line 51, in load_symbol
df = eod_data.symbol_history_period_by_range('NASDAQ', 'NFLX', dt.datetime.strptime('2015-05-28', '%Y-%m-%d'), dt.datetime.today(), 'w', output_format='data-frame')
File "/Users/xxx/SpyderProjects/charts/eoddata_client/eoddata_client.py", line 133, in wrapper
result = func(*args, **kwargs)
File "/Users/xxx/SpyderProjects/charts/eoddata_client/eoddata_client.py", line 601, in symbol_history_period_by_range
quote = EodDataQuoteExtended.from_xml(quote_xml)
File "/Users/xxx/SpyderProjects/charts/eoddata_client/business_entities.py", line 271, in from_xml
symbol=quote_dict['Symbol'],
KeyError: 'Symbol'
Hey what subscription do i need to use this please?
gold silver,....
thx a lot,
Fons
Fixed in eoddata_client.py, but cannot upload a file or issue a pull request in this repository.
Add a new message type:
MSG_NO_DATA_AVAILABLE = 'No data available'
Add a new Error class:
class NoDataAvailableError(Error):
Update def process_response
to include
elif message == MSG_NO_DATA_AVAILABLE:
raise NoDataAvailableError(message);
Is there some sort of download limit that eoddata imposes? I've written a script to download intra-day data for three markets @ 10 and 30 minute intervals, using
quote_list_by_date_period_compact(exchange, date, period, output_format="data-frame")
The idea is that I import this data nightly to build up some history. However, sometimes this works beautifully, but other times the request simply times out and I get an empty dataframe. It always takes quite a long time (many 10s of seconds) per request.
Thanks for the code. Could you please let me know whether this code is still working now? I try to use this code to access data from EODDATA, but it always fails to login and replies "Invalid Username or Password", which I'm sure is correct and works well when login through browser.
This Client API is really useful, thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.