dsgriffin / opensea-sales-x-bot

An X bot that tweets Opensea sales for a given collection 🐳
ISC License
194 stars 290 forks source link
ethereum nft opensea x-bot

OpenSea Sales X Bot πŸ€–

A simple bot that monitors Opensea sales for a given collection & then posts them to X.

Want to include sales from other markets (X2Y2, LooksRare etc.) too? ⚠️

To track sales across multiple marketplaces (X2Y2, LooksRare etc.), use my new repo NFT Sales X Bot instead.

Donations πŸ’΅

Eth Address: 0x51C96e813e377E1a18B6867F932aE1B7b1600372

Thank you πŸ™

Requirements πŸ“

Setup πŸ”§

In the Settings section of your Heroku app you'll see a Config Vars section. Add the following config vars:

Now you're ready to release - just push up the code via. git to the Heroku remote (see Heroku Remote if unsure how).

Make sure you are using worker dynos and not web dynos - you can set this in the CLI your project with:

heroku ps:scale web=0
heroku ps:scale worker=1

Modification πŸ› 

By default I am just include the name, price in eth & usd, a hashtag or two and a link to the NFT on OpenSea. Check out the OpenSea Events API if you want to include additional info (such as seller/buyer addresses etc.).

There is tweetWithImage function that you can use instead of the default tweet method if you prefer - this will display the full image file as part of the tweet, instead of the standard OpenSea preview image.

In app.js, on line 24 you can see there's a commented out conditional if you'd like to only tweet out sales above a certain amount of Eth.

As mentioned at the top of the README, it runs every 60 seconds by default - you can change this to run less often if you'd like to keep it on a free Heroku instance.

License πŸ“ƒ

This code is licensed under the ISC License.

Please include proper attribution to my original repo if you fork, modify or utilize this repo in any way. Thank you!