mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2025-06-15 14:56:40 +00:00
Resolve "Update bot to use market data affiliate link"
This commit is contained in:
parent
bf37d4f0ea
commit
ed7c9f423a
@ -37,6 +37,8 @@ class MarketData:
|
||||
except KeyError:
|
||||
self.MARKETDATA_TOKEN = ""
|
||||
log.warning("Starting without an MarketData.app Token will not allow you to get market data!")
|
||||
log.warning("Use this affiliate link so that the bot can stay free:")
|
||||
log.warning("https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo")
|
||||
|
||||
if self.MARKETDATA_TOKEN != "":
|
||||
schedule.every().day.do(self.clear_charts)
|
||||
@ -45,7 +47,11 @@ class MarketData:
|
||||
url = "https://api.marketdata.app/v1/" + endpoint
|
||||
|
||||
# set token param if it wasn't passed.
|
||||
params["token"] = params.get("token", self.MARKETDATA_TOKEN)
|
||||
params["token"] = self.MARKETDATA_TOKEN
|
||||
|
||||
# Undocumented query variable that ensures bot usage can be
|
||||
# monitored even if someone doesn't make it through an affiliate link.
|
||||
params["application"] = "simplestockbot"
|
||||
|
||||
resp = r.get(url, params=params, timeout=timeout)
|
||||
|
||||
|
@ -15,7 +15,7 @@ https://docs.simplestockbot.com/commands/
|
||||
|
||||
## Donate
|
||||
|
||||
Simple Stock Bot is run entirely on donations, and costs about $420 a year to run. All donations go directly towards paying for servers, and premium market data provided by [Market Data](https://www.marketdata.app/).
|
||||
Simple Stock Bot is run entirely on donations, and costs about $420 a year to run. All donations go directly towards paying for servers, and premium market data provided by [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo).
|
||||
|
||||
The best way to donate is through [Buy Me A Coffee](https://www.buymeacoffee.com/Anson) which accepts Paypal or Credit card.
|
||||
|
||||
@ -29,4 +29,4 @@ If you have any questions get in [touch.](contact.md)
|
||||
- Contribute to the project on [GitLab](https://gitlab.com/simple-stock-bots) or just leave a star
|
||||
- Using my referral links to host your own Bot
|
||||
- [DigitalOcean](https://m.do.co/c/6b5df7ef55b6)
|
||||
- [Market Data](https://www.marketdata.app/)
|
||||
- [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo)
|
||||
|
17
T_info.py
17
T_info.py
@ -16,6 +16,8 @@ class T_info:
|
||||
help_text = """
|
||||
Thanks for using this bot, consider supporting it by [buying me a beer.](https://www.buymeacoffee.com/Anson)
|
||||
|
||||
If you are interested in stock market data, or want to host your own bot, be sure to use my affiliate link so that the bot can stay free: [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=telegram)
|
||||
|
||||
Keep up with the latest news for the bot in its Telegram Channel: https://t.me/simplestockbotnews
|
||||
|
||||
Full documentation on using and running your own stock bot can be found on the bots [docs.](https://docs.simplestockbot.com)
|
||||
@ -34,7 +36,7 @@ Simply calling a symbol in any message that the bot can see will also return the
|
||||
**Inline Features**
|
||||
You can type @SimpleStockBot `[search]` in any chat or direct message to search for the stock bots full list of stock and crypto symbols and return the price. Then once you select the ticker want the bot will send a message as you in that chat with the latest stock price. Prices may be delayed by up to an hour.
|
||||
|
||||
Market data is provided by [Market Data](https://www.marketdata.app/)
|
||||
Market data is provided by [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=telegram)
|
||||
|
||||
If you believe the bot is not behaving properly run `/status` or [get in touch](https://docs.simplestockbot.com/contact).
|
||||
"""
|
||||
@ -42,27 +44,22 @@ Simply calling a symbol in any message that the bot can see will also return the
|
||||
donate_text = """
|
||||
Simple Stock Bot is run entirely on donations[.](https://www.buymeacoffee.com/Anson)
|
||||
All donations go directly towards paying for servers, and market data is provided by
|
||||
[Market Data](https://www.marketdata.app/).
|
||||
[marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=telegram).
|
||||
|
||||
The easiest way to donate is to run the `/donate [amount in USD]` command with US dollars you would like to donate.
|
||||
|
||||
Example: `/donate 2` would donate 2 USD.
|
||||
|
||||
An alternative way to donate is through https://www.buymeacoffee.com/Anson which requires no account and accepts Paypal or Credit card.
|
||||
If you have any questions see the [website](https:docs.simplestockbot.com)
|
||||
If you have any questions see the [website](https://docs.simplestockbot.com)
|
||||
|
||||
"""
|
||||
|
||||
|
||||
commands = """
|
||||
commands = """ # Not used by the bot but for updating commands with BotFather
|
||||
donate - Donate to the bot 🎗️
|
||||
help - Get some help using the bot. 🆘
|
||||
info - $[symbol] General information about the symbol. ℹ️
|
||||
news - $[symbol] News about the symbol. 📰
|
||||
stat - $[symbol] Key statistics about the symbol. 🔢
|
||||
cap - $[symbol] Market Capitalization of symbol. 💰
|
||||
dividend - $[symbol] Dividend info 📅
|
||||
trending - Trending Stocks and Cryptos. 💬
|
||||
intra - $[symbol] Plot since the last market open. 📈
|
||||
chart - $[chart] Plot of the past month. 📊
|
||||
""" # Not used by the bot but for updaing commands with BotFather
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user