1
0
mirror of https://gitlab.com/simple-stock-bots/simple-discord-stock-bot.git synced 2025-08-02 19:41:37 +00:00

Copy pasted all changes from Telegram bot

This commit is contained in:
2023-04-15 18:12:34 -06:00
parent eb48ab74c2
commit 32d83afdea
18 changed files with 813 additions and 1480 deletions

View File

@@ -27,17 +27,13 @@ class Symbol:
class Stock(Symbol):
"""Stock Market Object. Gets data from IEX Cloud"""
"""Stock Market Object. Gets data from MarketData"""
def __init__(self, symbol: pd.DataFrame) -> None:
if len(symbol) > 1:
logging.info(f"Crypto with shared id:\n\t{symbol.id}")
symbol = symbol.head(1)
self.symbol = symbol.symbol.values[0]
self.id = symbol.id.values[0]
self.name = symbol.name.values[0]
self.tag = symbol.type_id.values[0].upper()
def __init__(self, symbol: str) -> None:
self.symbol = symbol
self.id = symbol
self.name = "$" + symbol.upper()
self.tag = "$" + symbol.lower()
class Coin(Symbol):