Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/DaemonWAGMI/drift-twitter-bot
https://github.com/DaemonWAGMI/drift-twitter-bot
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/DaemonWAGMI/drift-twitter-bot
- Owner: DaemonWAGMI
- Created: 2022-01-26T05:08:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-11T19:33:47.000Z (over 2 years ago)
- Last Synced: 2024-06-30T18:11:34.642Z (4 months ago)
- Language: TypeScript
- Size: 480 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# drift-twitter-bot
## Functionality
- [x] Posts hourly funding rates (top three 'best' rates for long and short positions).
- [x] Posts Drift stats every six hours.
- [X] Posts 'gm' once a day at a random time.## Twitter Integration
Note: the bot is currently configured to connect to the [@DriftFuturesBot](https://twitter.com/DriftFuturesBot) Twitter account using keys secured by DaemonWAGMI.
## Development
### Dependencies
* node
* yarn### Environment Variables
The project uses [dotenv](https://github.com/motdotla/dotenv) to provide environment variables that is either too sensitive to track in source-control (such as `WALLET_PRIVATE_KEY`), or environment-specific (such as the tweet schedule `TWEET_GM_SCHEDULE`).
For local development, place the relevant environment variable dotenv file at the project root as `.env.{env}`. This file is then specified via the `yarn run start-{env}` commands; see package.json for the out-of-the-box support for `dev` and `prod`. Note that the `.gitignore` automatically [ignores](https://github.com/DaemonWAGMI/drift-twitter-bot/blob/main/.gitignore) any `.env*` file to save yourself from committing the file by accident.
### Current Hosting
The bot currently runs on node (using [nvm](https://github.com/nvm-sh/nvm) via the [.nvmrc](https://github.com/DaemonWAGMI/drift-twitter-bot/blob/main/.nvmrc) to pin the version), deployed to Heroku (note the [Procfile](https://github.com/DaemonWAGMI/drift-twitter-bot/blob/main/Procfile)).
### ToDo
- [ ] Implement 'slot' logic to enable liquidation broadcasts to Twitter
- [ ] Unit tests