/coinbot

Coinbase query bot for Discord

Primary LanguagePythonMIT LicenseMIT

coinbot

Coinbot is a simple bot that returns basic information from
Coinbase.com about digital currencies, in USD format.

Requirments

  • python >= 3.6
  • pip
    • coinbase
    • -U discord.py

Note: It is recommended to install this application in a python virtual environment.

Installation

Sign up with Coinbase
Enable an API key at https://coinbase.com/settings/api
Record your API KEY + SECRET

Head over to Discord and create a new app.
Record your Client_ID. On the left, click Bot, and then Add Bot.
Once you are done setting up your bot, record the Token and Client Secret.

In coinbase.py replace all <...> with appropriate information.

To start bot, run:

python coinbot.py

To add bot to server add your Client_ID to this URL and visit in browser:
https://discordapp.com/oauth2/authorize?client_id= Client_ID &scope=bot

Usage

When bot is active in server type:

%list to return a list of Coinbase supported digital currencies that can be used as arguments for other functions.
%prices BTC to return a list of current BTC trading prices.
%exchange ETH LTC to return exchange rate between two currencies.
%history BCH period to return a percentage of gain or loss from specified period.
Valid period argurments are hour, day, week, month, and year.