Algorithms

This page shows you examples of a "classic" use of the bot (buy and sell)

For dedicated modes examples (Telegram mode / Trailing Stop / Buy the dip...) check dedicated pages

"WATCH_STABLES_PAIRS": "true",

"MINIMUM_LIQUIDITY_IN_DOLLARS": "1000", It will :

  • allow you to snipe tokens with OpenTrading function

  • check every liquidity pairs

  • prevent you from being scammed by swapping only if liquidity > 1000$

Enjoy 🙏

BSC - Snipe 0.5 BNB of NEWINU

One of the codes that's built into the Launcher

Copy

// [
    {
    "WALLETPRIVATEKEY": "aes:zmp4ii0jdlMOueosehfiuosehfisurhfesofjrpgkdrogkd^rgd^rgsh=*1LgzSU06YPv92nuSGKqMrA==",
    "WALLETADDRESS": "0x265Cb06dc562C97Acc8e51EBE3AA0275BF0c4D3D",
    "WALLETADDRESS": "0x265Cb06dc562C97Acc8e51EBE3AA0275BF0c4D3D",
    "PRIVATEKEY": "aes:zmp4ii0jdlMOueosehfiuosehfisurhfesofjrpgkdrogkd^rgd^rgsh=*1LgzSU06YPv92nuSGKqMrA==",
    "WALLETADDRESS2": "0x0975AbFE55656DGDRGFG4SDXC49f0855",
    "PRIVATEKEY2": "aes:3hfthfthLh2WJfsefsgdhdththftMOFaYE50nu1W/GOkfFSvHW3PCsYubayAA==*e4U1hehtfhfthtfhtfhfthft7CPV2Fy5fX6IAhtfhtfhtfhftUj2dNaZV8MVA==",
    "WALLETADDRESS3": "null",
    "PRIVATEKEY3": "null",
    "WALLETADDRESS4": "null",
    "PRIVATEKEY4": "null",
    "WALLETADDRESS5": "null",
    "PRIVATEKEY5": "null",
    "USECUSTOMNODE": "true",
    "CUSTOMNODE": "https://bsc-dataseed4.ninicoin.io/",
    "EXCHANGE": "Pancakeswap",
	"EXCHANGEVERSION": "2",  
    "PREAPPROVE": "true",
    "UNLIMITEDSLIPPAGE": "false",  
    "ENCRYPTPRIVATEKEYS": "true",
    "PASSWORD_ON_CHANGE": "false"
    }
]

In this example:

  • We choose to use same wallet for holding BSC tokens and trading. You can also choose to use 2 different wallets : up to you 😇

  • We choose to use a custom BSC node : https://bsc-dataseed4.ninicoin.io/ To use custom node, you need to enter its http address, with the "/" at the end of the address.

Next Code

To snipe new token, you need:

  • contract address

  • listing price

If you don't know listing price and want the bot to buy at any price, you can put BUYPRICEINBASE = 1000 for instance

Let's say you want to snipe 0.5 BNB of NEWINU.

// [
  {
  "ENABLED": "true",
  "SELECT_MODE": "limitswap" 
  "SYMBOL": "NEWINU",
  "ADDRESS": "0xcfefa64b0ddd611c12157c41cd3827f2e8e8615",
  
  "KIND_OF_SWAP": "base",
  "BUYAMOUNTINBASE": "0.5",
  "BUYAMOUNTINTOKEN": "(not used)",
  "MAX_BASE_AMOUNT_PER_EXACT_TOKENS_TRANSACTION": "(not used)",

  "BUYPRICEINBASE": "0.001",
  "SELLPRICEINBASE": "300%",
  "STOPLOSSPRICEINBASE": "60%",
  "SLIPPAGE": "49",

  "MAXTOKENS": "1",
  "MOONBAG": "0",
  
  "RUGDOC_CHECK": "true",
  "BUYAFTER_XXX_SECONDS": "0",  
  "WAIT_FOR_OPEN_TRADE": "true_after_buy_tx_failed",
  "MAX_SUCCESS_TRANSACTIONS_IN_A_ROW": "2",    
  "MAX_FAILED_TRANSACTIONS_IN_A_ROW": "2",    
  "MULTIPLEBUYS": "true",
  "BUYCOUNT": "3",
  
  "MINIMUM_LIQUIDITY_IN_DOLLARS": "10000",
  "WATCH_STABLES_PAIRS": "true",
   
  "LIQUIDITYINNATIVETOKEN": "True",
  "USECUSTOMBASEPAIR": "false",
  "BASESYMBOL": "(not used)",
  "BASEADDRESS": "(not used)",

  "SELLAMOUNTINTOKENS": "ALL",
  "HASFEES": "false",
  "GAS": "BOOST",
  "BOOSTPERCENT": "50", 
  "GASLIMIT": "1000000", 
  "GASPRIORITY_FOR_ETH_ONLY": "1.5"
  
  }
]

it will :

  • buy instantly 0.5 BNB of NEWINU if the price is < 0.001 BNB / token

  • chek all BNB / BUSD / USDT / USDC liquidity pairs (thanks to WATCH_STABLES_PAIRS = true)

  • before buy, check if liquidity > 10000$

  • try to make one BUY when liquidity is added, and if it fails enter in "WAIT FOR OPEN TRADE" mode

  • sell all the tokens you bought if price reach your BUYPRICE*3 (= 300%)

  • sell all the tokens if Stop Loss is reached : if price reach your BUYPRICE*0.6 (= 60%)

  • 49% slippage

  • Gas 50% higher than Fast Gas price

  • stop making transactions :

    • after 2 failed attempts

    • after 2 success attempts

    • or if you hold more than 100 tokens in your wallet

  • use RugDoc's API to check token before buy

  • will make orders with 3 different wallets at the same time (MULTIPLEBUYS option)

BSC - Buy/sell TECH with USDC LP on MATIC

Here is an example of token where the liquidity has been added in USDC : https://polygon.poocoin.app/tokens/0x6286a9e6f7e745a6d884561d88f94542d6715698

In this case, you should: - use LIQUIDITYINNATIVETOKEN = false - use USDC custom base pair

Here's how it's done:

Source Code

Quickswap exchange is used for MATIC sniping.

// [
    {
    "WALLETPRIVATEKEY": "aes:zmp4ii0jdlMOueosehfiuosehfisurhfesofjrpgkdrogkd^rgd^rgsh=*1LgzSU06YPv92nuSGKqMrA==",
    "TWALLETADDRESS": "0x265Cb06dc562C97Acc8e51EBE3AA0275BF0c4D3D",
    "WALLETADDRESS": "0x265Cb06dc562C97Acc8e51EBE3AA0275BF0c4D3D",
    "PRIVATEKEY": "aes:zmp4ii0jdlMOueosehfiuosehfisurhfesofjrpgkdrogkd^rgd^rgsh=*1LgzSU06YPv92nuSGKqMrA==",
    "WALLETADDRESS2": "0x0975AbFE55656DGDRGFG4SDXC49f0855",
    "PRIVATEKEY2": "aes:3hfthfthLh2WJfsefsgdhdththftMOFaYE50nu1W/GOkfFSvHW3PCsYubayAA==*e4U1hehtfhfthtfhtfhfthft7CPV2Fy5fX6IAhtfhtfhtfhftUj2dNaZV8MVA==",
    "WALLETADDRESS3": "null",
    "PRIVATEKEY3": "null",
    "WALLETADDRESS4": "null",
    "PRIVATEKEY4": "null",
    "WALLETADDRESS5": "null",
    "PRIVATEKEY5": "null",
    "USECUSTOMNODE": "false",
    "CUSTOMNODE": "put the address of your own node here if you want and make USECUSTOMNODE = TRUE",
    "EXCHANGE": "quickswap"
		"EXCHANGEVERSION": "2"  
		"PREAPPROVE": "true",
		"UNLIMITEDSLIPPAGE": "false" 
    "ENCRYPTPRIVATEKEYS": "true"
    "PASSWORD_ON_CHANGE": "false"
    }
]
// [
  {
  "ENABLED" : "True",
  "SELECT_MODE": "limitswap" 
  "SYMBOL": "TECH",
  "ADDRESS": "0x6286a9e6f7e745a6d884561d88f94542d6715698",

  "KIND_OF_SWAP": "tokens",
  "BUYAMOUNTINBASE": "(not used)",
  "BUYAMOUNTINTOKEN": "1000",
  "MAX_BASE_AMOUNT_PER_EXACT_TOKENS_TRANSACTION": "0.5",
  
  "BUYPRICEINBASE": "0.07",
  "SELLPRICEINBASE": "0.13",
  "STOPLOSSPRICEINBASE": "0",
  "SLIPPAGE": "5",
        
  "MAXTOKENS": "1",
  "MOONBAG": "0",

  "RUGDOC_CHECK": "true",
  "BUYAFTER_XXX_SECONDS": "0",
  "WAIT_FOR_OPEN_TRADE": "false",
  "MAX_SUCCESS_TRANSACTIONS_IN_A_ROW": "2",    
  "MAX_FAILED_TRANSACTIONS_IN_A_ROW": "2",    
  "MULTIPLEBUYS": "false",
  "BUYCOUNT": "(not used)",

  "MINIMUM_LIQUIDITY_IN_DOLLARS": "50000",
  "WATCH_STABLES_PAIRS": "false",

  "LIQUIDITYINNATIVETOKEN": "false",
  "USECUSTOMBASEPAIR": "true",
  "BASESYMBOL": "USDC",
  "BASEADDRESS": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",

  "SELLAMOUNTINTOKENS": "ALL", 
  "HASFEES": "false",
  "GAS": "BOOST",
  "BOOSTPERCENT": "20",
  "GASLIMIT": "1000000",
  "GASPRIORITY_FOR_ETH_ONLY": "1.5"

  }
]

Buy exact amount of tokens KPAD with BNB LP

Source Code

(check previous examples)
[
  {
  "ENABLED" : "True",
  "SELECT_MODE": "limitswap" 
  "SYMBOL": "KPAD",
  "ADDRESS": "0xcfefa64b0ddd611b125157c41cd3827f2e8e8615",

  "KIND_OF_SWAP": "tokens",
  "BUYAMOUNTINBASE": "1",
  "BUYAMOUNTINTOKEN": "50000",
  "MAX_BASE_AMOUNT_PER_EXACT_TOKENS_TRANSACTION": "0.5",
  
  "BUYPRICEINBASE": "0.006",
  "SELLPRICEINBASE": "0.018",
  "STOPLOSSPRICEINBASE": "0",
  "SLIPPAGE": "49",
  
  "MAXTOKENS": "1",
  "MOONBAG": "0",   
   
  "RUGDOC_CHECK": "true",
  "BUYAFTER_XXX_SECONDS": "0",    
  "MAX_SUCCESS_TRANSACTIONS_IN_A_ROW": "2",    
  "MAX_FAILED_TRANSACTIONS_IN_A_ROW": "1",  
  "MULTIPLEBUYS": "false",
  "BUYCOUNT": "(not used)",

  "MINIMUM_LIQUIDITY_IN_DOLLARS": "10000",
  "WATCH_STABLES_PAIRS": "false",

  "LIQUIDITYINNATIVETOKEN": "true",
  "USECUSTOMBASEPAIR": "false",
  "BASESYMBOL": "(not used)",
  "BASEADDRESS": "(not used)",
  
  "SELLAMOUNTINTOKENS": "ALL",
  "HASFEES": "false",
  "GAS": "BOOST",
  "BOOSTPERCENT": "20",
  "GASLIMIT": "1000000",
  "GASPRIORITY_FOR_ETH_ONLY": "1.5"

  }
]

This will create a "ping-pong" bot, who always :

  • buy 50000 tokens

  • check if this amount of tokens does not need more than 0.5 BNB to make the buy order (thanks to MAX_BASE_AMOUNT_PER_EXACT_TOKENS_TRANSACTION parameter)

  • sell all the tokens at the prices you set

ETH - Sell an airdrop with ETH (no buy)

Imagine you will receive an airdop token, and you want the bot to sell it as soon as you get it, with minimal price = 0.15 BNB/token

In this example, we don't want the bot to buy, so we put "BUYPRICEINBASE" = 0 , so as the bot to never buy.

If you wanted the opposite (the bot to never sell), simply put SELLPRICEINBASE = 999999 for instance.

Source Code

"EXCHANGE": "Uniswap"

(+ all the rest, of course)
[
  {
  "ENABLED" : "True",
  "SELECT_MODE": "limitswap" 
  "SYMBOL": "AIRDROP",
  "ADDRESS": "0x7Fc66600c84A76Ad7e9c93437bFc5Ac33E2DDaE9",

  "KIND_OF_SWAP": "base", 
  "BUYAMOUNTINBASE": "0.1",
  "BUYPRICEINBASE": "0",
  "SELLPRICEINBASE": "0.45",
  "STOPLOSSPRICEINBASE": "0",

  "SLIPPAGE": "5",
  
  "MAXTOKENS": "1",
  "MOONBAG": "0",
  
  "RUGDOC_CHECK": "false",
  "BUYAFTER_XXX_SECONDS": "0",    
  "MAX_SUCCESS_TRANSACTIONS_IN_A_ROW": "2",    
  "MAX_FAILED_TRANSACTIONS_IN_A_ROW": "1",  
  "MULTIPLEBUYS": "false",
  "BUYCOUNT": "1",
    
  "MINIMUM_LIQUIDITY_IN_DOLLARS": "10000",
  "WATCH_STABLES_PAIRS": "true",
  
  "LIQUIDITYINNATIVETOKEN": "true",  
  "USECUSTOMBASEPAIR": "false",
  "BASESYMBOL": "BUSD",
  "BASEADDRESS": "0xe9e7cea3dedca5984780bafc599bd69add087d56",

  "SELLAMOUNTINTOKENS": "ALL",
 
  "HASFEES": "false",
  "GAS": "BOOST",
  "BOOSTPERCENT": "20",
  "GASLIMIT": "300000",
  "GASPRIORITY_FOR_ETH_ONLY": "1.5"
  }
]

To know the price of the token, go to the Exchange. Our price are price PER TOKEN. In this example, SELLPRICEINBASE = 0.159327

Use the bot with several tokens

If you want the bot to work with several tokens at the same time, simply put 2 tokens paragraphs, separated with a ","

[
  {
  (first token)
  },
   {
  (second token)
  }

Last updated