kfrawee / frl_31_binance-leaderboard-bot-aws

Using requests running on AWS Lambda, Scrape Binance leaderboard on schedule basis (cron job).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Binance leaderboard serverless bot πŸͺ™πŸ€–

Using AWS Lambda with a schedule, to get the updates from Binance leaderboard


Setup:

  • Setup Telegram Bot:

    • For TELEGRAM_BOT_API_KEY: Create a new Bot; Message (@BotFather) to create a new bot and get you bot.
    • For TELEGRAM_CHAT_ID:
      • Create a new chat group.
      • Add (@RawDataBot) to your group and type: "/start" to get the chat id. Reference
      • OR, Send a message to (@username_to_id_bot) with invitation link.
  • In serverless.yml, replace those two values with yours from above steps:

    • TELEGRAM_BOT_API_KEY
    • TELEGRAM_CHAT_ID
  • In serverless.yml, change schedule rate:

Deploy to AWS:

This project uses serverless framework ⚑. So, make sure you get that first and give the necessary permissions to serverless cli. Follow this page for getting started.

  • Deploy the stack:
    $ serverless deploy
    
    βœ” Service deployed to binance-leaderboard-bot-dev
  • After deployment is successful, you can check the deployed stack details using:
    $ serverless info
    
    service: binance-leaderboard-bot
    stage: dev
    region: us-east-1
    stack: binance-leaderboard-bot-dev
    functions:
    binanceBot: binance-leaderboard-bot-dev-binanceBot
    layers:
    pybinance: arn:aws:lambda:us-east-1:xxxxx:layer:pybinance:x

Cleaning:

To remove the stack and all the services and resources:

$ serverless remove

βœ” Service binance-leaderboard-bot has been successfully removed

About

Using requests running on AWS Lambda, Scrape Binance leaderboard on schedule basis (cron job).


Languages

Language:Python 100.0%