Live stock and crypto tickers for your discord server.
With these bots you can track prices of...
- Coins and Tokens on CoinGecko
- Marketcaps of Coins and Tokens on CoinGecko
- Stocks on Yahoo Finance
- Tokens on Pancakeswap
- Tokens on Dexlab
- Tokens on 1Inch
- NFT Collections on OpenSea, Solanart, and Solart
- Gas on Ethereum, Binance, and Polygon Chains
- Number of holders of a token on Ethereum and Binance Chains
🍾 100 public tickers with over 15k installs across 3k discord servers!
🛠️ Use the code to host your own bots, or sign up for premium for a managed option!
- discord-stock-ticker
- Contents
- Preview
- Join the discord server
- Support this project
- Add free tickers to your servers
- Premium
- Self-Hosting - Docker
- Self-Hosting - Binary
- Managing bots
- Stock and Crypto Price Tickers
- Stock and Crypto Price Tickerboards
- Crypto Market Cap
- Ethereum, BSC, and Polygon Gas Prices
- Ethereum, BSC, or Polygon Token Holders
- ETH/BSC/MATIC Token Price
- OpenSea/Solanart NFT Collection Floor Price
- Roles for colors
- Kubernetes
- Louie
Love these bots? You can support this project by subscribing to the premium version, buying me a coffee, using my digital ocean referral link, or hiring me to write or host your discord bot!
bb | amc | nok | aapl | amzn | goog | ^gspc | ^dji | ^ixic | tsla | dkng | spy | amd | nio | gc=f | si=f | cl=f | pltr | pypl | sndl | rty=f | ^vix | arkk | msft | nflx | gme | dis | es=f | nq=f | ym=f | nvda | fb | btc | coin | ndaq | qqq |
bitcoin | ethereum | bitcoin-cash | dogecoin | monero | litecoin | ripple | polkadot | cardano | chainlink | stellar | iota | reef-finance | algorand | tezos | ethereum-classic | ravencoin | binancecoin | ecomi | aave | uniswap | bittorrent-2 | tron | vechain | illuvium | cosmos | zilliqa | matic-network | basic-attention-token | shiba-inu | pancakeswap-token | solana | raydium | safemoon | ftx-token | enjincoin | decentraland | fantom | coti | hedera-hashgraph | sushi | kusama | eos | terra-luna | chia | theta-token | tether | smooth-love-potion | axie-infinity | harmony | cryptoblades | my-defi-pet | mist | weth | plant-vs-undead-token | cryptozoon | binance-usd | splinterlands | wax | coinary-token | avalanche-2 | cryptocars | binamon | wanaka-farm |
If you are interested in a ticker that isnt on this list, you can host your own using the code here or pay to have them made for you.
Price per bot (paid monthly): $1
Price per bot (paid yearly): $10
If you are interested please see the contact info on my github page and send me a messgae via your platform of choice (discord perferred). For a live demo, join the support discord linked at the top or bottom of this page.
We will go over self-hosting with Docker using docker-compose only, as this is the generally recommended way to use Docker.
- Find the current release number from the release page.
- Create your docker-compose file. The following example is a bare-bones example to get you up and running (anything after the # is a comment and unneeded):
---
version: "3"
services:
discordstockticker:
image: ghcr.io/rssnyder/discord-stock-ticker:3.9.3
environment:
- FREQUENCY=30 # How often to update all tickers, in seconds
- LOGLEVEL=0 # 0=production builds. 1=dev builds. Set to 1 if you are debugging/troubleshooting
- DB=/state/bots.db # where to store your bots (a non existing file within the container) to have them persist on restarts
volumes:
- <local path to folder to store db in>:/state
ports:
- "8080:8080" # The first number is the port you want to use for your API
These instructions do not take advantage of Redis to store your tickers for if/when you stop your Docker container. Those instructions are yet to come. In the meantime, you can create a shell script (assuming you're running Linux) to start all your bots at once.
Click here to watch a quick video tutorial on how to self-host these bots on linux. There is also an in depth written format gist here. If you are familar with ansible, I have a playbook here.
Pull down the latest release for your OS here. Extract. Run.
wget https://github.com/rssnyder/discord-stock-ticker/releases/download/v2.0.0/discord-stock-ticker-v3.3.0-linux-amd64.tar.gz
tar zxf discord-stock-ticker-v3.3.0-linux-amd64.tar.gz
./discord-stock-ticker
There are options you can set for the service using flags:
-address="localhost:8080": address:port to bind http server to.
-cache=false: enable cache for coingecko
-db="": file to store tickers in
-frequency=0: set frequency for all tickers
-logLevel=0: defines the log level. 0=production builds. 1=dev builds.
-redisAddress="localhost:6379": address:port for redis server.
-redisDB=0: redis db to use
-redisPassword="": redis password
The script here (ran as root) will download and install a discord-stock-ticker
service on your linux machine with an API avalible on port 8080
to manage bots.
wget https://github.com/rssnyder/discord-stock-ticker/releases/download/v3.3.0/discord-stock-ticker-v3.3.0-linux-amd64.tar.gz
tar zxf discord-stock-ticker-v3.3.0-linux-amd64.tar.gz
mkdir -p /etc/discord-stock-ticker
mv discord-stock-ticker /etc/discord-stock-ticker/
wget https://raw.githubusercontent.com/rssnyder/discord-stock-ticker/master/discord-stock-ticker.service
mv discord-stock-ticker.service /etc/systemd/system/
systemctl daemon-reload
systemctl start discord-stock-ticker.service
If you need to make modifications to the setting of the service, just edit the /etc/systemd/system/discord-stock-ticker.service
file on the line with ExecStart=
. An example walkthrough can be found in this issue. Be sure to run systemctl daemon-reload
to pick up and changes.
Now that you have the service running, you can add bots using the API exposed on the addres and port that the service runs on (this address is shown when you start the service).
All bots are controlled via an API interface and follow the same api template for management:
Available methods:
GET # show all currently running bots and their configuration
POST # create a new bot
PATCH # restart a running bot
DELETE # delete a running bot
If you are new to using an API to manage things, there are several ways to make API calls:
- Curl. This is a command available on virtually all Linux distros. Replace anything between < and > with the appropriate information.
The generic format for a curl API call:
curl -X <method> -H "Content-type: application/json" -d <inline json or from file> <hostname>:<port>/<bot type>
GET is the default method for curl, so you may omit the method. Also since you're just retrieving your bots, you can omit the -d flag as well.
Get a listing of all your bots:
curl localhost:8080/<bot type>
Create a new bot: (In this example, the bot configuration is located in a file 'btc.json', in the folder bots/crypo)
curl -X POST -H "Content-type: application/json" -d @bots/crypto/btc.json localhost:8080/ticker
Instructions for restarting running bots and deleting bots are forthcoming.
- Powershell:
$Body = @{
name = "bitcoin"
crypto = $true
discord_bot_token = "xxxxxxxxxxxxxxxxxxxxxxxxx"
}
$Parameters = @{
Method = "POST"
Uri = "127.0.0.1:8080/ticker"
Body = ($Body | ConvertTo-Json)
ContentType = "application/json"
}
Invoke-RestMethod @Parameters
bot type: ticker
Tracks stock or crypto prices. Uses Yahoo for stock or CoinGecko for crypto.
{
"ticker": "pfg", # string: symbol for the stock from yahoo finance
"name": "2) PFG", # string/OPTIONAL: overwrites display name of bot
"color": true, # bool/OPTIONAL: requires nickname
"decorator": "@", # string/OPTIONAL: what to show instead of arrows
"currency": "aud", # string/OPTIONAL: alternative curreny
"activity": "Hello;Its;Me", # string/OPTIONAL: list of strings to show in activity section
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"twelve_data_key": "xxx", # string/OPTIONAL: use twelve data as source, pass in api key
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
{
"name": "bitcoin", # string: name of the crypto from coingecko
"crypto": true, # bool: always true for crypto
"ticker": "1) BTC", # string/OPTIONAL: overwrites display name of bot
"color": true, # bool/OPTIONAL: requires nickname
"decorator": "@", # string/OPTIONAL: what to show instead of arrows
"currency": "aud", # string/OPTIONAL: alternative curreny
"currency_symbol": "AUD", # string/OPTIONAL: alternative curreny symbol
"pair": "binancecoin", # string/OPTIONAL: pair the coin with another coin, replaces activity section
"pair_flip": true, # bool/OPTIONAL: show <pair>/<coin> rather than <coin>/<pair>
"activity": "Hello;Its;Me", # string/OPTIONAL: list of strings to show in activity section
"decimals": 3, # int/OPTIONAL: set number of decimal places
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
bot type: tickerboard
Tracks multiple stock or crypto prices. Uses Yahoo for stock or CoinGecko for crypto.
{
"name": "Stocks", # string: name of your board
"items": ["PFG", "GME", "AMC"], # list of strings: symbols from yahoo finance to rotate through
"header": "1. ", # string/OPTIONAL: adds a header to the nickname to help sort bots
"color": true, # bool/OPTIONAL: requires nickname
"arrows": true, # bool/OPTIONAL: show arrows in ticker names
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
{
"name": "Cryptos", # string: name of your board
"crypto": true, # bool: always true for crypto
"items": ["bitcoin", "ethereum", "dogecoin"], # list of strings: names from coingecko to rotate through
"header": "2. ", # string/OPTIONAL: adds a header to the nickname to help sort bots
"color": true, # bool/OPTIONAL: requires nickname
"arrows": true, # bool/OPTIONAL: show arrows in ticker names
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
bot type: marketcap
Tracks the marketcap of a coin. Uses CoinGecko for data.
{
"name": "bitcoin", # string: name of the crypto from coingecko
"ticker": "1) BTC", # string/OPTIONAL: overwrites display name of bot
"color": true, # bool/OPTIONAL: requires nickname
"decorator": "@", # string/OPTIONAL: what to show instead of arrows
"currency": "aud", # string/OPTIONAL: alternative curreny
"currency_symbol": "AUD", # string/OPTIONAL: alternative curreny symbol
"activity": "Hello;Its;Me", # string/OPTIONAL: list of strings to show in activity section
"decimals": 3, # int/OPTIONAL: set number of decimal places
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
bot type: gas
Track the gas price on Ethereum, Binance, or Pol;ygon chains. Uses EthGasWatch for Ethereum or Zapper for others.
{
"network": "ethereum", # string: one of: ethereum, binance-smart-chain, or polygon
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
bot type: holders
Track the number of token holders on Ethereum or Binance chains. Uses etherscan or bscscan for data.
{
"network": "ethereum", # string: one of: ethereum, binance-smart-chain, or polygon
"address": "0x00000000000000000000000000", # string: address of contract for token
"activity": "ethereum", # string: text to show in activity section of the bot
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
bot type: token
Track the price of a token on Ethereum, Binance, or Polygon chains. Uses 1inch by default, or pancakeswap/dexlab if specified.
{
"network": "ethereum", # string: network of token, options are ethereum, binance-smart-chain, or polygon
"name": "my token", # string: display name of token
"contract": "0x00000", # string: contract address of token
"currency": "0x00000", # string/OPTIONAL: contract address of token to price against, default is USDC
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"color": true, # bool/OPTIONAL: requires nickname
"decorator": "@", # string/OPTIONAL: what to show instead of arrows
"activity": "Hello;Its;Me", # string/OPTIONAL: list of strings to show in activity section
"source": "pancakeswap", # string/OPTIONAL: if the token is a BSC token, you can set pancakeswap here to use it vs 1inch; you can also set dexlab for solana tokens
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
bot type: floor
Track the floor price of an NFT collection on OpenSea or Solanart.
{
"marketplace": "opensea", # string: one of: opensea, solsea or solanart
"name": "ethereum", # string: collection name/id from source
"nickname": true, # bool/OPTIONAL: display information in nickname vs activity
"frequency": 10, # int/OPTIONAL: seconds between refresh
"discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx" # string: dicord bot token
}
To enable color changing you will need to create three roles.
The first role is the role the tickers will appear under. It can be named anything you want. You need to check the Display role members seperatly from other online members option for this role, but do not assign a custom color for this role, leave it default.
Then you need to make two other roles. These roles need to be named exactly tickers-red & tickers-green. Do not check the Display role members seperatly from other online members option for these roles, but do assign colors to these roles, red and green (or whatever color you want to represent gain/loss) respectively.
The last two roles tickers-green and tickers-red need to be below the first role in the role list in your server settings. You should then add all your ticker bots to the first role.
Thanks to @jr0dd there is a helm chart for deploying to k8s clusters. His chart can be found here
You can also use a simple deployment file:
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
environment: public
name: ticker-cardano
spec:
replicas: 1
selector:
matchLabels:
environment: public
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
environment: public
spec:
containers:
- env:
- name: CRYPTO_NAME
value: cardano
- name: DISCORD_BOT_TOKEN
value: xxxxxxxxxxxxxxxxxxxxxx
- name: FREQUENCY
value: "1"
- name: SET_COLOR
value: "1"
- name: SET_NICKNAME
value: "1"
- name: TICKER
value: ADA
- name: TZ
value: America/Chicago
image: ghcr.io/rssnyder/discord-stock-ticker:1.8.1
name: ticker-cardano
resources: {}
restartPolicy: Always
status: {}
Since you have read this far, here is a picture of Louie at his favorite park: