binance-pump-bot
binance-pump-bot copied to clipboard
Selling 75% at once
How can I change so it would do 1 off purchase 75% of my BTC instead of multiple smaller ones?
Thanks :)
function handlePrice() { if (symbol) { if (!price) return
if (price) {
if (BUY_UPON_SYMBOL && !initialBought) {
initialBought = true
market_buy()
}
}
change market_buy() to market_buy(0.75) would work
Thanks. I've updated that one to 100% = 1. Also I deleted multiple functions on selling smaller quantities and replaced it with this one:
function market_buy(percent) {
if (percent === undefined || percent === null || isNaN(percent)) {
percent = 1
}
if (balance[TRADE_IN]) {
const available = balance[TRADE_IN].available
const fullQuantity = (available / price) * percent
binance.marketBuy(
symbol,
getCorrectQuantity(fullQuantity * 1),
(error, response) => {
if (error) {
console.error(error.body ? error.body : error)
console.log(chalk.red('BUY FAILED'))
return
}
console.info(
chalk.bgGreen(`Market Buy ${percent * 100 * 1}% SUCCESS`)
)
// Now you can limit sell with a stop loss, etc.
if (price) {
snapshot_buy_price = (' ' + price).slice(1)
}
setTimeout(getBalance, 1500)
}
)
}
}
^^ | | This doesn't work, however I added 0.75 to the original code and it does work, I just want it to make 1 transactions instead of 4.
@pasakahaka check the modified bot I made here: https://github.com/Frost-Binance-Pump-Bot/The-Bot
I already fixes the bugs, buy market with 100% and added some few touches. I also updated the description of the configs for less confusion