2.4.3 • Published 2 years ago

crypto-bot-trader v2.4.3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

CryptoCurrency Bot Trader

swapping of ERC-20 Tokens (buy/sell) based on the market health with bot strategy (condition) - by utilizing MetaMask & Puppeteer

image

List of ERC-20 Tokens Included

  • ChainLink Token, Decentraland, Uniswap, Aave, Curve (CRV), Sushi Token, Avalanche, Wrapped Matic, Wrapped BTC
  • Full Details

Compatible Networks

  • Polygon

Important token/coin

  • usdc (for trading)
  • matic (for gas fees)

Notes

  • Always make sure to have a balance in usdc (used for trading) & matic (for gas fees)
  • One trade at a time (for now)
  • Compound trading

Installation

npm i crypto-bot-trader

Usage

Filename as .env in {root}

PREFERRED_NETWORK="matic-mainnet"
# Default: 0
HEADLESS_BROWSER=1
# Sell Options
# Default: -10 (percent as unit)
SELL_CUTLOSS=-5
# Default: 5 (percent as unit)
SELL_PROFIT=1

Security

As for initial setup will require you to input your PrivateKey & password (required upon encryption of your data) image

Filename as {jsFile} in {root}

const {metaMask, trader, token} = require('crypto-bot-trader');

(async function() {
    // // initiate 
    await metaMask.build();
    const initiatedTrader = new trader({metamask_with_build: metaMask, token: token});
    
    await initiatedTrader.analyzeMarket()
    setInterval(async () => {
        await initiatedTrader.analyzeMarket()
    }, 300000);
    // every 5 minutes

})();
node {jsFile}

Extras

You can also stop your trading bot on a certain date; This is quite ideal on cloud server

On Env File: Add the following key

CHECKPOINT_DATE="{YOUR_DATE_HERE-> Format: YYYY-MM-DD HH:mm} (24-hour)"

Headless

Typical headless in puppeteer with extension of metamask will not work. Alternatively, you can use X Virtual Frame Buffer (xvfb) See Details

const {metaMask, trader, token} = require('crypto-bot-trader');
const Xvfb = require('xvfb');

(async function() {
    let xvfb = new Xvfb();
    xvfb.startSync();
    // // initiate 
    await metaMask.build();
    const initiatedTrader = new trader({metamask_with_build: metaMask, token: token});
    
    await initiatedTrader.analyzeMarket()
    setInterval(async () => {
        await initiatedTrader.analyzeMarket()
    }, 300000);
    // every 5 minutes

})();

Deploy in cloud server

Setup in cloud server, A simple CLI tool for ensuring that a given script runs continuously/in-background called (forever) See Details

const {metaMask, trader, token} = require('crypto-bot-trader');
const { exec } = require("child_process");

(async function() {
    await metaMask.initializeSecurity({pwd: null, is_setup: true});
    exec(`forever start headless.js --pwd=1`, (error, stdout, stderr) => {});

})();

Focus Feature

Focus on a specific token, this is good especially if the volatility of token is really high.

  • focus on matic? wmatic
  • focus on bitcoin? wbtc
  • foucus on etherium? weth
node {jsFile} --focus=wmatic

Method: 'sendto'

After a successful trade, profit will be sent to a specific wallet address. This feature is good if you have bunch of bot traders & you want the profit to be centralized.

node {jsFile} --focus=wmatic --method=sendto

In .env in {root}

WALLET_ADDRESS=
# Exact amount that will be the baseline of trader to prevent draining of wallet; (USDC Currency)
# Ex: 200
BASE_AMOUNT=
2.4.1

2 years ago

2.4.0

2 years ago

2.4.3

2 years ago

2.4.2

2 years ago

2.4.2-beta.11

2 years ago

2.3.6

2 years ago

2.3.5

2 years ago

2.4.2-beta.1

2 years ago

2.3.0

2 years ago

2.2.2

2 years ago

2.2.0

2 years ago

2.1.7

2 years ago

2.1.6

2 years ago

2.1.5

2 years ago

2.1.4

2 years ago

2.1.3

2 years ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.53

2 years ago

1.0.5-3.beta.1

2 years ago

1.0.52

2 years ago

1.0.5-2.beta.1

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.5-0.beta.3

2 years ago

1.0.5-0.beta.2

2 years ago

1.0.5-0.beta.1

2 years ago

1.0.45

2 years ago

1.0.4-5.beta.8

2 years ago

1.0.4-5.beta.7

2 years ago

1.0.4-5.beta.6

2 years ago

1.0.4-5.beta.5

2 years ago

1.0.4-5.beta.4

2 years ago

1.0.4-5.beta.3

2 years ago

1.0.4-5.beta.2

2 years ago

1.0.4-5.beta

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago