-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample_graph.py
23 lines (16 loc) · 805 Bytes
/
example_graph.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
"""API example"""
import config as cfg
from eodhd import APIClient
from eodhd import EODHDGraphs
def main() -> None:
"""Main"""
api = APIClient(cfg.API_KEY)
graphs = EODHDGraphs()
df = api.get_historical_data("GSPC.INDX", "1d")
# graphs.fibonacci_extension(df, "uptrend", "adjusted_close", save_file="")
# graphs.fibonacci_extension(df, "uptrend", "adjusted_close", save_file="", quiet=False)
# graphs.fibonacci_retracement(df, "downtrend", "adjusted_close", save_file="fibonacci_retracement_downtrend.png", quiet=False)
# graphs.fibonacci_retracement(df, "downtrend", "adjusted_close", save_file="fibonacci_retracement_uptrend.png", quiet=True)
graphs.fibonacci_retracement(df, "downtrend", "adjusted_close", save_file="")
if __name__ == "__main__":
main()