{"id":16321220,"url":"https://github.com/beeb/pancaketrade","last_synced_at":"2025-10-25T19:31:18.133Z","repository":{"id":40374372,"uuid":"365925917","full_name":"beeb/pancaketrade","owner":"beeb","description":"Limit orders for PancakeSwap","archived":false,"fork":false,"pushed_at":"2023-04-25T10:54:35.000Z","size":730,"stargazers_count":203,"open_issues_count":16,"forks_count":101,"subscribers_count":15,"default_branch":"master","last_synced_at":"2023-11-07T19:50:53.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-05-10T05:17:52.000Z","updated_at":"2023-11-02T17:13:33.000Z","dependencies_parsed_at":"2022-07-12T14:03:03.528Z","dependency_job_id":null,"html_url":"https://github.com/beeb/pancaketrade","commit_stats":null,"previous_names":[],"tags_count":30,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeb%2Fpancaketrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeb%2Fpancaketrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeb%2Fpancaketrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beeb%2Fpancaketrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beeb","download_url":"https://codeload.github.com/beeb/pancaketrade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219865158,"owners_count":16555931,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T22:47:02.762Z","updated_at":"2025-10-25T19:31:17.785Z","avatar_url":"https://github.com/beeb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PancakeTrade - Limit orders and more for PancakeSwap on Binance Smart Chain\n\n[![Docker Image CI](https://github.com/beeb/pancaketrade/actions/workflows/docker.yml/badge.svg?branch=develop)](https://github.com/beeb/pancaketrade/actions/workflows/docker.yml) [![Linting](https://github.com/beeb/pancaketrade/actions/workflows/lint.yml/badge.svg?branch=develop)](https://github.com/beeb/pancaketrade/actions/workflows/lint.yml)\n\nPancakeTrade helps you create limit orders and more for your BEP-20 tokens that swap against BNB, BUSD and USDT on\nPancakeSwap. The bot is controlled by Telegram so you can interact from anywhere.\n\n![screenshot](screenshot.jpg)\n\n## DISCLAIMER\n\nThis software is for educational purposes only. Do not risk money which you are afraid to lose. USE THE SOFTWARE AT\nYOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS.\n\nWe strongly recommend you to have coding and Python knowledge. Do not hesitate to read the source code and understand\nthe mechanism of this bot.\n\n## Features\n\nThe bot provides a lot of convenience trading features including:\n\n- Tokens balance and price shown in status messages\n- Price tracking relative to buy transaction\n- Ability to make buy and sell limit orders including trailing stop loss\n- Automatic smart price selection in case liquidity is available in BNB, BUSD and USDT (list could be extended in the\n  future)\n- Automatic approval for selling\n- Assign emoji to each token to differentiate them easily\n- Default slippage set on a token basis for faster order creation\n- Charts links for each token\n\n## Requirements\n\nIn order to use this bot, you will need the following:\n\n- A server or computer that can run the script continuously (linux or macOS, as well as WSL have been tested)\n- A Telegram bot token (interact with [@BotFather](https://telegram.me/BotFather))\n- Your Telegram chat ID/user ID (interact with [@userinfobot](https://telegram.me/userinfobot))\n\nIf you choose to use the Docker image, you'll just need docker installed, see the [section below](#use-docker).\n\nIf you choose to run the script with Python, you'll need the following:\n\n- Python version between 3.7.2 and 3.9.x\n- [Poetry](https://github.com/python-poetry/poetry)\n- Optional: `git` to clone this repository, you can also download the source from the github website.\n\n## Quick Start\n\nBefore you start, make sure you have your Telegram Bot token + user ID available.\nInitiate the chat with your bot on Telegram (click the \"Start\" button) to initialize the chat ID before you start the\nbot the first time.\n\nRun the following commands\n\n```bash\ngit clone https://github.com/beeb/pancaketrade.git\ncd pancaketrade\npoetry install --no-dev\ncp user_data/config.example.yml user_data/config.yml\n```\n\nNext, open the `config.yml` file inside the `user_data` folder with a text editor and populate the `secrets` section.\n\nThe bot needs your wallet's private key in order to sign and execute orders on your behalf. You have multiple options\nto do so:\n\n- You can run the `poetry run trade` command as-is and enter your private key in the prompt that will be shown each time\n  the bot is started (only stored in memory)\n- You can provide an environment variable named `WALLET_PK`. For this multiple options:\n  - You can create a `.env` file in the root of the project (same folder as `pyproject.toml`) and enter your private key\n    in that file (which is excluded from git): `WALLET_PK=123abcd...`\n  - You can prepend the command with the environment variable (not recommended as this will be stored in your shell\n    history): `WALLET_PK=123abcd... poetry run trade`\n  - You can use a service to run the bot, see the [relevant section below](#run-as-a-service)\n\nThe private key is **not** the same as the seed words/mnemonic. You need the 64-characters hexadecimal private key.\n\nYour wallet address will be inferred from the private key and doesn't need to be provided.\n\nRun the bot:\n\n```bash\npoetry run trade\n```\n\nYou will receive a notification in the Telegram chat after entering your private key. You can then start by adding your\ntokens with the `/addtoken` chat command.\n\nThe other most useful command is the `/status` command that will display all your tokens and the existing orders.\n\n## Configuration file\n\nThe script looks for a file named `config.yml` located inside the `user_data`folder by default.\nYou can pass another file path to the `trade` command as a positional argument.\n\nThe only parameter that is not self-explanatory is `min_pool_size_bnb`. Some tokens have multiple liquidity pools with\ndifferent pairs, like BNB and BUSD.\nHowever, sometimes the LP with a given base token has very little liquidity, which means that the price is very volatile\nand price impact is large.\nIn order to avoid swapping on the pair that has little liquidity, the bot checks that at least `min_pool_size_bnb`\nis staked in the LP. If that's not the case, the bot will use another LP when possible.\n\nThe `update_messages` parameter will update the status messages every 30 seconds if set to `true`.\nIf you have trouble with the inline buttons not working, this means this bot token is not able to update messages anymore.\nIt's unclear what the reason is, but it happened a few times to the developer and testers of this bot.\nThe solution is to create a new bot token and try again, or disable `update_messages` (not ideal).\n\n```yaml\n---\nbsc_rpc: 'https://bsc-dataseed.binance.org:443' # you can use any BSC RPC url you want\nmin_pool_size_bnb: 25 # PancakeSwap LPs that have less than 25 BNB will not be considered\nmax_price_impact: 0.05 # if price impact is above 5%, order will not execute\nmonitor_interval: 5 # the script will check the token prices with this interval in seconds\nupdate_messages: true # status messages will update periodically to show current values\nprice_in_usd: true # input, show and track prices in USD/token instead of BNB/token\ncharts: # these are all the chart links that can be included in status messages. Remove the ones you don't need\n  - poocoin\n  - bogged\n  - dexguru\n  - dextools\n  - dexscreener\nsecrets:\n  telegram_token: 'enter_your:bot_token' # enter your Telegram Bot token\n  admin_chat_id: 123456 # enter your chat ID/user ID to prevent other users to use the bot\n```\n\n## Updating the bot\n\nWhen a new version is released, if you cloned the repository with git, you can simply perform a `git pull` on the master\nbranch. After that, run the `poetry install --no-dev` command again to update dependencies.\n\n## Use docker\n\nThis bot now gets published as docker images on [Docker Hub](https://hub.docker.com/repository/docker/vbersier/pancaketrade).\n\nBefore you start, make sure you have your Telegram Bot token + user ID available.\nInitiate the chat with your bot on Telegram (click the \"Start\" button) to initialize the chat ID before you start the\nbot the first time.\n\nSteps to use docker:\n\n1. Copy the example `docker-compose.example.yml` file in this repository, rename it to `docker-compose.yml`\n2. Create a file named `.env` next to your docker-compose file and insert your private key: `WALLET_PK=123abc...`\n3. Create a `user_data` folder if it doesn't already exist, and create your `config.yml` file inside\n   (see [previous section](#configuration-file)).\n4. Run the service with `docker-compose up -d`.\n\nNote: the bot will create a file for the database named `pancaketrade.db` inside the `user_data` folder on your local machine.\nDo not delete or move that file because it holds all your token configurations and orders data. This is the file to back\nup if you want to move the bot elsewhere, etc.\n\n## Run as a service\n\nOn systems that support `systemd`, you can use the included `pancaketrade.service` file to run this script as a service.\n\n```bash\ncp pancaketrade.service ~/.config/systemd/user/\n# edit the new file in .config/systemd/user with your wallet private key\nsystemctl --user start pancaketrade.service\nsystemctl --user enable pancaketrade.service # run at launch\n```\n\n## Donations\n\nIf you feel like this project has helped you and you wish to donate to the developer, you can do so on the Ethereum or\nBinance Smart Chain networks at the address:\n\n`0x026E539B566DcFF02af980d938deCcb11255d519`\n\nThanks for your contribution!\n\n## Contribute\n\nIn order to contribute, make sure you install dev dependencies with `poetry install`. This repo is setup to use\npre-commit hooks, please install them with `pre-commit install` before committing.\n\nTo add your contribution, fork the repo, create a new branch off of `develop` and work in there, then create a pull\nrequest against the `develop` branch of this repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeb%2Fpancaketrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeeb%2Fpancaketrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeeb%2Fpancaketrade/lists"}