Giter Site home page Giter Site logo

lmusarella / pancakeswap-prediction-bot-2023 Goto Github PK

View Code? Open in Web Editor NEW
25.0 7.0 6.0 371 KB

I rewrote the code of the PancakeSwap Prediction Game BOT by bobalice7, removing the malicious code where for each transaction to the smart contract it sent transactions to this wallet 0xfB669b0e0656036D747d6C6F2666e530139d2899.

License: MIT License

JavaScript 100.00%
bot bsc-project cake pancakeswap-bot pancakeswap-prediction-bot pancakeswap-predictions pcs pancake pancakeswap-prediction-winner pancakeswap-sniper-bot

pancakeswap-prediction-bot-2023's Issues

The bot has stopped working

I've tried all the variants I knew: I deleted and reinstalled the bot, but it still does the same thing. I tried other strategy variations, and it still does the same, I changed the link from the BSC_RPC node, and there is no change.

⏰ Waiting for next round: 216217

⚔️ ROUND: 216217 | ⌚ 16:29 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.259 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

⚔️ ROUND: 216218 | ⌚ 16:34 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.35 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

♻️ Skip round: 216218
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216217] - if some rounds remain hanging, they will be eliminated after 2 rounds.

⚔️ ROUND: 216219 | ⌚ 16:39 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.175 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

♻️ Skip round: 216219
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216217] - if some rounds remain hanging, they will be eliminated after 2 rounds.

⚔️ ROUND: 216220 | ⌚ 16:44 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.111 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

⚔️ ROUND: 216221 | ⌚ 16:49 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.075 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

♻️ Skip round: 216221
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216220] - if some rounds remain hanging, they will be eliminated after 2 rounds.

⚔️ ROUND: 216222 | ⌚ 16:54 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.059 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

♻️ Skip round: 216222
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216220] - if some rounds remain hanging, they will be eliminated after 2 rounds.

⚔️ ROUND: 216223 | ⌚ 17:00 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 128.981 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

⚔️ ROUND: 216224 | ⌚ 17:05 | START 🎉


✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 128.874 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY

♻️ Skip round: 216224
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216223] - if some rounds remain hanging, they will be eliminated after 2 rounds.

Bot Hangs on Waiting for next Round

i am having the same issue that its only "waiting for next round" and nothing happens. i tried 3 nodes (quicknode, binance, nodereal) and nothing happens with all of them in the .env file. Can anyone help me? I use the latest node version.

The only thing i get is: (node:66755) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created) when starting but than nothing shows only waiting.

Stop Loss/Daily Goal

Discussed in #11

Originally posted by rootisareservedword March 26, 2023
When stop loss or daily goal is reached, what determines when the bot will resume trading? Is there a certain amount of time required to pass?

Also, I see the .json history files that get created with statistics, round info, etc which is really helpful. Would it be possible to at least have the statistics (profit, percentage, win, loss, etc.) results written to CSV? I am currently using json2csv npm package via CLI and it works well. Am new to javascript, so my smooth brain is still trying to figure out how to implement it programatically 😅

Bot doesn't resume trading unless history files are deleted. Can it be changed to resume trading starting 24 hours after the last trade was placed? Or, maybe not a full 24 hours, but at least reset at the start of the next day?

Thanks!

Transaction error

Any idea how to troubleshoot this error?

⛔ Transaction Error [⌚ 11:55][253744][-32000} ] => Error: transaction underpriced: tip needed 3000000000, tip permitted 1500000000

Transaction Error

Hi,

I am receiving the error below:

/bot-lib/common/print.module.js:170
    console.log("⛔ Transaction Error [", getConsoleTime(),"][", formatUnit(epoch),`][ ${exeption.code} ] =>`, errorMessage);
                                                                                                 ^

TypeError: Cannot read properties of undefined (reading 'code')
    at printTransactionError (/bot-lib/common/print.module.js:170:98)
    at betUp (/bot-lib/smart-contracts/pcs-prediction-smart-contract.module.js:81:5)
    at async betUpStrategy (/bot-lib/strategies/bet-strategy.module.js:26:49)
    at async executeBetUpCopyTradingStrategy (/bot-lib/strategies/copytrading-strategy.module.js:23:33)
    at async executeBetUpStrategy (/bot-lib/pcs-bot.module.js:88:10)
    at async FragmentRunningEvent.<anonymous> (/bot-script/pcs-bot.js:93:29)

I was running the bot with SIMULATION_MODE set to false when this error occurred.

Bot results are wrong

Experience the bot results are wrong. Round bet up and closed up but bot shows round lost.

Happened many times. Any fix?

Bot hangs at Waiting for next round

Just found your release and thought I would give it a whirl. I can launch it via yarn or npm, neither give me errors (oh, BTW, I did have to change the API constants from api.binance.com to data.binance.com as I was getting an error on that) but the bot runs and just sits eternally on "Waiting for next round: XXXXXX". It displays the correct upcoming round number, and will change if I close the script and re-launch it, but it never progresses past this point.

It is not writing anything to the logs, which I find interesting.
image

Installation warning

When install i get a warning about a module that do not support the latest node, is this fixed? Does it effect the bot?
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '>= 14.16 <15' },
npm WARN EBADENGINE current: { node: 'v20.11.1', npm: '10.2.4' }
npm WARN EBADENGINE }

Be great to know.

Martingale

Afbeelding van WhatsApp op 2023-06-17 om 17 30 32
It seems like something is going wrong with the Martingale calculation, this simulation runs with $5 bets, and a 2 increment bet amount.
which should end up with a $10 bet.
it seems like this bet amount is not reset in between, because somehow it arrives at a $80 bet, followed by a $160 bet.
this $160 bet results in a profit (won $170 - which isn't accurate because the payout of the round was 2.06)

image

Martingale #18

Having a bug with Martingale mode on strategy with 3 dollar bets will run fine for a bit then will start skipping rounds saying waiting on martingale mode not really sure what caused it. Was working good then started having this bug I’ve tryed redownloading the file and starting over with new wallet new private key new rpc endpoint same thing. Something changed since yesterday also how can I send you a tip for your great work on this?

Copy Trade error

Im trying to copy trade of another address which works fine in simulation but when simulation is off I keep getting these two errors

⛔ Transaction Error [⌚ 15:53][255207][UNPREDICTABLE_GAS_LIMIT} ] => execution reverted: Round not bettable
⛔ Transaction Error [⌚ 16:13][255211][UNPREDICTABLE_GAS_LIMIT} ] => execution reverted: Bet is too early/late

Is there a way around this? I am guessing because it is a bot I'm copying from? No way to copy them?

You can resolve this situation when the bot gets stuck in this way.

When the bot gets stuck and won't proceed, there is a workaround that has worked for me, without the need to stop and restart the bot - which, by the way, doesn’t fix the issue. Simply go to the PancakeSwap website, place a manual bet of the smallest possible amount, and after the manual round ends, the bot should resume normal operation.

⏰ Waiting for next round: 216217
⚔️ ROUND: 216217 | ⌚ 16:29 | START 🎉

✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.259 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY
⚔️ ROUND: 216218 | ⌚ 16:34 | START 🎉

✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.35 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY
♻️ Skip round: 216218
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216217] - if some rounds remain hanging, they will be eliminated after 2 rounds.
⚔️ ROUND: 216219 | ⌚ 16:39 | START 🎉

✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.175 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY
♻️ Skip round: 216219
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216217] - if some rounds remain hanging, they will be eliminated after 2 rounds.
⚔️ ROUND: 216220 | ⌚ 16:44 | START 🎉

✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.111 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY
⚔️ ROUND: 216221 | ⌚ 16:49 | START 🎉

✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.075 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY
♻️ Skip round: 216221
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216220] - if some rounds remain hanging, they will be eliminated after 2 rounds.
⚔️ ROUND: 216222 | ⌚ 16:54 | START 🎉

✔️ Current Profit: 0 USD = 0 BNB
✔️ Current Balance: 129.059 USD = 0.61207 BNB
⏰ Waiting 3.4 minutes before execute SIGNAL_STRATEGY
♻️ Skip round: 216222
🚨 Bot is running in Martingale Mode! Waiting pending rounds: [216220] - if some rounds remain hanging, they will be eliminated after 2 rounds.

forEach TypeError

Hi, the bot runs successfully for several rounds but eventually this error is thrown:

Pancakeswap-Prediction-Bot/bot-lib/strategies/copytrading-strategy.module.js:56
    users.forEach(user => {
          ^

TypeError: Cannot read properties of undefined (reading 'forEach')
    at handleUsersActivity (/Pancakeswap-Prediction-Bot/bot-lib/strategies/copytrading-strategy.module.js:56:11)
    at async FragmentRunningEvent.<anonymous> (/Pancakeswap-Prediction-Bot/bot-script/pcs-bot.js:104:5)

Thanks

getCakeBalance is not defined

Hi, I'm attempting to run the bot with SIMULATION_MODE set to false, but I am receiving the following error:

Pancakeswap-Prediction-Bot/bot-lib/pcs-bot.module.js:145
const balance = getCrypto() === BNB_CRYPTO ? await getBNBBalance() : await getCakeBalance();
^

ReferenceError: getCakeBalance is not defined
at getPersonalBalance (/Pancakeswap-Prediction-Bot/bot-lib/pcs-bot.module.js:145:72)
at startBotCommand (/Pancakeswap-Prediction-Bot/bot-lib/pcs-bot.module.js:63:25)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async init (/Pancakeswap-Prediction-Bot/bot-script/pcs-bot.js:25:3)

Any suggestions? Thanks!

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.