create account

I developed a Real-time Bitcoin Transaction Fee Slack Bot, here's how! by moxi

View this thread on: hive.blogpeakd.comecency.com
· @moxi · (edited)
I developed a Real-time Bitcoin Transaction Fee Slack Bot, here's how!
I've recently developed software on Microsoft's Cloud platform [Azure](https://azure.microsoft.com) and [Slack Bot APIs](https://api.slack.com/apps/) in order to come up with a nice spread of real-time Bitcoin Transaction Fees.  I wanted to share with you how I've done this and perhaps you can use it yourself as well.

All source code is published on my [GitHub Gist](https://gist.github.com/lmoxiel/262a641859f0eaa77afaeaf64c379c02).

# Architecture Overview
![](https://steemitimages.com/DQmcT2vFnBckYWPUJzBp78JfHBHUGqGxYMigbTax1UHf5ov/image.png)

# Step 1
User issues a configured Slash command such as /fees which sends an HTTPS Request to the [Azure Function](https://docs.microsoft.com/en-us/azure/azure-functions/).

# Step 2
1. The Azure functions pulls real-time Bitcoin Transaction data from http://bitcoinfees.earn.com.
2. Computes transactions fees in *very slow*, *slow*, *medium*, and *fast* categories.
3. Does some nifty code to parse out the Slack user who invoked the slack bot
4. Sends an HTTP webhook back to the Slack Bot

# Step 3
The Slack bot sends the results back to the Slack channel

![](https://steemitimages.com/DQmQWEynJtgBN9DyayEGHZs8KN8ALuPVZuBKbaHTSBek4Mq/image.png)


So if I go into Coinbase right now and try to send BTC to another address, it'll charge me ~$16 USD which as you can see is on the faster side (roughly 36min) of the transaction fees.  If you could manually adjust the speeds, you can easily pay about $1 and just get it the next day.

Here is a screenshot of configuring the actual Slack Bot application

![](https://steemitimages.com/DQmaENKyNiPQe1K4wkYLhpcaahqzodQs8a729ArAo5KtKdp/image.png)
![](https://steemitimages.com/DQmUcvUsi2RXFf3qjurAMKdLeFZgW656sTVgSkfCqUQrYjX/image.png)
![](https://steemitimages.com/DQmZCTjjsFvVHrpxVoXv5E3koiPjXxDsdoDuc9eEiXb3FzA/image.png)
![](https://steemitimages.com/DQmQVNipgSVbh9U6FoxdQxph5ttMgZxcGRAFBLxWFkUgMMs/image.png)

The Azure Function itself is written in [Microsoft PowerShell](https://docs.microsoft.com/en-us/powershell/) code which can be [downloaded here](https://gist.github.com/lmoxiel/262a641859f0eaa77afaeaf64c379c02):
![](https://steemitimages.com/DQmcsurGdyRRG2in5Rfp4WJxjxgwH1XEQqXQo4aUYSrYoBM/image.png)

# Enjoy!


## //Support Me?
![](https://steemitimages.com/DQmcqEfpaor2LRj479KsxmW49HBVpgH8Xm1HLLhC37LDKdY/image.png) BTC - 1L19KwFizQa8d5XvbqXrDdsRADvmDePtzr
![](https://steemitimages.com/DQmQLztcjW7gFKKxur4sfMDpF5nChGLgrrEPqRwSup21cSq/image.png) ETH - 0x3275cf9B6412e031AEC4502521a6C8E515B1a0fa
![](https://steemitimages.com/DQmfGs9t95YU4UURmn1ryBcfAmavo1nAMkXo3QRN5Lrbgg1/image.png) LTC - LN8WC6kXspe6z7vo9q4kS3BewKkAPf9Nzd
![](https://steemitimages.com/DQmdB5zn6Rvq8KHEGT9ozSnabqoWH2YxjptypoFovbTaJ65/image.png) DASH - XotdWpZais9jB9uns2dMLKUyBvSd5aBmed
![](https://steemitimages.com/DQmcDE4GqQkmQFQu8ZNGbszPx565FHVEJPtuKoabVhoNUvx/image.png) DOGE - D5K3nXUfP7JjJruQA1KWg7pnXQ1sRu7g5t
👍  
properties (23)
authormoxi
permlinki-developed-a-real-time-bitcoin-transaction-fee-slack-bot-here-s-how
categorybitcoin
json_metadata{"tags":["bitcoin","blockchain","cryptocurrency","crypto","crypto-news"],"image":["https://steemitimages.com/DQmcT2vFnBckYWPUJzBp78JfHBHUGqGxYMigbTax1UHf5ov/image.png","https://steemitimages.com/DQmQWEynJtgBN9DyayEGHZs8KN8ALuPVZuBKbaHTSBek4Mq/image.png","https://steemitimages.com/DQmaENKyNiPQe1K4wkYLhpcaahqzodQs8a729ArAo5KtKdp/image.png","https://steemitimages.com/DQmUcvUsi2RXFf3qjurAMKdLeFZgW656sTVgSkfCqUQrYjX/image.png","https://steemitimages.com/DQmZCTjjsFvVHrpxVoXv5E3koiPjXxDsdoDuc9eEiXb3FzA/image.png","https://steemitimages.com/DQmQVNipgSVbh9U6FoxdQxph5ttMgZxcGRAFBLxWFkUgMMs/image.png","https://steemitimages.com/DQmcsurGdyRRG2in5Rfp4WJxjxgwH1XEQqXQo4aUYSrYoBM/image.png","https://steemitimages.com/DQmcqEfpaor2LRj479KsxmW49HBVpgH8Xm1HLLhC37LDKdY/image.png","https://steemitimages.com/DQmQLztcjW7gFKKxur4sfMDpF5nChGLgrrEPqRwSup21cSq/image.png","https://steemitimages.com/DQmfGs9t95YU4UURmn1ryBcfAmavo1nAMkXo3QRN5Lrbgg1/image.png","https://steemitimages.com/DQmdB5zn6Rvq8KHEGT9ozSnabqoWH2YxjptypoFovbTaJ65/image.png","https://steemitimages.com/DQmcDE4GqQkmQFQu8ZNGbszPx565FHVEJPtuKoabVhoNUvx/image.png"],"links":["https://azure.microsoft.com","https://api.slack.com/apps/","https://gist.github.com/lmoxiel/262a641859f0eaa77afaeaf64c379c02","https://docs.microsoft.com/en-us/azure/azure-functions/","http://bitcoinfees.earn.com","https://docs.microsoft.com/en-us/powershell/"],"app":"steemit/0.1","format":"markdown"}
created2018-01-14 03:16:27
last_update2018-01-14 03:23:30
depth0
children0
last_payout2018-01-21 03:16:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,906
author_reputation88,251,299,172
root_title"I developed a Real-time Bitcoin Transaction Fee Slack Bot, here's how!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id29,366,108
net_rshares723,637,450
author_curate_reward""
vote details (1)