{"id":17353573,"url":"https://github.com/jeffersonlicet/price-prediction-bot","last_synced_at":"2025-04-14T21:46:23.881Z","repository":{"id":44541540,"uuid":"414210373","full_name":"jeffersonlicet/price-prediction-bot","owner":"jeffersonlicet","description":"🔮  Run backtest over PancakeSwap and CandleGenie Prediction and place realtime bets - Trading Bot","archived":false,"fork":false,"pushed_at":"2022-02-09T02:26:45.000Z","size":107,"stargazers_count":73,"open_issues_count":5,"forks_count":25,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-28T09:51:31.377Z","etag":null,"topics":["binance","bot","crypto","cryptocurrency","exchange","javascript","nodejs","pancakeswap","trading-bot"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeffersonlicet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-06T12:51:21.000Z","updated_at":"2025-03-23T12:39:41.000Z","dependencies_parsed_at":"2022-09-04T19:01:06.689Z","dependency_job_id":null,"html_url":"https://github.com/jeffersonlicet/price-prediction-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffersonlicet%2Fprice-prediction-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffersonlicet%2Fprice-prediction-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffersonlicet%2Fprice-prediction-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeffersonlicet%2Fprice-prediction-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeffersonlicet","download_url":"https://codeload.github.com/jeffersonlicet/price-prediction-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248967064,"owners_count":21190890,"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":["binance","bot","crypto","cryptocurrency","exchange","javascript","nodejs","pancakeswap","trading-bot"],"created_at":"2024-10-15T17:17:21.669Z","updated_at":"2025-04-14T21:46:23.863Z","avatar_url":"https://github.com/jeffersonlicet.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔮 PancakeSwap Prediction Bot\n\n### Run simulations(backtesting) and place bets on realtime (soon)\n\n\n## Roadmap\n\n- ✅ Call contract\n- ✅ Auto fetch historical data (and update cache with new rounds)\n- ✅ Run simulations (backtesting) over real data\n- 🕒 Select range of rounds to run a simulation\n- 🕒 Place real-time bets\n- Use market variables to place bets\n\n## Screenshots\n\n#### Main options\n\n![](https://i.imgur.com/5kjeoZe.png)\n\n#### Available strategies\n\n![](https://i.imgur.com/tK4jlB2.png)\n\n#### Strategy options\n\n![](https://i.imgur.com/zDySFm2.png)\n\n#### Strategy result\n\n![](https://i.imgur.com/92STiNs.png)\n\n## Buy me a beer\n0x4f7336C31c8EbE52BAaf4Ac24887EA4FE2C7BFAF BSC wallet\n\n## Strategies\n\n### Bigger Payout\n\nPlace bet for the bigger payout (The option where fewer people placed a bet)\nIf there are more bulls, the payout is going to be less, so we bet bear.\n\n### Minor Payout\n\nSame as above, but the bet is placed where the majority of participants placed a bet.\n\n### Always Bear\n\nWell, always bear, bet that the price is going down.\n\n### Always Bull\n\nSame as above, but bet that the price is going up.\n\n### Trade both directions\n\nSimulates having two wallets with the same amount of BNB, and you can select to add weight to your bets for the minor or bigger payout.\n\n#### Example\n\nBears payout is x2.5 and Bulls payout is x1.3\nYou can add weight to the bigger payout thus the resulting positions will be:\n\n```\nBears Bet = betAmount*weight\nBull Bet = betAmount\n```\n\n- Given a bet amount of 0.01 BNB\n- Adding weight to the bigger payout\n- A weight of 2\n- Bears payout of x2.5\n- Bulls payout of x1.3\n\n#### Bears win\n\nif Bears win you will get `(0.01*2) * 2.5 * (1-3%)` (considering 3% fee).\nThat's `0.0485 BNB` -\u003e `0.0285` BNB gained\n\nOn the other hand, you also have a position for bulls in the other wallet, which is 0.01.\n\nSo your net gains are `0.0285-0.01` =\u003e `0.0185 BNB`\n\n#### Bulls win\n\nIf Bulls win you will get `(0.01) * 1.3 (1-3%)` (considering 3% fee)\nThat's `0.01261` -\u003e `0.00261` BNB gained\n\nBut your bear position is `0.02`, so you will end losing `0.01739 BNB`\n\n## Usage\n\n- You must have Node installed and npm (tested on Node v14.18.0)\n- Clone the repository\n- Open the terminal on the root of the project\n- Run `npm i`\n- Run `node index.js`\n\n## Disclaimer\n\nTested on production, feel free to run in Testnet. Pancake swap prediction contract address and BSc explorer can be modified using the following env vars:\n\n- Create a .env file in the root of the project\n\n```\nBSC_PROVIDER_URL=BSC explorer url\nPKS_CONTRACT_ADDRESS=Pancake Swap prediction contract address\n```\n\nThe results/code and settings of this bot are for recreational purposes and are not intended to be used as financial advice.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffersonlicet%2Fprice-prediction-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeffersonlicet%2Fprice-prediction-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeffersonlicet%2Fprice-prediction-bot/lists"}