Skip to content

Commit

Permalink
fix the economic calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
jkoestner committed Aug 14, 2024
1 parent b372971 commit c984b1e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions folioflex/dashboard/pages/macro.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,10 @@ def layout():
),
]
)


# ____ _ _ _ _
# / ___|__ _| | | |__ __ _ ___| | _____
# | | / _` | | | '_ \ / _` |/ __| |/ / __|
# | |__| (_| | | | |_) | (_| | (__| <\__ \
# \____\__,_|_|_|_.__/ \__,_|\___|_|\_\___/
4 changes: 3 additions & 1 deletion folioflex/portfolio/wrappers.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,9 @@ def normalize_date(date, time):
"countries": ["US"],
"minImportance": minImportance,
}
response = requests.get(url, params=payload).json()
# headers are now required as 07/24/2024
headers = {"Origin": "https://us.tradingview.com"}
response = requests.get(url, params=payload, headers=headers).json()
calendar = pd.DataFrame(response["result"])
calendar["date"] = pd.to_datetime(calendar["date"]).dt.date
# select columns to keep
Expand Down

0 comments on commit c984b1e

Please sign in to comment.