Coder Social home page Coder Social logo

zainachak / defi_pancakeswapbot Goto Github PK

View Code? Open in Web Editor NEW
260.0 11.0 172.0 508 KB

Defi PancakeSwap bot is programmed in Python to buy and sell tokens in seconds once the target is hit.

License: MIT License

Python 100.00%
bot python pancakeswap-bot pancakeswap decentralized-exchange cryptocurrencies

defi_pancakeswapbot's Introduction

LinkedIn


Logo

Defi PancakeSwap BOT

If you enjoyed the bot don't forget to give a STAR

⭐️⭐️⭐️

A BOT that will make easy your life in Trading.
Watch tutorial on Youtube

Table of Contents
  1. About The Project
  2. Getting Started
  3. Contributing
  4. Contact

About The Project

Decentralized market is too volatile to trade, So I have come up with this BOT so you can get more profit by selling and buying tokens at better prices, also the trade will be executed in seconds.

Defi PancakeSwap BOT is programmed in Python to buy and sell tokens once the target is hit, or can also be automated.

Let me know if you get unexpected errors so that I can update the code because it has a lot of scenarios to cover.

Built With

Getting Started

Follow the commands

Prerequisites

  • Go to path folder

  • Create a python virtual environment

    python -m venv defi-env
    pip install -r requirements.txt

Up and Running

  1. Go to Folder Path
  2. Type in Command Line
    python DeFiTranscation.py
  3. Enter Token address for a Trade
  4. Enter what type of Target to Hit Up, Down or UpDown
  5. Enter your Target Price
  6. Wait for target to Hit
  7. You'll get an alert system.beep
  8. Option to how much coin you want to sell ( Or you simply can Automate it, by changing bit code as explained in the Youtube Tutorial

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Branch
  3. Commit your Changes
  4. Push to the Branch
  5. Open a Pull Request

Contact

For queries comment at https://www.youtube.com/watch?v=cSel-wyrTFI

defi_pancakeswapbot's People

Contributors

taimurshahzad12 avatar zainachak 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

defi_pancakeswapbot's Issues

Feature request - Automation

This is a solid project. I would like to see an extension that I think would add value to the bot.

Scenario 1 (Fixed limits)

  • The ability to set a static range with low and high inputs.
  • This would allow the user to enter a low of 0.1 for example, so the script would buy at $0.10.
  • The user could also set a high of 0.9 and the script would sell at $0.90
  • Considerations would be to add logic so that the script knows whether the last action was a buy or sell, so it will ignore a buy signal if the last was a buy

Scenario 2 (Percentage based limits)

  • The ability to set a percentage based range
  • The user can set the script to buy when the current price is n% lower than the last sell price
  • The user can set the script to sell when the current price is n% higher than the last buy price

Addtional considerations

  • DCA in/out
  • Add percentage of account value

I will record a priv. screencast detailing the aforementioned scenario

How to run on MacOS

python3 DeFiTranscation.py
Traceback (most recent call last):
  File "/Users/meta/Desktop/DeFi_PanCakeSwapBot/DeFiTranscation.py", line 9, in <module>
    import winsound
ModuleNotFoundError: No module named 'winsound'

On Ubuntu 20.04

issue with bs4 getting price from arken finance

line 125, in runCode
price = float(page_soup.find_all("b", {"class": "number"})[0].text[1:].replace(",", ""))
IndexError: list index out of range

No matter what I do, I keep running into this error
I have fixed the clear command, I have tried using only Firefox drives instead of Chrome, I have tried different contact addresses, this error always comes out, I'm a noob to python and javascript

Win32gui requirements file error.

Hi,

I get this error when trying to run the 'pip install -r requirements.txt' line. I am a fairly large noob with python though.

ERROR: Could not find a version that satisfies the requirement win32gui==221.6 (from versions: 221.3, 221.4, 221.5)
ERROR: No matching distribution found for win32gui==221.6

I really need to find a bot that will allow me to sell a token. I'm also in a discord with lots of other people who need help too.
We got scammed hard by this stupid token: https://coinmarketcap.com/currencies/squid-game/
I've heard people have been able to sell using mempool bots. Would you be able to test it for me and see if you can sell any of this coin with your bot? I'll send some squid coin over and you can just keep it. I just need to find a way to sell some of mine.

busd

when busd pair?

ERROR START

Good afternoon, could you help me to solve this error when I turn on the bot

image

Value transfer did not complete from a contract execution reverted

When a Down target was hit and I performed a buying action, the terminal showed:

Last Trade result: Bought 0.023 BNB of HERO
Tx : https://bscscan.com/tx/0x0effeea37e83046f2332a476058a34c43c1f83b57e859dd105ed65f9ec46de08

Error message on Bscscan:
value transfer did not complete, most likely as a result of a revert opcode

Refresh bscscan page after a few seconds, error message changed to:
value transfer did not complete from a contract execution reverted

Run on linux?

Hello, I tried to run bot on linux and got:

Traceback (most recent call last):
File "DeFiTranscation.py", line 9, in
import winsound
ModuleNotFoundError: No module named 'winsound'

I found that winsound is windows only module. Is there any possible workaround?
Thank you

Unable to run Bot

So I was able to to start the bot, but after I enter the contract I got an error.

image

First of all I got an error with lxml.
So for that I just did pip install lxml and the error was corrected. But know this is the error that I got and I don´t know why cause I just checked all the code in that part and also I tried with the ETCH contract that you use in the video and got the same error that "list out of index"

Bot not Working!!!!

Hey, first of all thank you for your bot, it's an amazing bot. However, this bot can't seem to run on my system it's showing me some kind of error can you please take a look? Thank you.

image

Error message, cannot get it up and running??

Hi ZainAchak!

(posted it first in a closed thread, my bad)

Well I fixed several issues I was experiencing, however I cannot get past this error:

Traceback (most recent call last):
  File "C:\pancakeswapbot\abi.py", line 17, in tokenAbi
    with open(f"data/{filename}") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'data/ABI_0x679D5b2d94f454c950d683D159b87aa8eae37C9e.txt'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\pancakeswapbot\DeFiTranscation.py", line 291, in <module>
    runCode()
  File "C:\pancakeswapbot\DeFiTranscation.py", line 133, in runCode
    BNB_balance, TokenSymbol, NoOfTokens, params = InitializeTrade()
  File "C:\pancakeswapbot\DeFiTranscation.py", line 66, in InitializeTrade
    sellTokenAbi = tokenAbi(TokenToSellAddress, driver)
  File "C:\pancakeswapbot\abi.py", line 21, in tokenAbi
    abi = findAbi(address, driver)
  File "C:\pancakeswapbot\abi.py", line 41, in findAbi
    driver.get("chrome://settings/clearBrowserData");
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 333, in get
    self.execute(Command.GET, {'url': url})
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Malformed URL: URL constructor: chrome://settings/clearBrowserData is not a valid URL.

Also this line is weird: FileNotFoundError: [Errno 2] No such file or directory: 'data/ABI_0x679D5b2d94f454c950d683D159b87aa8eae37C9e.txt'

The file is in there! So no clue why he cannot find it. The script even created it!
Though it only has empty variables in it...

Any idea perhaps? Thanks.

I cannot start bot

I start the bot and I get this exception. I don't know how to fix it. Please, help me
image

list index out of range

issue with bs4 getting price from arken finance

line 125, in runCode
price = float(page_soup.find_all("b", {"class": "number"})[0].text[1:].replace(",", ""))
IndexError: list index out of range

Issue Sell

Hi great project!!!

I get this error when trying to sell : "Fail with error 'TransferHelper: TRANSFER_FROM_FAILED'"

Do you have an idea of ​​the isseu?

TRANSFER_FAILED

I am getting transfer_failed error , execution reverted when bot buy.

Sound alert

Can sound alert be turned off? If you run bot on rdp the most of them doesnt have audio driver installed, so bot is throwing error on price hit and it doesnt buy.

Runtime Error

I get this error when I try to run the program and enter a token's contract address. So far only ELONTECH token is working and none other tokens work.

File abi.py", line 38, in findAbi
f.write(abi[0].text)
IndexError: list index out of range

Question

Hi is there a way to set the slippage in % to get tokens from pankakeswap?

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.