Skip to content

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

Notifications You must be signed in to change notification settings

kfrawee/frl_31_binance-leaderboard-bot-aws

Repository files navigation

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).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages