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