Build a Bitcoin Price bot
The cryptocurrency market is exploding. Bitcoin, Ethereum, and many other alternative coins have attracted a lot of hype as their value skyrocketed in recent years.
Market trade 24 hours a day, seven days a week and there are many cryptocurrency trading platforms.
This tutorial will show you how to build a simple chatbot to get current cryptocurrency price using trading platform APIs. Let’s get started.
- Sign up BotHub.Studio account
- Install SDK and CLI tool of BotHub.Studio
- Create FB Messenger Bot
If you’re new to develop chatbot using Bothub.Studio, we suggest you take a look at our following tutorial first.
Nowadays there are many articles like ‘build a chatbot without any code’. But somebody still feels comfortable with…medium.com
2. Implement API
We’re going to use Bitfinex API to check the current status of Bitcoin, Ethereum.
You can use Bitfinex’s Public APIs for checking the current status of the market without authentication. If you want to build a chatbot that can place exchange orders, you’ll need Bitfinex’s User APIs after signing up.
This tutorial only covers getting up to date cryptocurrency price index, so we’ll use only Bitfinex’s public APIs.
3. Create Chatbot
Let’s get the current price information for Bitcoin(BTC), Ethereum(ETH), Ripple(XRP). Given that there are only three options to choose, providing menu would be good enough then the conversational user interface.
FB Messenger provides a feature named ‘Quick Reply’ which appears prominently at any time while the menu is hidden.
We’ll use this feature to help users could choose the currency easily without typing it.
Here’s what FB Messenger looks like following this tutorial.
Do you want to build your own chatbot using Bitfinex’s APIs beyond just checking the current price? Get started now with BotHub.Studio.