Added companies and shareholders main loop

This commit is contained in:
Lukian 2024-12-29 14:52:50 +01:00
parent 8f11c56d1a
commit b002d0d730
4 changed files with 32 additions and 22 deletions

View file

@ -1,6 +1,8 @@
import requests
from time import sleep
from random import randint
HOST = "http://localhost:3000/"
HOST = "http://192.168.200.15/"
"""Affichage des actions mises en vente par une entreprise
input :
@ -38,5 +40,13 @@ def getCompanies():
return r.json()
if __name__ == "__main__":
pass
while True:
companies = getCompanies()
for company in companies:
price = randint(20, 2000)
for i in range(randint(0, 10)):
emmitShare(company["id"], price)
sleep(30)