Skip to content

Line Messaging webhook REST API that can get Cryptocurrency price from Binance API

License

Notifications You must be signed in to change notification settings

pholawat-tle/crypto-line-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


LINE Cryptocurrency Bot

Chatbot that can get you Cryptocurrency Price


Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage

About The Project

This is a LINE Chatbot that can get the latest Cryptocurrency Price and Charts from Binance API.

Built With

  • NGINX
  • Node.js
  • Docker-Compose
  • Express.js
  • Puppeteer

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • Docker and Docker compose
  • Line Official Account Channel Access Token
  • SSL Certification and Domain Name

Starting the webhook server

  1. Clone the repo

    git clone https://github.com/pholawat-tle/crypto-line-bot
  2. Go inside the project directory

    cd crypto-line-bot
  3. Set up SSL certificate and Domain name

    1. Put the certificates and private key inside nginx/certificates folder
    2. Change the certificate name and Domain name nginx/default.conf
  4. Create a .env file in server/src

    nano ./server/src/.env
  5. Set the Channel Access Token Variable

    ChannelAccessToken=YOUR_ACCESS_TOKEN
    
  6. Run Docker Compose

    docker-compose up --build
  7. Change the webhook url on LINE Developer Console to https://yourdomain/api/webhook

Usage

Command Description
!price <symbol> Get the latest price from Binance API
!graph <symbol> Get a screenshot of the chart from Binance API

The screenshots of the chart are saved inside the server folder and each screenshot will be deleted after 24 hours

License

Distributed under the MIT License. See LICENSE for more information.

About

Line Messaging webhook REST API that can get Cryptocurrency price from Binance API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published