Trading bot that uses Elon Musk`s tweets to know when to buy cryptocurrency.

Overview

Elonbot

Trading bot that uses Elon Musk`s tweets to know when to buy cryptocurrency. Here is how it works:

  1. Subscribes to someone's (elonmusk?) tweets
  2. Automatically detects mentions of DOGE or other crypto in the image(or text) Elon's tweet
  3. Buys crypto on Binance
  4. Sells it after --auto-sell-delay seconds

Installation

git clone http://github.com/vslaykovsky/elonbot
pip install python-binance google-cloud-vision unidecode

Running

  1. Set up Twitter access keys.
    • Go to developer.twitter.com to create your developer account
    • Generate a bearer token
    • Set up an environment variable with the bearer token.
      • Linux: export TWITTER_BEARER_TOKEN="<YOUR BEARER TOKEN>"
      • Windows: set TWITTER_BEARER_TOKEN="<YOUR BEARER TOKEN>"
  2. Set up Binance access keys.
    • Go to Binance and create a trader account if you don't have it yet
    • Go to API management page and copy your API key and secret
    • Export both keys:
      • Linux: export BINANCE_KEY="<your API key>"; export BINANCE_SECRET="<your secret key>"
      • Windows: set BINANCE_KEY="<your API key>" & export BINANCE_SECRET="<your secret key>"
  3. [Optional] Add image text recognition support with Google OCR
    • Use the following documentation to access Google Vision API
    • Export path to your google vision configuration.
      • Linux export GOOGLE_APPLICATION_CREDENTIALS="/path/to/your/google_vision_credentials.json"
      • Windows set GOOGLE_APPLICATION_CREDENTIALS="C:\path\to\your\google_vision_credentials.json"
  4. Run elonbot.py

Here are some examples of how to run Elonbot. All examples are provided for Linux. For Windows make sure you use correct escaping

With image text recognition:

python elonbot.py --user=elonmusk --margin-type=cross_margin  --crypto-rules='{"doge": "DOGE", "btc|bitcoin": "BTC"}' --auto-sell-delay=600  --order-size=max  --use-image-signal

No image text recognition

python elonbot.py --user=elonmusk --margin-type=cross_margin  --crypto-rules='{"doge": "DOGE", "btc|bitcoin": "BTC"}' --auto-sell-delay=600 --order-size=max

Dry run (only prints debug output, no orders are executed)

python elonbot.py --user=elonmusk --margin-type=cross_margin  --crypto-rules='{"doge": "DOGE", "btc|bitcoin": "BTC"}'  --auto-sell-delay=60 --order-size=max --dry-run

Get help:

(base) C:\Users\vslay\Desktop\notebooks\elon>python elonbot.py --help
usage: elonbot.py [-h] --user USER --crypto-rules CRYPTO_RULES --margin-type MARGIN_TYPE [--auto-buy-delay AUTO_BUY_DELAY] [--auto-sell-delay AUTO_SELL_DELAY] [--asset ASSET] [--use-image-signal]
                  [--order-size ORDER_SIZE] [--dry-run] [--process-tweet PROCESS_TWEET]

Trade cryptocurrency at Binance using Twitter signal

optional arguments:
  -h, --help            show this help message and exit
  --user USER           Twitter user to follow. Example: elonmusk
  --crypto-rules CRYPTO_RULES
                        JSON dictionary, where keys are regular expression patterns, values are corresponding cryptocurrency tickers. elonbot.py uses regular expressions to find tweets that mention
                        cryptocurrency,then buys corresponding crypto ticker
  --margin-type MARGIN_TYPE
                        isolated_margin or cross_margin. These are two margin types supported by Binance. Read this article to understand the difference:
                        https://www.binance.com/en/blog/421499824684900602/Binance-Margin-Differences-Between-the-New-Isolated-Margin-Mode-and-Cross-Margin-Mode. You must transfer your assets to isolated
                        margin or cross-margin to use this script
  --auto-buy-delay AUTO_BUY_DELAY
                        Buy after auto-buy-delay seconds
  --auto-sell-delay AUTO_SELL_DELAY
                        Sell after auto-sell-delay seconds
  --asset ASSET         asset to use to buy cryptocurrency. This is your "base" cryptocurrency used to store your deposit. Reasonable options are: USDT, BUSD, USDC. You must convert your deposit to one
                        of these currencies in order to use the script
  --use-image-signal    Extract text from attached twitter images using Google OCR. Requires correct value of GOOGLE_APPLICATION_CREDENTIALS environment variable.Check
                        https://github.com/vslaykovsky/elonbot for more details
  --order-size ORDER_SIZE
                        Size of orders to execute. 1.0 means 100% of the deposit; 0.5 - 50% of the deposit; 2.0 - 200% of the deposit (marginal trade)"max" - maximum borrowable amount. max corresponds to
                        3x deposit for cross-margin account and up to 5x for isolated-margin account
  --dry-run             Don't execute orders, only show debug output
  --process-tweet PROCESS_TWEET
                        Don't subscribe to Twitter feed, only process a single tweet provided as a json string (useful for testing). Example value: '{"data": {"text": "Dodge coin is not what we need"},
                        "includes": {"media": [{"url": "..."}]}}'
🖥️ Windows Batch and powershell Discord Token grabber. Made for Troll (lmao)

Batched-Grabber Windows Batch and powershell Discord Token grabber. Made for Troll ! Setup. 1. pip(3) install numpy colored 2. python(3) Batched.py 3.

Ѵιcнч 41 Nov 01, 2022
Acc-discord-rpc - Assetto Corsa Competizione Discord Rich Presence Client

A simple Assetto Corsa Competizione Rich Presence client. This app only works in

6 Dec 18, 2022
A Script to automate fowarding all new messages from one/many channel(s) to another channel(s), without the forwarded tag.

Channel Auto Message Post A script to automate fowarding all new messages from one/many channel(s) to another channel(s), without the forwarded tag. C

16 Oct 21, 2022
A Twitch bot to provide information from the WebNowPlayingCompanion extension

WebNowPlayingTwitch A Twitch bot made using TwitchIO which displays information obtained from the WebNowPlaying Compaion browser extension. Image is o

NiceAesth 1 Mar 21, 2022
Whatsapp-APi Wrapper From rzawapi.my.id

Whatsapp-APi Wrapper From rzawapi.my.id

Rezza Priatna 2 Apr 19, 2022
Netflix Movies and TV Series Downloader Tool including CDM L1 which you guys can Donwload 4K Movies

NFRipper2.0 I could not shared all the code here Because its has lots of files inisde it https://new.gdtot.me/file/86651844 - Downoad File From Here.

Kiran 15 May 06, 2022
Github Workflows üzerinde Çalışan A101 Aktüel Telegam Bot

A101AktuelRobot Github Workflows üzerinde Çalışan A101 Aktüel Telegam Bot @A101AktuelRobot 💸 Bağış Yap ☕️ Kahve Ismarla 🌐 Telif Hakkı ve Lisans Copy

Ömer Faruk Sancak 10 Nov 02, 2022
Bringing Ethereum Virtual Machine to StarkNet at warp speed!

Warp Warp brings EVM compatible languages to StarkNet, making it possible to transpile Ethereum smart contracts to Cairo, and use them on StarkNet. Ta

Nethermind 700 Dec 26, 2022
The most versatile torrent leecher and youtube-dl bot for telegram

TorToolkit Telegram So basically Tortoolkit is aimed to be the most versatile torrent leecher and youtube-dl bot for telegram. This bot is highly cust

αвιנтн 1 Nov 11, 2021
A github actions + python code to extract URLs to code repositories to put into standard form, starting with github

A github actions + python code to extract URLs to code repositories to put into standard form, starting with github ---- NOTE: JUS

Justin Gosses 2 Nov 15, 2021
Auto Filter Bot V2 With Python

How To Deploy Video Subscribe YouTube Channel Added Features Imdb posters for autofilter. Imdb rating for autofilter. Custom captions for your files.

Milas 2 Mar 25, 2022
Discord bot built using Python. through this you can get information about the upcoming matches, scoreboard, live score

IPL-bot This is a Discord bot built using Python. through this you can get information about the upcoming matches, scoreboard, live score, and many mo

0 Dec 23, 2021
Simple integration between FastAPI and cloud authentication services (AWS Cognito, Auth0, Firebase Authentication).

FastAPI Cloud Auth fastapi-cloudauth standardizes and simplifies the integration between FastAPI and cloud authentication services (AWS Cognito, Auth0

tokusumi 255 Jan 07, 2023
Métamorphose Renamer v2

Métamorphose 2 Métamorphose is a graphical mass renaming program for files and folders. These are the command line options: -h, --help Show hel

Métamorphose 129 Dec 30, 2022
A telegram bot that can upload telegram media files to anonfiles.com and give you direct download link

✯ AnonFilesBot ✯ Telegram Files to AnonFiles Upload Bot It will Also Give Direct Download Link Process : Fork This Repositry And Simply Cick On Heroku

Avishkar Patil 38 Dec 30, 2022
Rock API is an API that allows you to view rocks and find the ratings on them

Rock API The best Rock API What is Rock API? Rock API is an API that allows you to view rocks and find the ratings on them. However, this isn't a regu

Conos 21 Sep 21, 2022
Open API to list Viet Nam administrative divisions

Viet Nam province API Homepage: https://provinces.open-api.vn This is online tool to let my VietnamProvinces library reach more users. VietnamProvince

Nguyễn Hồng Quân 52 Dec 05, 2022
Music bot because Octave is down and I can : )

Chords On a mission to build the best Discord Music Bot View Demo · Report Bug · Request Feature Table of Contents About The Project Built With Gettin

Aman Prakash Jha 53 Jan 07, 2023
Telegram Vc Video Player Bot

Telegram Video Player Bot Telegram bot project for streaming video on telegram video chat, powered by tgcalls and pyrogram Deploy to Heroku 👨‍🔧 The

Dihan Official 11 Dec 25, 2022
Written in Python, freezed into stand-alone executable with PyInstaller. This app will make sure you stay in New World without getting kicked for inactivity.

New World - AFK Written in Python, freezed into stand-alone executable with PyInstaller. This app will make sure you stay in New World without getting

Rodney 5 Oct 31, 2021