Advertisement
Guest User

Untitled

a guest
Apr 29th, 2021
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.29 KB | None | 0 0
  1. import yfinance as yf
  2. import serial
  3. import time
  4. ser = serial.Serial('COM4',9600)
  5.  
  6.  
  7. def get_current_price(GME):
  8.     ticker = yf.Ticker(GME)
  9.     todays_data = ticker.history(period='1d')
  10.     return todays_data['Close'][0]
  11.  
  12. print(get_current_price('GME'))
  13.  
  14. ser.write(get_current_price(GME))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement