Skip to content

Commit

Permalink
bugfixing by removing symbols with -
Browse files Browse the repository at this point in the history
  • Loading branch information
MuslemRahimi committed Dec 27, 2024
1 parent f48e193 commit 774cec7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/create_stock_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,8 @@ async def fetch_tickers():
db = StockDatabase('backup_db/stocks.db')
loop = asyncio.get_event_loop()
all_tickers = loop.run_until_complete(fetch_tickers())

all_tickers = [item for item in all_tickers if '-' not in item['symbol'] or item['symbol'] in ['BRK-A', 'BRK-B']]
#all_tickers = [item for item in all_tickers if item['symbol'] == 'ZJK']
'''
existing_names = set()
Expand Down
1 change: 0 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -1863,7 +1863,6 @@ async def get_stock(
0 if item.get('marketCap') is None else -item['marketCap']
)
)[:5]

return JSONResponse(content=orjson.loads(orjson.dumps(results)))


Expand Down

0 comments on commit 774cec7

Please sign in to comment.