mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-16 07:16:40 +00:00
bug crunching
This commit is contained in:
parent
0b887b7042
commit
d99e7bc84a
6
bot.py
6
bot.py
@ -262,8 +262,8 @@ def intra(update: Update, context: CallbackContext):
|
||||
update.message.reply_photo(
|
||||
photo=buf,
|
||||
caption=f"\nIntraday chart for ${symbol.upper()} from {df.first_valid_index().strftime('%I:%M')} to"
|
||||
+ " {df.last_valid_index().strftime('%I:%M')} ET on"
|
||||
+ " {datetime.date.today().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}",
|
||||
+ f" {df.last_valid_index().strftime('%I:%M')} ET on"
|
||||
+ f" {datetime.date.today().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}",
|
||||
parse_mode=telegram.ParseMode.MARKDOWN,
|
||||
)
|
||||
|
||||
@ -301,7 +301,7 @@ def chart(update: Update, context: CallbackContext):
|
||||
update.message.reply_photo(
|
||||
photo=buf,
|
||||
caption=f"\n1 Month chart for ${symbol.upper()} from {df.first_valid_index().strftime('%d, %b %Y')}"
|
||||
+ " to {df.last_valid_index().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}",
|
||||
+ f" to {df.last_valid_index().strftime('%d, %b %Y')}\n\n{s.price_reply([symbol])[symbol]}",
|
||||
parse_mode=telegram.ParseMode.MARKDOWN,
|
||||
)
|
||||
|
||||
|
@ -106,7 +106,7 @@ _Donations can only be made in a chat directly with @simplestockbot_
|
||||
else:
|
||||
return (
|
||||
f"{['status']['indicator']}: {['status']['description']}."
|
||||
+ " Please check the status page for more information. https://status.iexapis.com"
|
||||
+ f" Please check the status page for more information. https://status.iexapis.com"
|
||||
)
|
||||
|
||||
def message_status(self):
|
||||
@ -210,7 +210,7 @@ _Donations can only be made in a chat directly with @simplestockbot_
|
||||
else:
|
||||
message = (
|
||||
f"{IEXData['companyName']} closed at $**{IEXData['latestPrice']}**,"
|
||||
+ " after hours _(15 minutes delayed)_ stock price is $**{IEXData['extendedPrice']}**"
|
||||
+ f" after hours _(15 minutes delayed)_ stock price is $**{IEXData['extendedPrice']}**"
|
||||
)
|
||||
change = round(IEXData["extendedChangePercent"] * 100, 2)
|
||||
|
||||
@ -299,7 +299,7 @@ _Donations can only be made in a chat directly with @simplestockbot_
|
||||
data = response.json()
|
||||
infoMessages[symbol] = (
|
||||
f"Company Name: [{data['companyName']}]({data['website']})\nIndustry:"
|
||||
+ " {data['industry']}\nSector: {data['sector']}\nCEO: {data['CEO']}\nDescription: {data['description']}\n"
|
||||
+ f" {data['industry']}\nSector: {data['sector']}\nCEO: {data['CEO']}\nDescription: {data['description']}\n"
|
||||
)
|
||||
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user