get quote price

This commit is contained in:
2018-10-01 09:29:58 +02:00
parent 7ba93f6316
commit 555ea3a32b
2 changed files with 7 additions and 13 deletions

View File

@@ -111,10 +111,8 @@ def home(request):
for item in actifs:
if item.type == 'ACTION':
# get FT price
quote_price = getFTQuote(item.symbole)
if quote_price:
update_actif_valeur(request, item.symbole, quote_price['Close'])
time.sleep(2) # attendre 2 secondes
update_actif_valeur(request, item.symbole, getFTQuote(item.symbole))
time.sleep(2) # attendre 2 secondes
# update du portefeuille
update_portefeuille(request, logged_in)