{"id":22111661,"url":"https://github.com/phx/pancakeswap-quickstats","last_synced_at":"2025-07-25T07:32:02.138Z","repository":{"id":121578680,"uuid":"359510744","full_name":"phx/pancakeswap-quickstats","owner":"phx","description":"a set of command line tools for displaying your personal pancakeswap stats in the terminal.","archived":false,"fork":false,"pushed_at":"2021-04-25T12:20:32.000Z","size":16,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T02:53:14.457Z","etag":null,"topics":["command-line","command-line-tool","cryptocurrency","cryptocurrency-portfolio","cryptocurrency-prices","pancakeswap","python","python3","script","yield-farming","yieldwatch"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-19T15:36:05.000Z","updated_at":"2023-03-26T12:21:44.000Z","dependencies_parsed_at":"2024-08-10T23:31:32.531Z","dependency_job_id":null,"html_url":"https://github.com/phx/pancakeswap-quickstats","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phx/pancakeswap-quickstats","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fpancakeswap-quickstats","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fpancakeswap-quickstats/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fpancakeswap-quickstats/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fpancakeswap-quickstats/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phx","download_url":"https://codeload.github.com/phx/pancakeswap-quickstats/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phx%2Fpancakeswap-quickstats/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266972942,"owners_count":24014608,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["command-line","command-line-tool","cryptocurrency","cryptocurrency-portfolio","cryptocurrency-prices","pancakeswap","python","python3","script","yield-farming","yieldwatch"],"created_at":"2024-12-01T10:50:14.652Z","updated_at":"2025-07-25T07:32:02.116Z","avatar_url":"https://github.com/phx.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pancakeswap-quickstats\n\nThis is a set of scripts that I wrote over the course of a weekend which will return PancakeSwap stats from the command line.\n\nI was thinking about tweaking a local version of it to use BetterTouchTool in order to display some stats on my Macbook's Touch Bar,\nbut I ended up writing a small shell script plugin for [xbar](https://github.com/matryer/xbar) that parses the output of [`cake.py`](./cake.py)\nand displays the output in my menu bar like so:\n\n`CAKE: [POOL YIELD] + [FARM YIELD] = [TOTAL YIELD] ([TOTAL PENDING USD])`\n\nThis is one of the great benefits of being able to grab this data from the command line.\n\nAfter searching high and low for a PancakeSwap command line tool, I was never satisfied with the results, so these two scripts are what I came up with.\n\n## UPDATE (2021-04-25)\n[`cake.py`](./cake.py) may need to be updated to support the new LP token contracts after the recent PancakeSwap LP v2 token migration.\nIt was a fun project to work on that allowed me to interact with smart contracts and query them directly, but [`watch.py`](./watch.py) is more\nreliable in the long run and automatically provides data for multiple farms and pools without having to manually program them into the script.\n\n## cake.py\n\nI was looking for resources, and [`cake.py`](./cake.py) was the first script that I created. It interacts directly with smart contracts on the\nBinance Smart Chain and relies on the Coingecko API via a built-in python module.  Some of the code was appropriated from another project I found,\ndetails below:\n\nI found a Telegram bot that gives most of the relevant info I was looking for, but the developer ~~was  kind of a dick~~ didn't want to share any\ntips on how to generate that info, and the bot was closed source because it is monetized.\n\nNot to be confused with the Telegram bot referenced above, this originally started out as refactoring of the code from\n[PancakeSwapInfo_bot](https://github.com/Ghonghito/PancakeSwapInfo_bot), but instead of forking it, I just made this its own project\nsince very little of the source code remained the same after I was finished.\n\nThat being said, [PancakeSwapInfo_bot](https://github.com/Ghonghito/PancakeSwapInfo_bot) is still a good resource if you are looking to\ngain insight into multiple syrup pools and aren't worried about farm info.  You just may have to do a little translation, because a lot\nof the code content is not in English.\n\nCurrently, this script only supports the CAKE syrup pool and the DFT/BNB farm info, but feel free to tweak as necessary to grab all of your relevant info.\n\n## watch.py\n\nThis is a script that only relies on the yieldwatch API.\nIt offers a bit more informative data, and this one is scripted in a way that I think it should be able to work with multiple farms\nand pools straight out of the gate, but feel free to customize as necessary.\n\nThat being said, if you are just looking for results in the browser, [yieldwatch.net](https://yieldwatch.net) is probably the best resource.\n\n\n## Installation and Usage\n\nReplace the value of `wallet_addr` with your actual wallet address.\n\n```\ngit clone https://github.com/phx/pancakeswap-quickstats\ncd pancakeswap-quickstats\npip install -r requirements.txt\npython3 cake.py\n[OR]\npython3 watch.py\n```\n\n## Example Output for cake.py\n\n```\n====================================================\n🥞 CURRENT CAKE PRICE: $22.19\n====================================================\nDFT-BNB FARM:\n----------------------------------------------------\n🔹 staked lp tokens: 8.552\n💵 pending cake rewards: 0.859 ($19.07)\n====================================================\nSYRUP POOL:\n----------------------------------------------------\n🔹 staked cake: 3.775 ($83.77)\n💵 pending cake rewards: 0.073 ($1.62)\n====================================================\n🥞 READY TO HARVEST: 0.932 CAKE ($20.69)\n====================================================\n```\n\n## Example Output for watch.py\n\n```\n============================================================\nLP Farms Staking:\ndeposited: $303.04\nyield: $23.24\ntotal: $326.27\n------------------------------------------------------------\nname: DFT-WBNB Pool\ncurrent price: $23.87\nharvested: 1.422 CAKE ($33.94)\npending rewards: 0.973 CAKE ($23.23)\ntotal rewards: 2.395 CAKE ($57.17)\n============================================================\nSyrup Pool Staking:\ndeposited: $90.11\nyield: $1.98\ntotal: $92.09\n------------------------------------------------------------\nname: Cake-Cake Staking\ncurrent price: $23.87\ndeposited tokens: 3.775 Cake ($90.11)\nharvested: 0.141 Cake ($3.37)\npending rewards: 0.083 Cake ($1.98)\ntotal rewards: 0.224 Cake ($5.35)\n============================================================\ntotal deposited: $393.15\ntotal harvested: $37.31\ntotal yield: $62.52\nbreak even: $330.63\npending rewards: $25.21\n============================================================\ncurrent wallet balance: $27.98\n============================================================\n```\n\n## Contributing\n\nFeel free to fork the repo and submit a PR, and I will merge it as soon as I get around to it.\n\nThis is all under the MIT License, so feel free to do whatever you want with it and use it however you see fit.\n\nChange it up, redistribute it as your own, I don't care.\n\nI just wanted to share my knowledge with the community.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphx%2Fpancakeswap-quickstats","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphx%2Fpancakeswap-quickstats","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphx%2Fpancakeswap-quickstats/lists"}