• Stars
    star
    291
  • Rank 142,563 (Top 3 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 4 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Add live stock & crypto prices to your discord sidebar.

discord-stock-ticker

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, Solart, and Magiceden
  • 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 theis project to host your own tickers, or pay for custom tickers to be made.

MIT License

GitHub last commit GitHub stars GitHub watchers

Contents

Preview

imageTICKERSBOARDSimageHOLDERSFLOOR

Join the discord server

Discord Chat

Support this project

Buy Me a Coffee

DigitalOcean Referral Badge

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!

Add free tickers to your servers

Stocks

bb | amc | nok | aapl | amzn | goog | sp500 | dow | nasdaq | tsla | dkng | spy | amd | nio | gold | silver | oil | pltr | pypl | sndl | russell | vix | arkk | msft | nflx | gme | dis | minisp500 | mininasdaq | minidow | nvda | fb | btc | coin | ndaq | qqq |

Crypto

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 |

Gas Prices

Ethereum Invite LinkBinance Smart Chain Invite LinkPolygon Invite Link

Premium

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.

Self-Hosting

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

Setting options

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

Systemd (linux)

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).

Managing bots

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:

  1. 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.

  1. 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
  1. postman

Stock and Crypto Price Tickers

bot type: ticker

Tracks stock or crypto prices. Uses Yahoo for stock or CoinGecko for crypto.

Bot Configuration (stock)

{
  "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. Set to " " to disable 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
}

Bot Configuration (crypto)

{
  "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
}

Stock and Crypto Price Tickerboards

bot type: tickerboard

Tracks multiple stock or crypto prices. Uses Yahoo for stock or CoinGecko for crypto.

Bot Configuration (stock)

{
  "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
}

Bot Configuration (crypto)

{
  "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
}

Crypto Market Cap

bot type: marketcap

Tracks the marketcap of a coin. Uses CoinGecko for data.

Bot Configuration

{
  "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. Set to " " to disable 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
}

Crypto Circulating Supply

bot type: circulating

Tracks the circulating supply of a coin. Uses CoinGecko for data.

Bot Configuration

{
  "name": "bitcoin",                                # string: name of the crypto from coingecko
  "ticker": "1) BTC",                               # string/OPTIONAL: overwrites display name of bot
  "currency_symbol": "BITCOIN",                     # 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
}

Crypto Total Value Locked

bot type: valuelocked

Tracks the total value locked of a coin. Uses CoinGecko for data.

Bot Configuration

{
  "name": "bitcoin",                                # string: name of the crypto from coingecko
  "ticker": "1) BTC",                               # string/OPTIONAL: overwrites display name of bot
  "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
}

Gas Prices

bot type: gas

image

Track the gas price on:

  • Ethereum
  • Binance
  • Polygon
  • ..and many more

Uses Zapper for data. For now always uses the eip1559 chains.

Bot Configuration

{
  "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
}

Ethereum, BSC, or Polygon Token Holders

bot type: holders

HOLDERS

Track the number of token holders on Ethereum or Binance chains. Uses etherscan or bscscan for data.

Bot Configuration

{
  "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
}

ETH/BSC/MATIC Token Price

bot type: token

Track the price of a token on Ethereum, Binance, or Polygon chains. Uses 1inch by default, or pancakeswap/dexlab if specified.

Bot Configuration

{
  "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. Set to " " to disable 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
}

OpenSea/Solanart NFT Collection Floor Price

bot type: floor

image

Track the floor price of an NFT collection on OpenSea, Solanart, Solsea or MagicEden

Bot Configuration

{
  "marketplace": "opensea",                         # string: one of: opensea, solanart, solsea or magiceden
  "name": "ethereum",                               # string: collection name/id from source
  "color": true,                                    # bool/OPTIONAL: requires nickname
  "decorator": "@",                                 # string/OPTIONAL: what to show instead of arrows. Set to " " to disable arrows.
  "currency": "MATIC",                              # string/OPTIONAL: alternative curreny
  "nickname": true,                                 # bool/OPTIONAL: display information in nickname vs activity
  "activity": "Hello;Its;Me",                       # string/OPTIONAL: list of strings to show in activity section
  "frequency": 10,                                  # int/OPTIONAL: seconds between refresh
  "discord_bot_token": "xxxxxxxxxxxxxxxxxxxxxxxx"   # string: dicord bot token
}

Roles for colors

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.

roles example

Kubernetes

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: {}

Louie

Since you have read this far, here is a picture of Louie at his favorite park:

PXL_20210424_185951005 PORTRAIT

More Repositories

1

discord-nft-floor-price

display the floor price for an opensea/solanart nft collection in your discord sidebar
TypeScript
7
star
2

coingecko-cache

process to cache data from coingecko api
Go
6
star
3

mediamanager

Python
6
star
4

isengard

personal ansible-tower like tool using github actions
HCL
5
star
5

discord-stock-ticker-bot

Python
5
star
6

discord-auditlog-export

export your discord audit logs
Go
4
star
7

taco-bell-python

A python sdk for Taco Bell.
Python
3
star
8

community-clips

2
star
9

discord-bot-manager

code to help me strengthen my bot army
Python
2
star
10

discord-nerd-stats

docker compose resources for standing up a discord monitoring stack
2
star
11

discord-opensea-nft-sales

send sales of nfts on opensea to discord via webhooks
Python
2
star
12

discord-crypto-gas-price

Go
2
star
13

discord-stock-ticker-api

api to drive creation of my discord-stock-ticker bots
Python
2
star
14

bones-day

is it a bones day?
Python
2
star
15

discord-eth-token-holders

a discord bot to show you the number of holders for a particular ethereum token
Go
2
star
16

nebula-action-step

connect to a nebula network in your actions workflow
Shell
2
star
17

discord-pancakeswap-nft-sales

send sales of nfts on pancakeswap to discord via webhooks
Python
2
star
18

eth-token-holders

api to find the amount of holders for a particular ethereum token
Go
2
star
19

discord-eth-gas-price

a discord bot to display the current reccomended gas amount for ethereum transactions
Go
2
star
20

defined-networking-connect

Shell
2
star
21

hackisu-f17

Our project for HackISU Fall 2017.
Python
1
star
22

harness-templates

steps, stages, and pipelines for the harness platform
HCL
1
star
23

thoughts

an idea, plan, opinion, picture, etc., that is formed in your mind : something that you think of
Shell
1
star
24

ghcr-artifact-store

use GitHub Container Registry to store regular artifacts
Shell
1
star
25

aoc

advent of code
Go
1
star
26

fetch-movies

APIs to collect movies and magnet links for popular torrents.
Python
1
star
27

photos

1
star
28

discord-reddit-posts

send reddit posts to discord via webhook
Python
1
star
29

rmrk-events

tally user interactions in the rmrk server
Python
1
star
30

terraform-templates

random terraform from here and there
HCL
1
star
31

louieslibrary

books for all
Go
1
star
32

test-public

1
star
33

rssnyder.github.io

just like my personality, this site is static
HTML
1
star
34

harness-ccm-perspectives

Python
1
star
35

discord-minecraft-server-stats

Go
1
star
36

terraform-digitalocean-domain-redirect

Redirect a domain in digitalocean to another URL
HCL
1
star
37

discord-alta-finance

discord bot for alta.finance
Go
1
star
38

wilderworld-zines

send new zines from wilderworld.com to discord
Python
1
star
39

Raise-Hand

Computer Science 309 Project
Java
1
star
40

minio-lifecycle

minio-lifecycle
Go
1
star
41

drone-plugin-latest-delegate

get the latest delegate image for your harness account
Shell
1
star