Spaces:
Running
Running
Benjamin Consolvo
commited on
Commit
·
fc077e3
1
Parent(s):
120dc41
detailed holdings
Browse files
app.py
CHANGED
|
@@ -627,8 +627,9 @@ def main():
|
|
| 627 |
st.button("Refresh Holdings", on_click=update_holdings)
|
| 628 |
|
| 629 |
# Add an expandable section for detailed holdings
|
|
|
|
| 630 |
with st.expander("View Detailed Holdings"):
|
| 631 |
-
holdings = app.alpaca.getHoldings()
|
| 632 |
if holdings:
|
| 633 |
detailed_holdings = pd.DataFrame(
|
| 634 |
[{"Ticker": ticker, "Amount (USD)": round(value)} for ticker, value in holdings.items()]
|
|
|
|
| 627 |
st.button("Refresh Holdings", on_click=update_holdings)
|
| 628 |
|
| 629 |
# Add an expandable section for detailed holdings
|
| 630 |
+
st.subheader("Detailed Holdings")
|
| 631 |
with st.expander("View Detailed Holdings"):
|
| 632 |
+
holdings = app.alpaca.getHoldings() # Use self.alpaca instead of app.alpaca
|
| 633 |
if holdings:
|
| 634 |
detailed_holdings = pd.DataFrame(
|
| 635 |
[{"Ticker": ticker, "Amount (USD)": round(value)} for ticker, value in holdings.items()]
|