Giter Site home page Giter Site logo

downlifted / opensea-sales-twitter-bot-aiundead Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dsgriffin/opensea-sales-twitter-bot

0.0 0.0 0.0 64 KB

A Twitter bot that tweets Opensea sales for a given collection ๐Ÿณ

License: ISC License

JavaScript 99.62% Procfile 0.38%

opensea-sales-twitter-bot-aiundead's Introduction

OpenSea Sales Twitter Bot ๐Ÿค–

A (quickly put together) bot that monitors Opensea sales for a given collection & then posts them to Twitter.

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 Twitter Bot instead.

Donations ๐Ÿ’ต

If you find this script/repo useful for your project, any ETH/Altcoin/NFT donations are greatly appreciated ๐Ÿ™

Eth Address: 0xDCA88f66CEc8972D23DE7d5e69c40E087C92132f

Requirements ๐Ÿ“

  • Twitter Developer Account (with Elevated Access, as we need v1.1 endpoint access)

  • A OpenSea API Key (request one here)

  • Heroku Account (a free account should be fine if you tweak the project to run less often than every minute (by default it is every minute), otherwise a $7 a month dyno instance is more than enough).

Setup ๐Ÿ”ง

  • Clone/Fork/Copy this project to your local public/private git repo

  • Create a Twitter Developer App (make sure you change it to have both read/write permissions)

  • Create a new Heroku app & set it as a remote branch of your git repo (see Heroku Remote)

  • Make sure you are logged in to the Twitter account you want the bot to run on (as the next step will be authorizing the bot to post on your account)

  • Install Twurl and, using your Twitter Developer consumer key & secret, generate the access token & access secret

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

  • CONSUMER_KEY - Your Twitter Developer App's Consumer Key
  • CONSUMER_SECRET - Your Twitter Developer App's Consumer Secret
  • ACCESS_TOKEN_KEY - The Access Token Key of the Twitter Account your bot is posting from
  • ACCESS_TOKEN_SECRET - The Access Token Secret of the Twitter Account your bot is posting from
  • OPENSEA_COLLECTION_SLUG - The OpenSea collection name you wish to track (e.g. cryptopunks)
  • X_API_KEY - Your unique OpenSea API key

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!

opensea-sales-twitter-bot-aiundead's People

Contributors

dsgriffin avatar jamesondh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.