Skip to content

Commit

Permalink
editted final piece in using getting latest price instead of closing …
Browse files Browse the repository at this point in the history
…price
  • Loading branch information
yeonholee50 committed Nov 11, 2024
1 parent 7fb3e9b commit 5943707
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trading_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def main():
historical_data = get_historical_data(ticker, data_client)
ticker_yahoo = yf.Ticker(ticker)
data = ticker_yahoo.history()
current_price = data['Close'].iloc[-1]
current_price = get_latest_price(ticker)

asset_info = asset_collection.find_one({'symbol': ticker})
portfolio_qty = asset_info['quantity'] if asset_info else 0.0
Expand Down

0 comments on commit 5943707

Please sign in to comment.