Update main.py
Browse files
main.py
CHANGED
@@ -44,7 +44,7 @@ async def get_stocks_data(ticker: str, intervals: int, days: int):
|
|
44 |
@app.get('/chain')
|
45 |
async def get_stocks_data(ticker: str):
|
46 |
try:
|
47 |
-
response, exp = fetcher.fetch_option_chain(
|
48 |
return {"data" : response}
|
49 |
except:
|
50 |
return {"Timeout" : "Error"}
|
|
|
44 |
@app.get('/chain')
|
45 |
async def get_stocks_data(ticker: str):
|
46 |
try:
|
47 |
+
response, exp = fetcher.fetch_option_chain(ticker).to_dict(orient="records")
|
48 |
return {"data" : response}
|
49 |
except:
|
50 |
return {"Timeout" : "Error"}
|