GithubHelp home page GithubHelp logo

nafidinara / bot-pancakeswap Goto Github PK

View Code? Open in Web Editor NEW
719.0 33.0 382.0 602 KB

Sniping bot for pancakeSwap. Auto buy, custom slippage and GWEI

JavaScript 85.90% Shell 14.10%
bot trading crypto exchange

bot-pancakeswap's Introduction

Table of contents

NOW THE BOT IS POSSIBLE FOR KUCOIN AND MATIC NETWORK

NEW UPDATES

  1. In this new update you can use BNB instead WBNB. it will make you easier to snipe :)
  2. Join free discord channel for more information : https://discord.gg/dtWDN5JWB5

NOW LAUNCH ADVANCED BOT

With more feature and benefit

Demo for sonic advanced bot :

  1. drive : https://bit.ly/3vkSum0
  2. SONIC DEGEN SCANNER : https://t.me/degenScanner
  3. website : http://sonicsniperbot.com/

What's will you get

Please only contact to Discord : algarox#0785 or [email protected] with subject PancakeSwap Bot Info for more info. For error or problem questions please open issues in GitHub, don't email me. Maybe I'll slow response on weekend. Thanks!

HOW TO RUN

  1. clone this repository
  2. $ npm install
  3. copy your .env.example to .env
  4. set up your .env to with this explanation :
BNB_CONTRACT=0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
~ BNB contract for buy the token

FACTORY=0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73
~ Pancake Factory contract to get function of buy

ROUTER=0x10ED43C718714eb63d5aA57B78B54704E256024E
~ Pancake Factory contract to process function of buy

YOUR_ADDRESS=
~ Your BSC (BEP20) address from trustwallet or another wallet.

SLIPPAGE=1
~ Customize your slippage here, cannot decimal. (eg : 1, 5, 10). if you buy early token recommended 30+ Slippage

GWEI=5
~ Customize your GWEI (gas fee) here, cannot decimal. (eg : 5, 10, 25). if you buy early token recommended 15+ GWEI

GAS_LIMIT=345684
~ Minimul limit is 210000, more much more better.

MIN_LIQUIDITY_ADDED=3
~ Set how much minimum liquidity added in pair address that you want to buy. set in BNB. (eg : 2, 4, 7).
  2 mean 2 BNB liquidity added.

YOUR_MNEMONIC=
~ Input your private Key here, that you get from your wallet privacy.

AMOUNT_OF_BNB=0.002
~ Amount how much you want buy the token in BNB.

TO_PURCHASE=0xe9e7cea3dedca5984780bafc599bd69add087d56
~ Token address that you want to buy.

USE_WSS=true
~ Fill true if you want use from WSS_NODE, fill false if you want use from RPC_NODE

WSS_NODE=wss://bsc-ws-node.nariox.org:443
~ more faster, but sometimes unstable

RPC_NODE=https://bsc-dataseed1.defibit.io/
~ stable connection, but little bit slowly


  1. run with npm run snipe .

  2. Wait the bot do his job, if success, you will see like this picture.

  3. Close bot with ctrl + C.

WARNING

All this bot feature are free, I'm never sell this bot, and I'm never share my TG account. Please be careful and DWYOR!. Only this bot is free, not advanced bot.

TROUBLESHOOT

  • there are some reason if your tx failed :
  • you haven't approve your BNB
  • your gas price are to small
  • your GWEI are to small (use 15+ for early token)
  • your slippage are to small (use 30+ for early token)
  • Error with node :

Hi all, for now wss://bsc-ws-node.nariox.org:443 it won't be able to use again forever. for that you can use private node or build your own node. it more faster than public node. there is my recommend for private node :

  1. https://getblock.io/en/
  2. https://www.quicknode.com/
  3. https://www.ankr.com/

We also rent a full node with cheapest and also faster speed, you will get installation guide and maintenance for that just for $70/month, you can compare with private node that I recommend. The different full node with private node is, full node build in our own vps, so we can manage the speed and performance. for more info you can contact on discord : countdown#4008

bot-pancakeswap's People

Contributors

nafidinara avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bot-pancakeswap's Issues

I can't run the script

hello a great greeting, I have been communicating with you in email and following your advice I am here for you to help me solve these problems that you are throwing at me at the time of execution.

PS C:\bot-pancakeswap-master> npm run snipe

[email protected] snipe
node bot.js

C:\bot-pancakeswap-master\node_modules@ethersproject\bytes\lib\index.js:9
return !!(value.toHexString);
^

TypeError: Cannot read property 'toHexString' of undefined
at isHexable (C:\bot-pancakeswap-master\node_modules@ethersproject\bytes\lib\index.js:9:21)
at Object.hexlify (C:\bot-pancakeswap-master\node_modules@ethersproject\bytes\lib\index.js:165:9)
at new SigningKey (C:\bot-pancakeswap-master\node_modules@ethersproject\signing-key\lib\index.js:20:65)
at new Wallet (C:\bot-pancakeswap-master\node_modules@ethersproject\wallet\lib\index.js:123:36)
at file:///C:/bot-pancakeswap-master/bot.js:39:16
at ModuleJob.run (node:internal/modules/esm/module_job:175:25)
at async Loader.import (node:internal/modules/esm/loader:178:24)
at async Object.loadESM (node:internal/process/esm_loader:68:5)
PS C:\bot-pancakeswap-master>

Private key & error when npm run snipe

1- Hi, may i know where can i get my trust wallet private key? I'm using android trust wallet app. Is it the 12 security phase?
2- Encounter this error when execute npm run snipe. How to resolve this?

image

It never works the first time

Hey there,

I have to launch the bot several times for it to be able to effectively snipe

Always have a "Call Exception" error on the bot and "INSUFFICIENT_OUTPUT_AMOUNT" on bscscan

Any idea ?

Error when sniping new tokens

I keep getting the error below when sniping new tokens, I do not get it on tokens that are already out, only when they are newly released.. I removed sensative data, those are just addresses.
image

SyntaxError: Unexpected identifier

(function (exports, require, module, __filename, __dirname) { import ethers from 'ethers';
^^^^^^

SyntaxError: Unexpected identifier
at new Script (vm.js:79:7)
at createScript (vm.js:251:10)
at Object.runInThisContext (vm.js:303:10)
at Module._compile (internal/modules/cjs/loader.js:657:28)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:742:12)
at startup (internal/bootstrap/node.js:283:19)

Mempool snipe ?

Working well. But does this bot work as mempool sniper for new listing token ?

Busd

Hi, is it possible to buy the token using busd or bnb instead of wbnb? If it is, what changes need to be made? Thank you

Please help : i am getting this below error and don know where to provide sniping token address and how much to be bought...

WBNB_CONTRACT=0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c
~ WBNB contract for buy the token

FACTORY=0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73
~ Pancake Factory contract to get function of buy

ROUTER=0x10ED43C718714eb63d5aA57B78B54704E256024E
~ Pancake Factory contract to process function of buy

YOUR_ADDRESS=
~ Your BSC (BEP20) address from trustwallet or another wallet.

SLIPPAGE=1
~ Customize your slippage here, cannot decimal. (eg : 1, 5, 10). if you buy early token recommended 30+ Slippage

GWEI=5
~ Customize your GWEI (gas fee) here, cannot decimal. (eg : 5, 10, 25). if you buy early token recommended 15+ GWEI

GAS_LIMIT=345684
~ Minimul limit is 210000, more much more better.

MIN_LIQUIDITY_ADDED=3
~ Set how much minimum liquidity added in pair address that you want to buy. set in BNB. (eg : 2, 4, 7).
2 mean 2 BNB liquidity added.

YOUR_MNEMONIC=
~ Input your private Key here, that you get from your wallet privacy.

How to kill all nodes and restart node?

Hi, I get this error after forgetting to close the terminal and switching off my lappy.

`events.js:353
throw er; // Unhandled 'error' event
^

Error: listen EADDRINUSE: address already in use :::5000
at Server.setupListenHandle [as _listen2] (net.js:1318:16)
at listenInCluster (net.js:1366:12)
at Server.listen (net.js:1452:7)
at Function.listen (C:\Users\pirja\Desktop\PSRepo\bot-pancakeswap\node_modules\express\lib\application.js:618:24)
at file:///C:/Users/pirja/Desktop/PSRepo/bot-pancakeswap/bot.js:149:5
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:177:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
Emitted 'error' event on Server instance at:
at emitErrorNT (net.js:1345:8)
at processTicksAndRejections (internal/process/task_queues.js:82:21) {
code: 'EADDRINUSE',
errno: -4091,
syscall: 'listen',
address: '::',
port: 5000
}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] snipe: node bot.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] snipe script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pirja\AppData\Roaming\npm-cache_logs\2021-06-09T13_01_10_330Z-debug.log
`

I think i need to restart the node server or kill all the process on port 5000, maybe I a wrong. But I dunno how do kill all the process. Please assist on this.

Thanks

I keep getting this error

Error: invalid hexlify value (argument="value", value="my mnemonic", code=INVALID_ARGUMENT, version=bytes/5.1.0)
at Logger.makeError (C:\Users\comp\Downloads\update-bot\node_modules@ethersproject\logger\lib\index.js:180:21)
at Logger.throwError (C:\Users\com\Downloads\update-bot\node_modules@ethersproject\logger\lib\index.js:189:20)
at Logger.throwArgumentError (C:\Users\comp\Downloads\update-bot\node_modules@ethersproject\logger\lib\index.js:192:21)
at Object.hexlify (C:\Users\comp\Downloads\update-bot\node_modules@ethersproject\bytes\lib\index.js:190:19)
at new SigningKey (C:\Users\comp\Downloads\update-bot\node_modules@ethersproject\signing-key\lib\index.js:20:65)
at new Wallet (C:\Users\comp\Downloads\update-bot\node_modules@ethersproject\wallet\lib\index.js:123:36)
at file:///C:/Users/comp/Downloads/update-bot/bot.js:38:16
at ModuleJob.run (internal/modules/esm/module_job.js:152:23)
at async Loader.import (internal/modules/esm/loader.js:177:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5) {
reason: 'invalid hexlify value',
code: 'INVALID_ARGUMENT',
argument: 'value',
value: 'my mnemonic'
}

Doesn't work. Did numerous tests

I was testing by buying BUSD and tries after tries, still stuck with Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'

-Tried changing slippage, gwei, gas price; all to no avail.
Latest tx: https://bscscan.com/tx/0x6bfb865a28808fba3982a75c723ce35da9da0883587ca1655f98f9cbb4a57a7e

-While trying buying new launches, I'd face listening liq error pairAddress: 0x0000000000000000000000000000000000000000 pairAddress 0x0000000000000000000000000000000000000000 not detected. Auto restart
Numerous tries on new launches too. Was hoping to write a good article about this bot but this is still beta I suppose.

Lmk dev, if there's a quick fix for it.

Did you test the code

I see a couple of errors people are running into. Just wondering if you tested the code before.

NB: The links to the important notes are broken. Return a 404

Bot error npm run snipe

bot error
Hello, sorry to constantly ask questions, but I also encountered a problem that has been constantly posted already. I can't seem to run the snipe bot, I've approved the wbnb, entered a private key, and renamed the env.example. file. Is there any other problems that I might of missed to lead to this problem? Thanks.

Slippage Tolerance

hello sir, how do I set unlimited slippage as the router can do? when trying snipping I always fail due to his slippage toleranceScreenshot_2021-06-03-09-44-06-37.jpg

Better error handling

i would love to see some better error handling for when a transaction/snipe fails. like, why did the transaction fail and What you wanna do next, try gain or quit

TRANJACTION FAILD

There is some issue with the buy function
image
Can you tell me why this issue happen?

issue

sry im a JS noob . what does "copy your .env.example to .env" mean? Should i creat a new .env?

Error with PancakeSwap Router

Contract 0x10ed43c718714eb63d5aa57b78b54704e256024e (PancakeSwap: Router v2)
Warning! Error encountered during contract execution [execution reverted]

Getting an error when

I keep getting this error when sniping. Any idea why this might be?
I have the following set:
SLIPPAGE=49
GWEI=30
GAS_LIMIT=3456840
Uploading Screen Shot 2021-06-08 at 4.44.40 AM.png…

PairAddress Not Detected

Hello,

How do I get around the message below.

This is the new coin I was testing with to buy: 0xB46C8c205B3548be511C8616d917BD85F716a28c

pairAddress: 0x0000000000000000000000000000000000000000
pairAddress 0x0000000000000000000000000000000000000000 not detected. Auto restart

Approve token?

In readme it says that there is an automatic approval of bought token.

Where exactly that happens in code?

in buyAction

You are no using amountOutMin as calculated with slippage, you just set it with 0. You can easly be frontrunned !

Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'

Hi there.

getting "Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'" error while sending transactions along with message " Warning! Error encountered during contract execution [execution reverted] ".

Please advise

Error When testing

Am getting this error when testing.

Error: insufficient funds for intrinsic transaction cost (error={"code":-32000,"response":"{"jsonrpc":"2.0","id":7,"error":{"code":-32000,"message":"insufficient funds for gas * price + value"}}\n"},

Not sure why it's complaining about insufficient funds. Am using Trust Wallet with BSC - 0.08, WBNB - 0.005. Trying to buy 0.001 worth of 0xd545bb53749c8b13d4e936587239fcb69dd8ed4c

WBNB contract: 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c

GWEI set to 5 and GAS_LIMIT to 210000

Questions

Hello Alfara Nafi Dinara,

First of all I would like to thank you for making Bot PancakeSwap available for free. I confess that I had some difficulties with installing helpers such as nodejs, as well as updating it so that it could run with excellence or bot, but I managed and everything worked.

Well, I managed to execute an order very quickly when I ran the bot. However, I suggested some doubts that I inevitably need to resolve with you brilliant creator of the bot.

The questions are:

  1. Is there the possibility of placing only the BNB as a bargaining chip and removing the WBNB? Because, with WBNB, manual approval is required and this decreases the bot's agility, as it does not do this automatic approval and without approval the transaction is unsuccessful.

  2. I realized that when executing the bot with the buy order, automatically the next phase is to wait for a reasonable price for a profitable sale. Wanted to know how I set the profit percentage or even how do I know what percentage is preset in the bot?

Wont buy, after liquidity is added.

it keeps saying:
pairAddress: 0xfDD63AFB71138F5fD7cabCdFdf9f4d9FB65D3C11
value BNB : 4854.3232
run again...

token adres is: 0xe5D46cC0Fd592804B36F9dc6D2ed7D4D149EBd6F

Why we don't approve the WBNB in the code only?

const tx = await router.swapExactTokensForTokensSupportingFeeOnTransferTokens( //uncomment this if you want to buy deflationary token 
 // const tx = await router.swapExactTokensForTokens( //uncomment here if you want to buy token

before executing this code we may approve the WBNB for swapping?

Like

WBNBContract.approve(process.env.ROUTER, amount_of_wbnb) // like this

This way we may don't need to approve the WBNB on pancake UI

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.