Skip to content

Commit c76d585

Browse files
authored
Merge pull request #52 from EodHistoricalData/dev
Dev
2 parents 3ba2aec + 920da12 commit c76d585

4 files changed

Lines changed: 42 additions & 13 deletions

File tree

README.md

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,49 @@
11
# Official EODHD APIs Python Library
2-
https://eodhd.com
2+
[Full documentation](https://eodhd.com/financial-apis/python-financial-libraries-and-code-samples/)
3+
4+
This is the official Python library developed by [EODHD](https://eodhd.com) for accessing various financial data via API in your code. If you have any feedback or questions, you can reach out to our support team, available 24/7 via live chat on [our website](https://eodhd.com).
5+
6+
To access our APIs, you need to register on our site (it’s free) and obtain an API key. Access to some data requires a subscription to one of [our paid plans](https://eodhd.com/pricing).
7+
8+
## List of supported data:
9+
10+
* End of the Day Historical Stock Market Data
11+
* Live (Delayed) Stock Prices and Macroeconomic Data
12+
* Bonds Fundamentals
13+
* Intraday Historical Data
14+
* Historical Dividends
15+
* Historical Splits
16+
* Bulk API for EOD, Splits and Dividends
17+
* Calendar. Upcoming Earnings, Trends, IPOs and Splits
18+
* Economic Events
19+
* Stock Market and Financial News
20+
* List of supported Exchanges
21+
* Insider Transactions
22+
* Macro Indicators
23+
* Exchange API. Trading Hours, Stock Market Holidays, Symbols Change History
24+
* Stock Market Screener
25+
* Technical Indicator
26+
* Historical Market Capitalization
27+
* Fundamental Data: Stocks, ETFs, Mutual Funds, Indices and Cryptocurrencies
28+
29+
All functions are described in our [documentation](https://eodhd.com/financial-apis/python-financial-libraries-and-code-samples/).
30+
331

432
## Installation
533

6-
python3 -m pip install eodhd -U
34+
In short:
735

8-
## Note
36+
python3 -m pip install eodhd -U
937

10-
Demo API key below is provided by EOD Historial Data for testing purposes
11-
<https://eodhd.com/financial-apis/new-real-time-data-api-websockets?utm_source=github&utm_medium=eod&utm_campaign=python_lib>
38+
If you have any difficulties, go to our full [documentation](https://eodhd.com/financial-apis/python-financial-libraries-and-code-samples/) with step by step instructions.
1239

1340
## Sample code and examples
1441

15-
The files below contain examples of available functions
42+
The files below contain examples of available functions:
43+
44+
* example_api.py: describes the functions that can be used in the APIClient class.
45+
* example_scanner.py: describes the functions that can be used in the ScannerClient class.
46+
* example_websockets.py: describes the functions that can be used in the WebSocketClient class.
1647

17-
* example_api.py - describes the functions that can be used in the apiclient file (APIClient class)
18-
* example_scanner.py - describes the functions that can be used in the apiclient file (ScannerClient class)
19-
* example_websockets.py - describes the functions that can be used in the websocketclient file (WebSocketClient class)
2048

2149
New features will be added to the example files. The most relevant functions can be viewed directly in the code files.

eodhd/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88

99

1010
# Version of eodhd package
11-
__version__ = "1.0.29"
11+
__version__ = "1.0.30"

eodhd/apiclient.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ def get_historical_data(
330330
except ValueError:
331331
self.console.log("invalid end date (yyyy-mm-ddThh-mm-ss OR yyyy-mm-dd OR nnnnnnnnnn):", iso8601_end)
332332
sys.exit()
333-
333+
334+
LIMIT_FOR_1M = 120 # Limit for 1m interval
334335
if iso8601_start == "" or ((iso8601_start != "" and not re_iso8601.match(iso8601_start)) and (iso8601_start != "" and not re_date_only.match(iso8601_start))):
335336
if interval == "d":
336337
date_from = str(int((datetime.fromtimestamp(int(date_to)) - timedelta(days=(results - 1))).timestamp()))
@@ -339,7 +340,7 @@ def get_historical_data(
339340
elif interval == "m":
340341
date_from = str(int((datetime.fromtimestamp(int(date_to)) - timedelta(months=(results - 1))).timestamp()))
341342
else:
342-
date_from = str(int((datetime.fromtimestamp(int(date_to)) - timedelta(days=(results - 1))).timestamp()))
343+
date_from = str(int((datetime.fromtimestamp(int(date_to)) - timedelta(days=(LIMIT_FOR_1M))).timestamp()))
343344
else:
344345
try:
345346
if re_date_only.match(iso8601_start):

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# This call to setup() does all the work
1717
setup(
1818
name="eodhd",
19-
version="1.0.29",
19+
version="1.0.30",
2020
description="Official EODHD API Python Library",
2121
long_description=long_description,
2222
long_description_content_type="text/markdown",

0 commit comments

Comments
 (0)