Releases: beeb/pancaketrade
v0.7.2 - Hotfix for price impact calculation
v0.7.1 - Added price impact prediction and safeguard
This small update adds a feature that will warn if the price impact of a transaction is predicted to be high (configurable via max_price_impact
, default 5%).
If the price impact is above this value when the order executes, the transaction will be skipped and order removed, to prevent trading at a very unfavorable price.
Before upgrading, add the max_price_impact
entry in your config file (see README or example config file).
v0.7.0 - Prices in USD, order edition and more
This substantial release adds long-await features requested by users.
After pulling this update, please run poetry install --no-dev
to upgrade all dependencies!
- A new setting
price_in_usd
allows to display, input and track prices in USD/token instead of BNB/token- All existing order prices will be automatically updated when the bot is restarted after changing this parameter (using current BNB price)
- Orders are still buying using BNB, and selling for BNB. Customization of this behavior will come in a later update.
- Orders can now be edited with the
/editorder
command. Price, trailing stop loss callback, amount, gas and slippage can be edited for an existing order. - Codebase has been cleaned up and pre-commit hooks are now available to format code before allowing a commit. Install using
pre-commit install
after upgrading the dependencies if you wish to contribute to this repository.
v0.6.2 - Minor update
Make sure to run poetry install --no-dev
if you upgrade from a previous version.
This version changes the following:
- the behaviour when a high gas estimate is returned by the RPC: instead of proceeding with an acceptable gas limit which would likely be exceeded, leading to a failed transaction, the order is now cancelled when gas usage would reach above 2.5M gas units. Gas-expensive tokens should thus be traded manually on pancakeswap to allow for fine-tuning of the gas price.
- dependencies have been updated, which removes some warning messages about deprecated features
- added support for a
.env
file in the root directory (same folder as thepyproject.toml
file) to define the wallet private key, instead of using other means like prepending it to thepoetry
command or inserting it in the service file - added chart link for DexScreener
v0.6.1 - Add USDT pair support
This version builds up on the last release and adds support for USDT pairs on Binance Smart Chain.
Now, whenever a buy or sell order is triggered, the following swap paths are compared, and the one with the largest output is chosen:
- For buying:
- BNB -> Token (using BNB liq)
- BNB -> BUSD -> Token (using BUSD liq)
- BNB -> USDT-> Token (using USDT liq)
- For selling:
- Token -> BNB (using BNB liq)
- Token -> BUSD -> BNB (using BUSD liq)
- Token -> USDT -> BNB (using USDT liq)
v0.6.0 - Support added for BUSD liquidity, dropped support for PcS v1
This release adds support to trade against both BNB and BUSD liquidity (more tokens could be added easily if needed) via #25 .
The price displayed in status messages is taken from the largest LP, counted by number of tokens in the pool. It is believed that this represents the most stable price for this token and thus is the better one to use for visual representation.
At the moment when the script buys or sells, the price for each of the following swapping paths will be compared, and the best will be selected (which maximizes the output):
- For buying:
- BNB -> Token (using BNB liq)
- BNB -> BUSD -> Token (using BUSD liq)
- For selling:
- Token -> BNB (using BNB liq)
- Token -> BUSD -> BNB (using BUSD liq)
Please note that the script still uses your BNB to buy, and still gives you back BNB when selling. Only the swapping path (which liquidity is used) has changed. When using non-BNB liquidity, the script automatically does 2 swaps in one single transaction, exactly like the official PancakeSwap client does.
Support for PcS v1 has been dropped to keep complexity down.
v0.5.2 - BSCScan links, decimal slippage and dollar sell values
This update adds the following:
- Each token has now a BSCScan link that shows the token transaction history for your wallet
- Dollar value is shown in the confirmation message after a successful sell
- Decimal slippage is now supported, with up to 2 digits after the decimal point
v0.5.1 - Quality of life and performance improvements
This release tweaks a few mechanics that should improve performance when the network is congested:
- Increased default gas offset for "Buy/Sell" (+10.1 gwei) and "Sell all" (+20.1 gwei) commands.
- Increased default gas offset for approval (+0.1 gwei), previously was network default which could be very slow these days
- Added link to wallet's BSCScan page in the summary message
- Removed deprecated PancakeSwap function
swapExactETHForTokens
andswapExactTokensForETH
as they do not respect slippage when token has transaction taxes.
v0.5.0 - Manual approval, some fixes
This release adds the following new features:
- Added manual approval command
/approve
to be used at any time (to approve for selling on pancakeswap). It will use the best pancakeswap version for selling at the time of the command. A button to manually trigger approval also shows when a new unapproved token is added.
Improvements:
- The artificial waiting time after approval has been reduced from 10s to 3s. This delay is to ensure the transaction propagated and that a subsequent approval check will return
true
. - The nonce for a new transaction is checked just before the transaction is sent, minimizing the risk to use the wrong nonce if there was a transaction shortly before.
- The gas price gwei value in the new order confirmation message was shown in scientific notation, now it's floating point.
Bugfixes:
- Fixed "0e-35" BNB balance value in status messages when the balance is zero tokens.
v0.4.7 - WBNB and gas things
This version brings the following changes and improvements:
- The bot now supports listing WBNB holdings (special case due to absence of LP), but wrapping/unwrapping is not yet supported
- The
swapExactETHForTokens
method is now preferred over theswapExactETHForTokensSupportingFeeOnTransferTokens
if gas estimation works. - The gas limit failsafe has been raised to 2,000,000 gas units to accommodate new contracts with complex reflection schemes
- Logging when gas estimation failed is now more verbose and indicates the potential reason being insufficient slippage