https://github.com/terror/deft
Buy X cryptocurrency when Y tweets about it
https://github.com/terror/deft
Last synced: 2 months ago
JSON representation
Buy X cryptocurrency when Y tweets about it
- Host: GitHub
- URL: https://github.com/terror/deft
- Owner: terror
- Created: 2021-02-10T17:05:08.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-02-12T22:57:49.000Z (almost 5 years ago)
- Last Synced: 2025-10-11T09:18:42.276Z (3 months ago)
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

Random idea: let's buy cryptocurrencies if an influencer tweets positively about them
## Motivation
🎶 Who let the Doge out 🎶
— Elon Musk (@elonmusk) February 7, 2021
After this tweet, the price of $DOGE increased by roughly 10%.
## Features
A few things this program will take care of:
- Fetching up to date tweets from specified influencers and filter them based on keywords
- Run sentiment analysis on the specified influencers tweets
- Automatically place a customized trade via Binance
## Usage
This program makes use of several different APIs to perform various tasks.
- [Binance](https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md)
- [Twitter](https://developer.twitter.com/)
- [Google Cloud Platform](https://cloud.google.com/)
You must have the following environment variables set in order to run the CLI:
```
BINANCE_API_KEY=
BINANCE_SECRET_KEY=
TWITTER_API_TOKEN=
GOOGLE_APPLICATION_CREDENTIALS=
```
Once these are all set up, you can simply run the following command and let the program run in the background:
```bash
$ python3 deft --run &
```
## Configuration
You must edit the `config.json` file to suit your needs, here is what a sample config file looks like:
```json
{
"twitter": {
"accounts": ["elonmusk", "jack"]
},
"currencies": {
"dogecoin": {
"symbol": "DOGEBUSD",
"quantity": "100",
"limitPrice": "0.08",
"keywords": ["DOGE", "Dogecoin"]
},
"ethereum": {
"symbol": "ETHBUSD",
"quantity": "0.1",
"limitPrice": "1800",
"keywords": ["ETH", "Ethereum"]
}
}
}
```