dont even need to import datetime
This commit is contained in:
parent
ef40a0f7cb
commit
2fc686aa9c
@ -1,4 +1,3 @@
|
|||||||
from datetime import date
|
|
||||||
import requests
|
import requests
|
||||||
import os
|
import os
|
||||||
|
|
||||||
@ -20,4 +19,4 @@ def get_stock(share_name):
|
|||||||
target_date = request['Meta Data']['3. Last Refreshed']
|
target_date = request['Meta Data']['3. Last Refreshed']
|
||||||
blob = request['Time Series (Daily)'][target_date]
|
blob = request['Time Series (Daily)'][target_date]
|
||||||
|
|
||||||
return "```Symbol: {}\nOpen: {}\nClose: {}\nHigh: {}\nLow: {}\nVolume: {}```".format(share_name.upper(), blob['1. open'], blob['4. close'], blob['2. high'], blob['3. low'], blob['5. volume'])
|
return "```Symbol: {}\nOpen: {}\nClose: {}\nHigh: {}\nLow: {}\nVolume: {}```".format(share_name.upper(), blob['1. open'], blob['4. close'], blob['2. high'], blob['3. low'], blob['5. volume'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user