I am trying to code a trading bot using Python. I have a list of yesterday's stock prices and a function which changes this list ( so I need to run it daily). I also have second function which I need to run every minute and which takes the list from above as an argument. How do I make this work so that both functions run periodically, but do not run first function each time I run the second function?
list_prices = [...]
def function1():
global list_prices
list_prices = ...
return
def function2(list_prices):
...
return