1
0
mirror of https://gitlab.com/simple-stock-bots/simple-stock-bot.git synced 2025-07-27 08:31:41 +00:00

Add list of stocks to bot

This commit is contained in:
2023-10-12 02:42:52 +00:00
parent 4a556597df
commit 66f233918e
10 changed files with 47 additions and 23 deletions

View File

@@ -29,11 +29,12 @@ class Symbol:
class Stock(Symbol):
"""Stock Market Object. Gets data from MarketData"""
def __init__(self, symbol: str) -> None:
self.symbol = symbol
self.id = symbol
self.name = "$" + symbol.upper()
self.tag = "$" + symbol.lower()
def __init__(self, symbol_info: dict) -> None:
self.symbol = symbol_info["ticker"]
self.id = symbol_info["ticker"]
self.name = symbol_info["title"]
self.tag = "$" + symbol_info["ticker"]
self.market_cap_rank = symbol_info["mkt_cap_rank"]
class Coin(Symbol):