mirror of
https://gitlab.com/simple-stock-bots/simple-stock-bot.git
synced 2026-06-03 21:00:26 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5baf7e42c0 | |||
| 1bde1fbf19 | |||
| d60b14c9de | |||
| ec516db22f | |||
| 1fe7fe8c9c | |||
| 0c71193194 | |||
| d3b75984a6 | |||
| b3769b24d8 | |||
| d45ce7c250 | |||
| dcff9f3537 | |||
| 66ff51f021 | |||
| fbad8a20cf | |||
| 6229a5d4b6 | |||
| ef9cd7e85c | |||
| 2758c45432 | |||
| c717739b75 | |||
| 8a78ab5f55 | |||
| a54653bbc7 | |||
| 686cf889c1 | |||
| 662344bf18 | |||
| 87d9346f98 | |||
| 2fd5906f9e |
@@ -5,7 +5,8 @@
|
|||||||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
||||||
// "image": "mcr.microsoft.com/devcontainers/python:1-3-bookworm",
|
// "image": "mcr.microsoft.com/devcontainers/python:1-3-bookworm",
|
||||||
"build": {
|
"build": {
|
||||||
"dockerfile": "Dockerfile"
|
"dockerfile": "Dockerfile",
|
||||||
|
"context": ".."
|
||||||
},
|
},
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers-contrib/features/black:2": {},
|
"ghcr.io/devcontainers-contrib/features/black:2": {},
|
||||||
@@ -16,16 +17,17 @@
|
|||||||
"customizations": {
|
"customizations": {
|
||||||
"vscode": {
|
"vscode": {
|
||||||
"extensions": [
|
"extensions": [
|
||||||
"ms-python.python",
|
"ms-python.python",
|
||||||
"ms-python.black-formatter",
|
"ms-python.black-formatter",
|
||||||
"ms-python.vscode-pylance",
|
"ms-python.vscode-pylance",
|
||||||
"ms-python.isort",
|
"ms-python.isort",
|
||||||
"charliermarsh.ruff",
|
"charliermarsh.ruff",
|
||||||
"ms-toolsai.jupyter"
|
"ms-toolsai.jupyter",
|
||||||
]
|
"esbenp.prettier-vscode"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"postCreateCommand": "pip3 install --user -r dev-reqs.txt"
|
"postCreateCommand": "pip3 install --user -r dev-reqs.txt && apt-get update && apt-get install -y nodejs npm --fix-missing && npm install"
|
||||||
// Features to add to the dev container. More info: https://containers.dev/features.
|
// Features to add to the dev container. More info: https://containers.dev/features.
|
||||||
// "features": {},
|
// "features": {},
|
||||||
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
// Use 'forwardPorts' to make a list of ports inside the container available locally.
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
__pycache__
|
__pycache__
|
||||||
.env
|
.env
|
||||||
|
node_modules
|
||||||
+12
-15
@@ -1,24 +1,21 @@
|
|||||||
stages:
|
stages:
|
||||||
- lint
|
- lint
|
||||||
- build
|
|
||||||
- build_site
|
- build_site
|
||||||
- deploy
|
- deploy
|
||||||
- deploy_site
|
|
||||||
|
|
||||||
black:
|
# ruff:
|
||||||
stage: lint
|
# stage: lint
|
||||||
image: registry.gitlab.com/pipeline-components/black:latest
|
# image: python:3.11-slim
|
||||||
script:
|
# script:
|
||||||
- black --check --verbose -- .
|
# - pip3 install ruff
|
||||||
|
# - ruff . --output-format gitlab; ruff format . --diff
|
||||||
ruff:
|
|
||||||
stage: lint
|
|
||||||
# image: registry.gitlab.com/pipeline-components/ruff:latest
|
|
||||||
image: python:3.11-slim
|
|
||||||
script:
|
|
||||||
- pip3 install ruff
|
|
||||||
- ruff --output-format gitlab .
|
|
||||||
|
|
||||||
|
# prettier:
|
||||||
|
# stage: lint
|
||||||
|
# image: node:16-slim # Use Node.js image since prettier is a Node.js tool
|
||||||
|
# script:
|
||||||
|
# - npm install prettier
|
||||||
|
# - npx prettier --check . # Adjust the path as needed
|
||||||
|
|
||||||
include:
|
include:
|
||||||
- local: /site/.gitlab-ci.yml
|
- local: /site/.gitlab-ci.yml
|
||||||
|
|||||||
Vendored
+7
-7
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
|
"editor.formatOnSaveMode": "modificationsIfAvailable",
|
||||||
|
"[python]": {
|
||||||
|
"editor.defaultFormatter": "charliermarsh.ruff",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"editor.formatOnPaste": true,
|
"editor.formatOnSaveMode": "file"
|
||||||
"editor.formatOnSaveMode": "modificationsIfAvailable",
|
}
|
||||||
"[python]": {
|
|
||||||
"editor.defaultFormatter": "ms-python.black-formatter",
|
|
||||||
"editor.formatOnSave": true,
|
|
||||||
"editor.formatOnSaveMode": "file"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@@ -9,6 +9,7 @@ Enhance your group chats on Telegram and Discord with real-time stock and crypto
|
|||||||
## Documentation
|
## Documentation
|
||||||
|
|
||||||
Comprehensive documentation is available to help you understand the features and capabilities of Simple Stock Bots:
|
Comprehensive documentation is available to help you understand the features and capabilities of Simple Stock Bots:
|
||||||
|
|
||||||
- [Official Documentation](https://simplestockbot.com/)
|
- [Official Documentation](https://simplestockbot.com/)
|
||||||
- [Command Reference](https://simplestockbot.com/commands/)
|
- [Command Reference](https://simplestockbot.com/commands/)
|
||||||
|
|
||||||
@@ -17,6 +18,7 @@ Comprehensive documentation is available to help you understand the features and
|
|||||||
Simple Stock Bots is sustained entirely through donations, with an annual expense of about $420 for server and premium market data subscriptions from [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo).
|
Simple Stock Bots is sustained entirely through donations, with an annual expense of about $420 for server and premium market data subscriptions from [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo).
|
||||||
|
|
||||||
You can contribute by:
|
You can contribute by:
|
||||||
|
|
||||||
- Donating through [Buy Me A Coffee](https://www.buymeacoffee.com/Anson) (PayPal or Credit Card accepted).
|
- Donating through [Buy Me A Coffee](https://www.buymeacoffee.com/Anson) (PayPal or Credit Card accepted).
|
||||||
- Using the `/donate` [command](commands.md#donate-amount-in-usd) on Telegram.
|
- Using the `/donate` [command](commands.md#donate-amount-in-usd) on Telegram.
|
||||||
- [Getting in touch](contact.md) for any inquiries or suggestions.
|
- [Getting in touch](contact.md) for any inquiries or suggestions.
|
||||||
@@ -24,7 +26,7 @@ You can contribute by:
|
|||||||
### Additional Support:
|
### Additional Support:
|
||||||
|
|
||||||
- Follow on [Twitter](https://twitter.com/AnsonBiggs)
|
- Follow on [Twitter](https://twitter.com/AnsonBiggs)
|
||||||
- Contribute or star the project on [GitLab](https://gitlab.com/simple-stock-bots)
|
- Contribute or star the project on [GitLab](https://gitlab.com/simple-stock-bots/simple-stock-bot)
|
||||||
- Utilize referral links for self-hosting:
|
- Utilize referral links for self-hosting:
|
||||||
- [DigitalOcean](https://m.do.co/c/6b5df7ef55b6)
|
- [DigitalOcean](https://m.do.co/c/6b5df7ef55b6)
|
||||||
- [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=web)
|
- [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=web)
|
||||||
@@ -32,11 +34,13 @@ You can contribute by:
|
|||||||
## Hosting
|
## Hosting
|
||||||
|
|
||||||
Self-hosting instructions are provided for those interested in running the bot on their own servers:
|
Self-hosting instructions are provided for those interested in running the bot on their own servers:
|
||||||
|
|
||||||
- [Hosting Guide](https://simplestockbot.com/hosting/)
|
- [Hosting Guide](https://simplestockbot.com/hosting/)
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|
||||||
Reach out for bug reports, feature requests, or other inquiries:
|
Reach out for bug reports, feature requests, or other inquiries:
|
||||||
|
|
||||||
- [Contact Page](https://simplestockbot.com/contact/)
|
- [Contact Page](https://simplestockbot.com/contact/)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
+27
-5
@@ -1,8 +1,8 @@
|
|||||||
import datetime as dt
|
import datetime as dt
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
from typing import Dict
|
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
from typing import Dict
|
||||||
|
|
||||||
import humanize
|
import humanize
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
@@ -10,6 +10,7 @@ import pytz
|
|||||||
import requests as r
|
import requests as r
|
||||||
import schedule
|
import schedule
|
||||||
|
|
||||||
|
|
||||||
from common.Symbol import Stock
|
from common.Symbol import Stock
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
@@ -54,9 +55,12 @@ class MarketData:
|
|||||||
self.get_symbol_list()
|
self.get_symbol_list()
|
||||||
schedule.every().day.do(self.get_symbol_list)
|
schedule.every().day.do(self.get_symbol_list)
|
||||||
|
|
||||||
def get(self, endpoint, params: dict = {}, timeout=10) -> dict:
|
def get(self, endpoint, params=None, timeout=10, headers=None) -> dict:
|
||||||
url = "https://api.marketdata.app/v1/" + endpoint
|
url = "https://api.marketdata.app/v1/" + endpoint
|
||||||
|
|
||||||
|
if params is None:
|
||||||
|
params = {}
|
||||||
|
|
||||||
# set token param if it wasn't passed.
|
# set token param if it wasn't passed.
|
||||||
params["token"] = self.MARKETDATA_TOKEN
|
params["token"] = self.MARKETDATA_TOKEN
|
||||||
|
|
||||||
@@ -64,7 +68,13 @@ class MarketData:
|
|||||||
# monitored even if someone doesn't make it through an affiliate link.
|
# monitored even if someone doesn't make it through an affiliate link.
|
||||||
params["application"] = "simplestockbot"
|
params["application"] = "simplestockbot"
|
||||||
|
|
||||||
resp = r.get(url, params=params, timeout=timeout)
|
if headers is None:
|
||||||
|
headers = {}
|
||||||
|
headers = {"User-Agent": "Simple Stock Bot anson@ansonbiggs.com"} | headers
|
||||||
|
|
||||||
|
resp = r.get(url, params=params, timeout=timeout, headers=headers)
|
||||||
|
|
||||||
|
logging.error(resp.headers.items())
|
||||||
|
|
||||||
# Make sure API returned a proper status code
|
# Make sure API returned a proper status code
|
||||||
try:
|
try:
|
||||||
@@ -95,7 +105,15 @@ class MarketData:
|
|||||||
return self.symbol_list.get(symbol.upper(), None)
|
return self.symbol_list.get(symbol.upper(), None)
|
||||||
|
|
||||||
def get_symbol_list(self):
|
def get_symbol_list(self):
|
||||||
sec_resp = r.get("https://www.sec.gov/files/company_tickers.json")
|
# Doesn't use `self.get()` since needs are much different
|
||||||
|
sec_resp = r.get(
|
||||||
|
"https://www.sec.gov/files/company_tickers.json",
|
||||||
|
headers={
|
||||||
|
"User-Agent": "Simple Stock Bot anson@ansonbiggs.com",
|
||||||
|
"Accept-Encoding": "gzip, deflate",
|
||||||
|
"Host": "www.sec.gov",
|
||||||
|
},
|
||||||
|
)
|
||||||
sec_resp.raise_for_status()
|
sec_resp.raise_for_status()
|
||||||
sec_data = sec_resp.json()
|
sec_data = sec_resp.json()
|
||||||
|
|
||||||
@@ -212,7 +230,11 @@ class MarketData:
|
|||||||
|
|
||||||
if data := self.get(
|
if data := self.get(
|
||||||
f"stocks/candles/{resolution}/{symbol}",
|
f"stocks/candles/{resolution}/{symbol}",
|
||||||
params={"from": startTime.timestamp(), "to": now.timestamp(), "extended": True},
|
params={
|
||||||
|
"from": startTime.timestamp(),
|
||||||
|
"to": now.timestamp(),
|
||||||
|
"extended": True,
|
||||||
|
},
|
||||||
):
|
):
|
||||||
data.pop("s")
|
data.pop("s")
|
||||||
df = pd.DataFrame(data)
|
df = pd.DataFrame(data)
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ class Symbol:
|
|||||||
def __str__(self) -> str:
|
def __str__(self) -> str:
|
||||||
return self.id
|
return self.id
|
||||||
|
|
||||||
|
def __hash__(self):
|
||||||
|
return hash(self.id)
|
||||||
|
|
||||||
|
|
||||||
class Stock(Symbol):
|
class Stock(Symbol):
|
||||||
"""Stock Market Object. Gets data from MarketData"""
|
"""Stock Market Object. Gets data from MarketData"""
|
||||||
|
|||||||
+14
-1
@@ -5,8 +5,10 @@ import pandas as pd
|
|||||||
import requests as r
|
import requests as r
|
||||||
import schedule
|
import schedule
|
||||||
from markdownify import markdownify
|
from markdownify import markdownify
|
||||||
|
|
||||||
from common.Symbol import Coin
|
from common.Symbol import Coin
|
||||||
|
from common.utilities import rate_limited
|
||||||
|
|
||||||
|
import time
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -24,10 +26,21 @@ class cg_Crypto:
|
|||||||
self.get_symbol_list()
|
self.get_symbol_list()
|
||||||
schedule.every().day.do(self.get_symbol_list)
|
schedule.every().day.do(self.get_symbol_list)
|
||||||
|
|
||||||
|
# Coingecko's rate limit is 30 requests per minute.
|
||||||
|
# Since there are two bots sharing the same IP, we allocate half of that limit to each bot.
|
||||||
|
# This results in a rate limit of 15 requests per minute for each bot.
|
||||||
|
# Given this, the rate limit effectively becomes 1 request every 4 seconds for each bot.
|
||||||
|
@rate_limited(0.25)
|
||||||
def get(self, endpoint, params: dict = {}, timeout=10) -> dict:
|
def get(self, endpoint, params: dict = {}, timeout=10) -> dict:
|
||||||
url = "https://api.coingecko.com/api/v3" + endpoint
|
url = "https://api.coingecko.com/api/v3" + endpoint
|
||||||
resp = r.get(url, params=params, timeout=timeout)
|
resp = r.get(url, params=params, timeout=timeout)
|
||||||
# Make sure API returned a proper status code
|
# Make sure API returned a proper status code
|
||||||
|
|
||||||
|
if resp.status_code == 429:
|
||||||
|
log.warning(f"CoinGecko returned 429 - Too Many Requests for endpoint: {endpoint}. Sleeping and trying again.")
|
||||||
|
time.sleep(10)
|
||||||
|
return self.get(endpoint=endpoint, params=params, timeout=timeout)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
resp.raise_for_status()
|
resp.raise_for_status()
|
||||||
except r.exceptions.HTTPError as e:
|
except r.exceptions.HTTPError as e:
|
||||||
|
|||||||
@@ -4,4 +4,5 @@ markdownify==0.11.6
|
|||||||
mplfinance==0.12.10b0
|
mplfinance==0.12.10b0
|
||||||
pandas==2.1.1
|
pandas==2.1.1
|
||||||
requests==2.31.0
|
requests==2.31.0
|
||||||
|
rush==2021.4.0
|
||||||
schedule==1.2.1
|
schedule==1.2.1
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import time
|
||||||
|
import logging
|
||||||
|
|
||||||
|
log = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
def rate_limited(max_per_second):
|
||||||
|
"""
|
||||||
|
Decorator that ensures the wrapped function is called at most `max_per_second` times per second.
|
||||||
|
"""
|
||||||
|
min_interval = 1.0 / max_per_second
|
||||||
|
|
||||||
|
def decorate(func):
|
||||||
|
last_called = [0.0]
|
||||||
|
|
||||||
|
def rate_limited_function(*args, **kwargs):
|
||||||
|
elapsed = time.time() - last_called[0]
|
||||||
|
left_to_wait = min_interval - elapsed
|
||||||
|
|
||||||
|
if left_to_wait > 0:
|
||||||
|
log.info(f"Rate limit exceeded. Waiting for {left_to_wait:.2f} seconds.")
|
||||||
|
time.sleep(left_to_wait)
|
||||||
|
|
||||||
|
ret = func(*args, **kwargs)
|
||||||
|
last_called[0] = time.time()
|
||||||
|
|
||||||
|
return ret
|
||||||
|
|
||||||
|
return rate_limited_function
|
||||||
|
|
||||||
|
return decorate
|
||||||
+1
-3
@@ -1,6 +1,5 @@
|
|||||||
-r common/requirements.txt
|
-r common/requirements.txt
|
||||||
-r site/requirements.txt
|
-r site/requirements.txt
|
||||||
black==23.9.1
|
|
||||||
ipython==8.16.1
|
ipython==8.16.1
|
||||||
jupyter_client==8.4.0
|
jupyter_client==8.4.0
|
||||||
jupyter_core==5.4.0
|
jupyter_core==5.4.0
|
||||||
@@ -8,5 +7,4 @@ pylama==8.4.1
|
|||||||
mypy==1.5.1
|
mypy==1.5.1
|
||||||
types-cachetools==5.3.0.6
|
types-cachetools==5.3.0.6
|
||||||
types-pytz==2023.3.1.1
|
types-pytz==2023.3.1.1
|
||||||
ruff==0.0.292
|
ruff==0.1.6
|
||||||
isort==5.12.0
|
|
||||||
+1
-1
@@ -10,7 +10,7 @@ class D_info:
|
|||||||
license = re.sub(
|
license = re.sub(
|
||||||
r"\b\n",
|
r"\b\n",
|
||||||
" ",
|
" ",
|
||||||
r.get("https://gitlab.com/simple-stock-bots/simple-discord-stock-bot/-/raw/master/LICENSE").text,
|
r.get("https://gitlab.com/simple-stock-bots/simple-stock-bot/-/raw/master/LICENSE").text,
|
||||||
)
|
)
|
||||||
|
|
||||||
help_text = """
|
help_text = """
|
||||||
|
|||||||
+1
-2
@@ -1,10 +1,9 @@
|
|||||||
version: '3'
|
version: "3"
|
||||||
services:
|
services:
|
||||||
telegram:
|
telegram:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: telegram/Dockerfile
|
dockerfile: telegram/Dockerfile
|
||||||
image: registry.gitlab.com/simple-stock-bots/simple-telegram-stock-bot
|
|
||||||
env_file: .env
|
env_file: .env
|
||||||
discord:
|
discord:
|
||||||
build:
|
build:
|
||||||
|
|||||||
Generated
+27
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
"name": "simple-stock-bot",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "3.0.3"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/prettier": {
|
||||||
|
"version": "3.0.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
|
||||||
|
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"prettier": "bin/prettier.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"prettier": "3.0.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,11 +1,2 @@
|
|||||||
[tool.black]
|
|
||||||
line-length = 130
|
|
||||||
|
|
||||||
[tool.flake8]
|
|
||||||
max-line-length = 130
|
|
||||||
|
|
||||||
[tool.pycodestyle]
|
|
||||||
max_line_length = 130
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
line-length = 130
|
line-length = 130
|
||||||
+5
-5
@@ -1,7 +1,7 @@
|
|||||||
image: python:3.11
|
image: python:3.11
|
||||||
|
|
||||||
build_site:
|
build_mkdocs:
|
||||||
stage: build
|
stage: build_site
|
||||||
script:
|
script:
|
||||||
- cd ./site
|
- cd ./site
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
@@ -10,14 +10,14 @@ build_site:
|
|||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
|
|
||||||
deploy_site:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- echo "Publishing site..."
|
- echo "Publishing site..."
|
||||||
dependencies:
|
dependencies:
|
||||||
- build_site
|
- build_mkdocs
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- public
|
- public
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
|
- if: "$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH"
|
||||||
|
|||||||
Vendored
+10
-10
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"yaml.schemas": {
|
"yaml.schemas": {
|
||||||
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
|
"https://squidfunk.github.io/mkdocs-material/schema.json": "mkdocs.yml"
|
||||||
},
|
},
|
||||||
"yaml.customTags": [
|
"yaml.customTags": [
|
||||||
"!ENV scalar",
|
"!ENV scalar",
|
||||||
"!ENV sequence",
|
"!ENV sequence",
|
||||||
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
|
"tag:yaml.org,2002:python/name:materialx.emoji.to_svg",
|
||||||
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
|
"tag:yaml.org,2002:python/name:materialx.emoji.twemoji",
|
||||||
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
|
"tag:yaml.org,2002:python/name:pymdownx.superfences.fence_code_format"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -1,2 +1 @@
|
|||||||
# Blog
|
# Blog
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ date: 2023-10-10
|
|||||||
tags: [Simple Stock Bot, Introduction, Telegram, Discord, Financial Insights]
|
tags: [Simple Stock Bot, Introduction, Telegram, Discord, Financial Insights]
|
||||||
authors: [Anson]
|
authors: [Anson]
|
||||||
description: >
|
description: >
|
||||||
Welcome to the world of Simple Stock Bot, where real-time financial insights are integrated seamlessly into your group chats on Telegram and Discord!
|
Welcome to the world of Simple Stock Bot, where real-time financial insights are integrated seamlessly into your group chats on Telegram and Discord!
|
||||||
---
|
---
|
||||||
|
|
||||||
## What is Simple Stock Bot?
|
## What is Simple Stock Bot?
|
||||||
@@ -25,7 +25,10 @@ Simple Stock Bot is a chatbot designed to enrich your financial discussions on T
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- more -->
|
||||||
|
|
||||||
With Simple Stock Bot, you can:
|
With Simple Stock Bot, you can:
|
||||||
|
|
||||||
- **Fetch Real-time Quotes**: Obtain the latest stock and cryptocurrency prices instantly within your group chat.
|
- **Fetch Real-time Quotes**: Obtain the latest stock and cryptocurrency prices instantly within your group chat.
|
||||||
- **View Charts**: Delve into intraday movements or assess a month's trading data right inside your group chat.
|
- **View Charts**: Delve into intraday movements or assess a month's trading data right inside your group chat.
|
||||||
- **Stay Updated on Market Trends**: Discover what's buzzing in the stock and crypto spheres.
|
- **Stay Updated on Market Trends**: Discover what's buzzing in the stock and crypto spheres.
|
||||||
@@ -36,13 +39,12 @@ With Simple Stock Bot, you can:
|
|||||||
|
|
||||||
[:fontawesome-brands-discord: Discord](https://discordapp.com/api/oauth2/authorize?client_id=532045200823025666&permissions=36507338752&scope=bot){ .md-button }
|
[:fontawesome-brands-discord: Discord](https://discordapp.com/api/oauth2/authorize?client_id=532045200823025666&permissions=36507338752&scope=bot){ .md-button }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Using the Bot
|
## Using the Bot
|
||||||
|
|
||||||
Embarking on your journey with Simple Stock Bot is effortless. Just add the bot to your Telegram or Discord group, and you're all set to dive into financial discussions right from your chat!
|
Embarking on your journey with Simple Stock Bot is effortless. Just add the bot to your Telegram or Discord group, and you're all set to dive into financial discussions right from your chat!
|
||||||
|
|
||||||
Here are some simple commands to get you started:
|
Here are some simple commands to get you started:
|
||||||
|
|
||||||
- `/intra` to view intraday charts.
|
- `/intra` to view intraday charts.
|
||||||
- `/chart` for a glimpse of the last month's trading data.
|
- `/chart` for a glimpse of the last month's trading data.
|
||||||
- `/trending` to catch up on the latest trending stocks and cryptocurrencies.
|
- `/trending` to catch up on the latest trending stocks and cryptocurrencies.
|
||||||
@@ -51,7 +53,7 @@ Here are some simple commands to get you started:
|
|||||||
|
|
||||||
Simple Stock Bot is a community-supported project, thriving on the contributions from its users. It's sustained entirely through donations to cover server costs and premium market data subscriptions, ensuring it remains free for everyone.
|
Simple Stock Bot is a community-supported project, thriving on the contributions from its users. It's sustained entirely through donations to cover server costs and premium market data subscriptions, ensuring it remains free for everyone.
|
||||||
|
|
||||||
Feeling generous? You can support the project by [donating](https://simplestockbot.com/donate/), following on [Twitter](https://twitter.com/AnsonBiggs), or contributing on [GitLab](https://gitlab.com/simple-stock-bot).
|
Feeling generous? You can support the project by [donating](https://simplestockbot.com/donate/), following on [Twitter](https://twitter.com/AnsonBiggs), or contributing on [GitLab](https://gitlab.com/simple-stock-bots/simple-stock-bot).
|
||||||
|
|
||||||
## Dive Deeper
|
## Dive Deeper
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,40 @@
|
|||||||
|
---
|
||||||
|
title: "v2023.1 Release! New Stock Market Data Provider and More!"
|
||||||
|
date: 2023-10-16
|
||||||
|
tags: [Simple Stock Bot, Telegram, Discord, MarketDataApp]
|
||||||
|
authors: [Anson]
|
||||||
|
description: >
|
||||||
|
Discover the latest updates for Simple Stock Bot, including our new integration with MarketData.app for enhanced real-time stock market insights.
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🌐 General Updates:
|
||||||
|
|
||||||
|
- **New Home**: We've transitioned to our fresh and updated website at [simplestockbot.com](https://simplestockbot.com/).
|
||||||
|
- **New Data Provider**: We're excited to announce [MarketData.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=web) as our new provider for real-time stock market data, ensuring timely and accurate insights for our users.
|
||||||
|
|
||||||
|
<!-- more -->
|
||||||
|
|
||||||
|
## 📈 MarketData.app Integration Enhancements:
|
||||||
|
|
||||||
|
- We've introduced **additional options** to our MarketData.app integration, ensuring even more precise and varied financial data.
|
||||||
|
- **Afterhours Data Fix**: Addressed an issue where after hours stock market data caused errors.
|
||||||
|
- **Trending Symbol Accuracy**: Fixed a bug that led to the display of invalid symbols in the `/trending` command.
|
||||||
|
|
||||||
|
## 🤖 Bot Improvements & Fixes:
|
||||||
|
|
||||||
|
- **Unified Repository**: To streamline our development and deployment, we've merged the Discord and Telegram bots into a single monorepo. Check it out on [GitLab](https://gitlab.com/simple-stock-bots/simple-stock-bot). Contributions welcome!
|
||||||
|
- **Inline Functionality Restoration**: Fixed the telegram bot's inline functionality.
|
||||||
|
- **Python Telegram Bot Update**: Migrated to the latest version of `Python Telegram Bot` for superior performance and more features.
|
||||||
|
- **Rate Limiting Addition**: Implemented rate limiting to ensure optimal performance during peak usage times.
|
||||||
|
- **SO MUCH MORE**: [Move to Marketdata.app GitLab Issues](https://gitlab.com/simple-stock-bots/simple-stock-bot/-/milestones/3)
|
||||||
|
|
||||||
|
## 📝 Documentation & Repository Overhauls:
|
||||||
|
|
||||||
|
- **Centralized Documentation**: For convenience and improved maintenance, we've shifted our documentation into the monorepo.
|
||||||
|
- **Documentation Refinement**: Updated our documentation to reflect the latest homepage details.
|
||||||
|
|
||||||
|
**Special Mention**: Immense gratitude to our dedicated community for their continual feedback and unwavering support. Dive deeper into the financial realm with Simple Stock Bot!
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
📥 For any concerns, queries, or feedback, don't hesitate to [Contact Us](../../contact.md).
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
title: "Simple Bot End-of-Life"
|
||||||
|
date: 2024-05-12
|
||||||
|
tags: [Simple Stock Bot, Introduction, Telegram, Discord, Financial Insights]
|
||||||
|
authors: [Anson]
|
||||||
|
description: >
|
||||||
|
Simple Stock Bot is being sunset.
|
||||||
|
---
|
||||||
|
|
||||||
|
## What is Simple Stock Bot?
|
||||||
|
|
||||||
|
For full details see my full blog post: https://notes.ansonbiggs.com/simple-stock-bot-end-of-life/
|
||||||
|
|
||||||
|
I am shutting down Simple Stock Bot, a popular Telegram and Discord bot that provided live stock and cryptocurrency market data. The bot was created in 2018 after my group chat lost access to the Google Allo, which had integrated market data. The bot grew to 15,000 monthly active users, but maintaining the service has become challenging due to increasing data costs and changes to the Discord API. I really appreciate the community and everyone that has donated along the way, this has been a seriously great ride. The bot will soon no longer function on Telegram and Discord.
|
||||||
@@ -32,7 +32,6 @@ The Simple Stock Bot looks at every message it can see and tries to detect stock
|
|||||||
|
|
||||||
This command allows you to query real-time data for stock options. By simply inputting the stock symbol, strike price, month, and specifying either a call or a put, you can get the latest options data right at your fingertips. For example, `AAPL $220 December call` will provide the current data for Apple's call option with a $220 strike price expiring in December.
|
This command allows you to query real-time data for stock options. By simply inputting the stock symbol, strike price, month, and specifying either a call or a put, you can get the latest options data right at your fingertips. For example, `AAPL $220 December call` will provide the current data for Apple's call option with a $220 strike price expiring in December.
|
||||||
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## `/donate [Amount in USD]` :fontawesome-brands-telegram-plane:
|
## `/donate [Amount in USD]` :fontawesome-brands-telegram-plane:
|
||||||
@@ -104,7 +103,9 @@ Gets the latest trending stocks and their change in price
|
|||||||
━━━━━━━━━━━━━━━━━━━━━━━━━━
|
━━━━━━━━━━━━━━━━━━━━━━━━━━
|
||||||
$GME: Gamestop Corporation - Class A, 5.06%
|
$GME: Gamestop Corporation - Class A, 5.06%
|
||||||
$MMAT: Meta Materials Inc, 4.77%
|
$MMAT: Meta Materials Inc, 4.77%
|
||||||
$$BTC: Bitcoin, -0.83%
|
|
||||||
|
$$
|
||||||
|
BTC: Bitcoin, -0.83%
|
||||||
$$ETH: Ethereum, 6.06%
|
$$ETH: Ethereum, 6.06%
|
||||||
$$DOGE: Binance-Peg Dogecoin, 0.14%
|
$$DOGE: Binance-Peg Dogecoin, 0.14%
|
||||||
|
|
||||||
@@ -184,3 +185,4 @@ full list of stock symbols and return the price of the ticker. Then once you sel
|
|||||||
want the bot will send a message as you in that chat with the latest stock price.
|
want the bot will send a message as you in that chat with the latest stock price.
|
||||||
The bot also looks at every message in any chat it is in for stock symbols.Symbols start with a
|
The bot also looks at every message in any chat it is in for stock symbols.Symbols start with a
|
||||||
`$` followed by the stock symbol. For example:$tsla would return price information for Tesla Motors.
|
`$` followed by the stock symbol. For example:$tsla would return price information for Tesla Motors.
|
||||||
|
$$
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ Your feedback and experience with Simple Stock Bot is invaluable. Whether you've
|
|||||||
- **Telegram**: Drop me a message on [Telegram](https://t.me/MisterBiggs).
|
- **Telegram**: Drop me a message on [Telegram](https://t.me/MisterBiggs).
|
||||||
- **Discord**: Feel free to reach out on Discord at `MisterBiggs#0465`.
|
- **Discord**: Feel free to reach out on Discord at `MisterBiggs#0465`.
|
||||||
- **Twitter**: Send me a tweet on [Twitter](https://twitter.com/AnsonBiggs).
|
- **Twitter**: Send me a tweet on [Twitter](https://twitter.com/AnsonBiggs).
|
||||||
- **GitLab**: For technical issues or feature requests, feel free to open an issue on our [GitLab Repository](https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot).
|
- **GitLab**: For technical issues or feature requests, feel free to open an issue on our [GitLab Repository](https://gitlab.com/simple-stock-bots/simple-stock-bot).
|
||||||
|
|||||||
+20
-17
@@ -17,35 +17,38 @@ Ensure the following are installed or obtained before proceeding:
|
|||||||
- **[marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=web)**: Sign up to get an API key. A free tier is available and should suffice for private groups. More details [here](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo).
|
- **[marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=web)**: Sign up to get an API key. A free tier is available and should suffice for private groups. More details [here](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo).
|
||||||
|
|
||||||
!!! tip
|
!!! tip
|
||||||
The bot will still operate without a [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) key but will revert to using only cryptocurrency data.
|
The bot will still operate without a [marketdata.app](https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=repo) key but will revert to using only cryptocurrency data.
|
||||||
|
|
||||||
!!! note
|
!!! note
|
||||||
To enable donation acceptance, obtain a Stripe API key and provide a `STRIPE` key to your bot. [https://stripe.com/]()
|
To enable donation acceptance, obtain a Stripe API key and provide a `STRIPE` key to your bot. [https://stripe.com/]()
|
||||||
|
|
||||||
## Setup Instructions
|
## Setup Instructions
|
||||||
|
|
||||||
1. **Download/Clone the Repository**:
|
1. **Download/Clone the Repository**:
|
||||||
- Download or clone this repository to your local machine.
|
|
||||||
|
- Download or clone this repository to your local machine.
|
||||||
|
|
||||||
2. **Configure Environment Variables**:
|
2. **Configure Environment Variables**:
|
||||||
- Navigate to the project directory and locate the `.env` file.
|
|
||||||
- Fill in the `.env` file with your obtained API keys:
|
|
||||||
|
|
||||||
```plaintext
|
- Navigate to the project directory and locate the `.env` file.
|
||||||
MARKETDATA=your_marketdata_api_key
|
- Fill in the `.env` file with your obtained API keys:
|
||||||
STRIPE=your_stripe_api_key
|
|
||||||
TELEGRAM=your_telegram_api_key
|
|
||||||
DISCORD=your_discord_api_key
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively, pass the variables using Docker Compose environment variables or command-line arguments.
|
```plaintext
|
||||||
|
MARKETDATA=your_marketdata_api_key
|
||||||
|
STRIPE=your_stripe_api_key
|
||||||
|
TELEGRAM=your_telegram_api_key
|
||||||
|
DISCORD=your_discord_api_key
|
||||||
|
```
|
||||||
|
|
||||||
|
Alternatively, pass the variables using Docker Compose environment variables or command-line arguments.
|
||||||
|
|
||||||
3. **Build and Run the Bot:**
|
3. **Build and Run the Bot:**
|
||||||
- Open a terminal in the project directory.
|
|
||||||
- Build and run both bots using Docker Compose:
|
|
||||||
|
|
||||||
```bash
|
- Open a terminal in the project directory.
|
||||||
docker-compose up
|
- Build and run both bots using Docker Compose:
|
||||||
```
|
|
||||||
|
```bash
|
||||||
|
docker-compose up
|
||||||
|
```
|
||||||
|
|
||||||
Now, your bot(s) should be up and running! If you're unfamiliar with Docker, reviewing the [Docker documentation](https://docs.docker.com/) is highly recommended to gain better control over your bot and understand Docker commands better.
|
Now, your bot(s) should be up and running! If you're unfamiliar with Docker, reviewing the [Docker documentation](https://docs.docker.com/) is highly recommended to gain better control over your bot and understand Docker commands better.
|
||||||
|
|||||||
@@ -9,25 +9,31 @@ Discover a new level of financial discussion with Simple Stock Bot, your go-to s
|
|||||||
## [Commands](commands.md)
|
## [Commands](commands.md)
|
||||||
|
|
||||||
### Real-Time Stock and Cryptocurrency Updates
|
### Real-Time Stock and Cryptocurrency Updates
|
||||||
|
|
||||||
- Get live price updates of stocks and cryptocurrencies.
|
- Get live price updates of stocks and cryptocurrencies.
|
||||||
- Symbol Detection: Use `$` for stocks and `$$` for cryptocurrencies, e.g., `$tsla` for Tesla and `$$btc` for Bitcoin.
|
- Symbol Detection: Use `$` for stocks and `$$` for cryptocurrencies, e.g., `$tsla` for Tesla and `$$btc` for Bitcoin.
|
||||||
|
|
||||||
### Intraday and Historical Data Visualization
|
### Intraday and Historical Data Visualization
|
||||||
|
|
||||||
- `/intra`: View a stock's movement since the last market open or a cryptocurrency's 24-hour chart.
|
- `/intra`: View a stock's movement since the last market open or a cryptocurrency's 24-hour chart.
|
||||||
- `/chart`: Provides a chart of the last month's trading data up till the day before.
|
- `/chart`: Provides a chart of the last month's trading data up till the day before.
|
||||||
|
|
||||||
### Trending Assets Awareness
|
### Trending Assets Awareness
|
||||||
|
|
||||||
- `/trending`: Discover the latest trending stocks and cryptocurrencies and their price changes.
|
- `/trending`: Discover the latest trending stocks and cryptocurrencies and their price changes.
|
||||||
|
|
||||||
### In-App Assistance and Support
|
### In-App Assistance and Support
|
||||||
|
|
||||||
- `/help`: Provides a quick summary of available commands for easy reference.
|
- `/help`: Provides a quick summary of available commands for easy reference.
|
||||||
- `/donate`: Support the maintenance of the bot to ensure continued free access.
|
- `/donate`: Support the maintenance of the bot to ensure continued free access.
|
||||||
|
|
||||||
### User-Friendly Interaction
|
### User-Friendly Interaction
|
||||||
|
|
||||||
- Easy symbol and command usage for a smooth user experience.
|
- Easy symbol and command usage for a smooth user experience.
|
||||||
- Engage with a community of financial enthusiasts and share insights effortlessly.
|
- Engage with a community of financial enthusiasts and share insights effortlessly.
|
||||||
|
|
||||||
## [Contact](contact.md)
|
## [Contact](contact.md)
|
||||||
|
|
||||||
Need assistance or have inquiries? Feel free to reach out and I'll be happy to help.
|
Need assistance or have inquiries? Feel free to reach out and I'll be happy to help.
|
||||||
|
|
||||||
## Powered by MarketData.app
|
## Powered by MarketData.app
|
||||||
|
|||||||
+5
-11
@@ -1,24 +1,23 @@
|
|||||||
site_name: Simple Stock Bot
|
site_name: Simple Stock Bot
|
||||||
site_url: https://simplestockbot.com
|
site_url: https://simplestockbot.com
|
||||||
edit_uri: /simple-stock-bots/site/tree/master/site
|
repo_url: https://gitlab.com/simple-stock-bots/simple-stock-bot
|
||||||
repo_url: https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot
|
|
||||||
repo_name: Simple Stock Bots
|
repo_name: Simple Stock Bots
|
||||||
|
|
||||||
site_description: Simple Discord and Telegram chat bots for Stock Market Data.
|
site_description: Simple Discord and Telegram chat bots for Stock Market Data.
|
||||||
site_author: Anson Biggs
|
site_author: Anson Biggs
|
||||||
copyright: <a href="https://ansonbiggs.com">Anson Biggs</a> 2018 </br> Available Under an <a href="/LICENSE/">MIT LICENSE</a> </br>
|
copyright: <a href="https://ansonbiggs.com">Anson Biggs</a> 2018 </br> Available Under an <a href="/LICENSE/">MIT LICENSE</a> </br>
|
||||||
|
|
||||||
|
|
||||||
nav:
|
nav:
|
||||||
- Home: index.md
|
- Home: index.md
|
||||||
- Commands: commands.md
|
- Commands: commands.md
|
||||||
- Self-Host: host.md
|
- Self-Host: host.md
|
||||||
- Donate: donate.md
|
# - Donate: donate.md
|
||||||
- Contact: contact.md
|
- Contact: contact.md
|
||||||
- Blog: blog/index.md
|
- Blog: blog/index.md
|
||||||
|
|
||||||
theme:
|
theme:
|
||||||
name: material
|
name: material
|
||||||
|
custom_dir: overrides
|
||||||
language: en
|
language: en
|
||||||
features:
|
features:
|
||||||
- navigation.instant
|
- navigation.instant
|
||||||
@@ -56,24 +55,19 @@ extra:
|
|||||||
link: https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=web
|
link: https://dashboard.marketdata.app/marketdata/aff/go/misterbiggs?keyword=web
|
||||||
name: MarketData.app for stock data
|
name: MarketData.app for stock data
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extra_css:
|
extra_css:
|
||||||
- stylesheets/phone.css
|
- stylesheets/phone.css
|
||||||
|
|
||||||
|
|
||||||
plugins:
|
plugins:
|
||||||
- search
|
- search
|
||||||
- social
|
- social
|
||||||
- blog
|
- blog
|
||||||
|
|
||||||
|
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
- attr_list
|
- attr_list
|
||||||
- pymdownx.emoji:
|
- pymdownx.emoji:
|
||||||
emoji_index: !!python/name:materialx.emoji.twemoji
|
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||||
emoji_generator: !!python/name:materialx.emoji.to_svg
|
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||||
- admonition
|
- admonition
|
||||||
- pymdownx.details
|
- pymdownx.details
|
||||||
- pymdownx.superfences
|
- pymdownx.superfences
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
<!-- Announcement bar -->
|
||||||
|
{% block announce %}
|
||||||
|
|
||||||
|
<div class="admonition danger" style="min-height: 20vh;">
|
||||||
|
<p class="admonition-title">This project is now archived!</p>
|
||||||
|
<p>
|
||||||
|
Please
|
||||||
|
<a href="/blog/2024/05/12/simple-bot-end-of-life/"
|
||||||
|
>click here for more information.</a
|
||||||
|
>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="" admoniton></div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
mkdocs-material==9.4.4
|
mkdocs-material==9.5.22
|
||||||
|
mkdocs-material-extensions==1.3.1
|
||||||
|
|
||||||
# Required for Social Cards
|
# Required for Social Cards
|
||||||
Pillow==10.0.1
|
Pillow==10.0.1
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ class T_info:
|
|||||||
license = re.sub(
|
license = re.sub(
|
||||||
r"\b\n",
|
r"\b\n",
|
||||||
" ",
|
" ",
|
||||||
r.get("https://gitlab.com/simple-stock-bots/simple-telegram-stock-bot/-/raw/master/LICENSE").text,
|
r.get("https://gitlab.com/simple-stock-bots/simple-stock-bot/-/raw/master/LICENSE").text,
|
||||||
)
|
)
|
||||||
|
|
||||||
help_text = """
|
help_text = """
|
||||||
|
|||||||
+8
-14
@@ -11,27 +11,21 @@ import traceback
|
|||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
import mplfinance as mpf
|
import mplfinance as mpf
|
||||||
import telegram
|
from T_info import T_info
|
||||||
from telegram import (
|
|
||||||
InlineQueryResultArticle,
|
|
||||||
InputTextMessageContent,
|
|
||||||
LabeledPrice,
|
|
||||||
Update,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
import telegram
|
||||||
|
from common.symbol_router import Router
|
||||||
|
from telegram import InlineQueryResultArticle, InputTextMessageContent, LabeledPrice, Update
|
||||||
from telegram.ext import (
|
from telegram.ext import (
|
||||||
Application,
|
Application,
|
||||||
CommandHandler,
|
CommandHandler,
|
||||||
InlineQueryHandler,
|
|
||||||
PreCheckoutQueryHandler,
|
|
||||||
MessageHandler,
|
|
||||||
filters,
|
|
||||||
ContextTypes,
|
ContextTypes,
|
||||||
|
InlineQueryHandler,
|
||||||
|
MessageHandler,
|
||||||
|
PreCheckoutQueryHandler,
|
||||||
|
filters,
|
||||||
)
|
)
|
||||||
|
|
||||||
from common.symbol_router import Router
|
|
||||||
from T_info import T_info
|
|
||||||
|
|
||||||
# Enable logging
|
# Enable logging
|
||||||
logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO)
|
logging.basicConfig(format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=logging.INFO)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user