automainint / sea-offers-bot-js

Multiple buy orders bot for OpenSea.
MIT License
59 stars 18 forks source link
bot javascript nft nodejs opensea

sea-offers-bot-js

Multiple buy orders bot for OpenSea with automatic price calculation and proxy support.

If something don't work, feel free to open an issue.

The code is obfuscated. Contact me if you need access to unobfuscated source code, guidance, or you have a new feature proposal.

Join our Discord!

Some tips to successfully run automatic operations on OpenSea

You can use this bot alongside with tor-multiproxy.

Be very precautious with automatic trading! Have a separate account with small balance for testing unknown bots and services.

Configuration

Required settings

Optional settings

Values floor, roof, epsilon for price calculation will be taken from the assets list file if specified, or from the config otherwise.

If auto price calculation is disabled, only the floor value will be used to create a buy order.

Default config file: config.json.

Example

{
  "network":        "rinkeby",
  "infura_key":     "<your Infura API key>",
  "private_keys":   [ "<your private key>" ],
  "wallet_address": "<your wallet address>",

  "price_auto":     true,
  "price_floor":    0.001,
  "price_roof":     100,
  "price_epsilon":  0.001,

  "expiration":     4,

  "delay":          500
}

Assets list file

Each line contains a link to the asset on OpenSea and floor, roof, epsilon price values in wETH as floating-point numbers. If there is no value specified, it will be taken from the config. First number is floor, second is roof and last is epsilon.

Asset line notation: <link to asset> [floor price] [roof price] [epsilon]

Default list file: list.txt.

Example

https://testnets.opensea.io/assets/0x08a62684d8d609dcc7cfb0664cf9aabec86504e5/100 0.01 100
https://testnets.opensea.io/assets/0x08a62684d8d609dcc7cfb0664cf9aabec86504e5/200
https://testnets.opensea.io/assets/0x08a62684d8d609dcc7cfb0664cf9aabec86504e5/300 0.2 200 0.1

Proxies list file

Available proxy notation:

Available protocols:

Host should be an IPv4 address. Protocol can be omitted, in which case the value proxy_protocol from the configuration will be used.

Example

socks://127.0.0.1:9050
127.0.0.1:8080

Command line arguments

Auto price calculation formula

For each asset:

bid price = max(floor, min(max(highest bid + epsilon, highest bid * (1 + increment factor)), roof)

Usage

You should have an Infura or Alchemy API key, an OpenSea API key, an OpenSea account and a MetaMask account.

Make sure to have installed recent version of Node.js with Git, Python and C/C++ build tools (npm may require this to install dependencies).

Example

npm install
node offers.js --config=config.json --file=list.txt

Demo video - https://youtu.be/sGwS2v-S2wk

Troubleshooting

If the bot don't work with recent Node.js version, try to use v16. You can use NVM to easily switch versions.

If you getting error 0308010C:digital envelope routines::unsupported, you should use Node.js v16 or set environment variable NODE_OPTIONS=--openssl-legacy-provider. See also - https://github.com/webpack/webpack/issues/14532

If you getting error FetchError: request to ... failed, reason: certificate has expired, and you are using an old Node.js version, set environment variable NODE_TLS_REJECT_UNAUTHORIZED=0.

For tip