can anybody help me please to make sure the API_Duplicate outside of the while loops only runs once?
My methodology is:
for while MarketIsActive == 'True' to run continuously, listening for updates and assigning it to API_Data.
outside of the while loop, the API_duplicate = API_Data only needs to execute the once to assign its value.
this allows the second while loop, while API_Duplicate != API_Data to perform and take over the responsibility of assigning the API_duplicate = API_Data within the loop itself.
while MarketIsActive == 'True':
API_data = 'API_endpoint'
API_duplicate = API_Data
while API_Duplicate != API_Data
API_duplicate = API_Data
# extra code
Thank you.
if API_Duplicate != API_Data