{"id":25640695,"url":"https://github.com/socketbyte/polybar-binance-portfolio","last_synced_at":"2026-06-25T03:30:59.052Z","repository":{"id":90873484,"uuid":"441267280","full_name":"SocketByte/polybar-binance-portfolio","owner":"SocketByte","description":":moneybag: Very simple Binance (and CoinStats) portfolio overview script for Polybar","archived":false,"fork":false,"pushed_at":"2021-12-28T12:39:57.000Z","size":88,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-08T07:16:36.834Z","etag":null,"topics":["binance","coinstats","polybar","polybar-scripts"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SocketByte.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,"zenodo":null}},"created_at":"2021-12-23T18:40:23.000Z","updated_at":"2022-12-26T07:18:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"2fd2aa0a-9f66-4ce0-94c9-db42526a6fef","html_url":"https://github.com/SocketByte/polybar-binance-portfolio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SocketByte/polybar-binance-portfolio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fpolybar-binance-portfolio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fpolybar-binance-portfolio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fpolybar-binance-portfolio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fpolybar-binance-portfolio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SocketByte","download_url":"https://codeload.github.com/SocketByte/polybar-binance-portfolio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SocketByte%2Fpolybar-binance-portfolio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34758773,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"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":["binance","coinstats","polybar","polybar-scripts"],"created_at":"2025-02-23T04:46:22.690Z","updated_at":"2026-06-25T03:30:59.045Z","avatar_url":"https://github.com/SocketByte.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Polybar Binance Portfolio Script\n\nThis simple script gives you an overview of your Binance Spot account balance with automatic currency rate adjustment for Polybar.\n\n![Preview](previews/preview2.png)\n\nAdjusted by a non-USD currency rate:\n\n![Preview](previews/preview4.png)\n\nThere's also an experimental feature to scrap CoinStats shareable portfolio URL for in-depth profit/loss data. \n\nSee [here](#CoinStats-Shareable-Portfolio-URL) for more information.\n\n![Preview](previews/preview1.png)\n\n![Preview](previews/preview3.png)\n\n## Usage\n```ini\n[module/polybar-binance-portfolio]\ntype = custom/script\nexec = ~/.config/polybar/modules/polybar-binance-portfolio.sh\ninterval = 600\n```\nPlease remember to give your script execution permissions.\n\n## Dependencies\nThis script requires `jq`, `curl`, `bc`, `grep`, `sed` and `openssl` to be installed and working correctly.\n\n### Arch Linux\n```\nsudo pacman -S jq curl bc openssl\n```\nYou can also optionally install Font Awesome 5 to use the icons shown in previews.\n```\nsudo pacman -S ttf-font-awesome\n```\n\n## Default Configuration\nThe configuration options are located in the script directly.\n```bash\n# Output format, this will be echoed to polybar.\n# Available variables:\n# - {CURRENCY}: Your selected FIAT currency.\n# - {BALANCE}: The current portfolio balance adjusted for the selected currency.\n# (You have to enable COINSTATS_USE to be able to use these variables)\n# - {CS_USD_PRICE}: The current price of your selected currency in USD.\n# - {CS_PNL_PERCENT}: The current profit/loss percentage of your portfolio.\n# - {CS_PNL}: The current profit/loss of your portfolio adjusted for the selected currency.\n# - {CS_PNL_ICON}: The current profit/loss icon.\n# - {CS_PNL_DAILY_PERCENT}: The current profit/loss percentage of your portfolio in the last 24 hours.\n# - {CS_PNL_DAILY}: The current profit/loss of your portfolio in the last 24 hours adjusted for the selected currency.\n# - {CS_PNL_DAILY_ICON}: The current profit/loss icon in the last 24 hours.\nFORMAT=\"\\${BALANCE}\"\n# Example with CoinStats:\n# FORMAT=\"\\${BALANCE} {CS_PNL_DAILY_ICON} {CS_PNL_DAILY_PERCENT}%%{F-} (\\${CS_PNL_DAILY})\"\n\n# An icon/label for {CS_PNL_ICON} or {CS_PNL_DAILY_ICON}.\nICON_UP=\"%{F#b8bb26}UP\"\nICON_DOWN=\"%{F#fb4934}DOWN\"\n\n# Create an API key with at least a \"Reading\" permission.\n# https://www.binance.com/my/settings/api-management\nAPI_KEY=\"\"\nSECRET_KEY=\"\"\n\n# Please set your preferred currency here.\n# Keep in mind that the currency converter API is not required for USD.\nFIAT_CURRENCY=\"USD\"\n\n# You only need this if your FIAT_CURRENCY is not USD.\n# https://www.currencyconverterapi.com/\nCURRCONV_API_KEY=\"\"\n\n# !!! EXPERIMENTAL\n# Use CoinStats scraper to get more data about your portfolio.\n# This uses an UNOFFICIAL way to scrape data, so it's prone to breakage at ANY moment.\nCOINSTATS_USE=No # Set to Yes to enable.\nCOINSTATS_PORTFOLIO_URL=\"\" \n```\n\n## Requirements\nSince this script uses a few different APIs to do it's job, you'll have to generate your own API keys.\n\n### Binance API Key\nGo to your [Binance API Management](https://www.binance.com/my/settings/api-management) dashboard to create a new API key.\n\n![Tutorial](previews/tutorials/tut1.png)\n\nAnd then copy your Public and Secret keys and paste them in the script here:\n```bash\n# Create an API key with at least a \"Reading\" permission.\n# https://www.binance.com/my/settings/api-management\nAPI_KEY=\"your public key\"\nSECRET_KEY=\"your secret key\"\n```\n\n### Currency Converter API (optional)\nYou can skip this step if you want to use USD as your currency.\n\nTo generate your Free API Key you'll need to head to [CurrencyConverterAPI](https://free.currencyconverterapi.com/free-api-key) website.\n\n![Tutorial](previews/tutorials/tut2.png)\n\nYour API key will be sent to your email inbox. Remember to activate your account before using your key.\n\nYou can then copy and paste your key in the script:\n```bash\n# You only need this if your FIAT_CURRENCY is not USD.\n# https://www.currencyconverterapi.com/\nCURRCONV_API_KEY=\"your key\"\n```\n\n### CoinStats Shareable Portfolio URL (optional)\nYou can opt-in to use the heavily experimental feature of the script to get in-depth profit/loss data from CoinStats.\n\nSince CoinStats does not expose any API for PNL calculation, I had to look for another way. Thankfully, CoinStats allows it's users to create a \"shareable portfolio link\" that can be used to track your current portfolio balance (with detailed PNL information) publicly.\n\nTo create such a link, go into your [CoinStats Portfolio](https://coinstats.app/portfolio/) and select a small \"link\" icon at the bottom of the page.\n\n![Tutorial](previews/tutorials/tut3.png)\n\nAnd then just copy your link and paste it in the script:\n```bash\n# !!! EXPERIMENTAL\n# Use CoinStats scraper to get more data about your portfolio.\n# This uses an UNOFFICIAL way to scrape data, so it's prone to breakage at ANY moment.\nCOINSTATS_USE=Yes # Remember to set this to \"Yes\"\nCOINSTATS_PORTFOLIO_URL=\"your url\" \n```\nPlease keep in mind that this is an EXPERIMENTAL feature and there's NO guarantee that it will work for you / at a later date.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketbyte%2Fpolybar-binance-portfolio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsocketbyte%2Fpolybar-binance-portfolio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsocketbyte%2Fpolybar-binance-portfolio/lists"}