{"id":18607067,"url":"https://github.com/salimane/cryptodiversify","last_synced_at":"2025-10-04T21:41:25.531Z","repository":{"id":141495569,"uuid":"131516622","full_name":"salimane/cryptodiversify","owner":"salimane","description":"Automatically check your portfolio on the Binance exchange and advice you on rebalancing your portfolio into the top 20 cryptocurrencies by market capitalization","archived":false,"fork":false,"pushed_at":"2023-05-22T21:36:47.000Z","size":43,"stargazers_count":49,"open_issues_count":1,"forks_count":10,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-31T10:40:26.957Z","etag":null,"topics":["binance","binance-api","coinmarketcap","cryptocurrency","hodl","hodlcoin","hodlr","portfolio","python"],"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/salimane.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":"2018-04-29T17:52:25.000Z","updated_at":"2025-02-09T18:21:35.000Z","dependencies_parsed_at":"2023-07-03T15:31:35.815Z","dependency_job_id":null,"html_url":"https://github.com/salimane/cryptodiversify","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/salimane/cryptodiversify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salimane%2Fcryptodiversify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salimane%2Fcryptodiversify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salimane%2Fcryptodiversify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salimane%2Fcryptodiversify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/salimane","download_url":"https://codeload.github.com/salimane/cryptodiversify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/salimane%2Fcryptodiversify/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278380479,"owners_count":25977216,"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-10-04T02:00:05.491Z","response_time":63,"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","binance-api","coinmarketcap","cryptocurrency","hodl","hodlcoin","hodlr","portfolio","python"],"created_at":"2024-11-07T02:28:09.315Z","updated_at":"2025-10-04T21:41:25.526Z","avatar_url":"https://github.com/salimane.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cryptodiversify\n\n[![Build Status](https://travis-ci.org/salimane/cryptodiversify.svg?branch=master)](https://travis-ci.org/salimane/cryptodiversify)\n[![Maintenance](https://img.shields.io/maintenance/yes/2019.svg)](https://github.com/salimane/cryptodiversify/commits/master)\n\nAutomatically check your portfolio on the [Binance](https://www.binance.com/?ref=22709520) exchange and advice you on rebalancing your portfolio into the top 20 cryptocurrencies by [market capitalization](https://coinmarketcap.com/).\n\n## Example\n\n```shell\n\nCoin              % Optimal  % Current  Optimal Amount       % Divergence    BUY                  SELL\n\nbitcoin           10.00      10.57      0.008319037083134169  -5.42                                0.0004768099168658307\nethereum          10.00      9.50       0.11374289215895854   5.27            0.005694237158958537\nripple            10.00      9.83       88.94362214163014     1.74\nbitcoin-cash      10.00      10.40      0.05405687847437973   -3.89\neos               10.00      10.60      3.769455245585323     -5.68                                0.2268937544146773\ncardano           7.15       7.05       151.62943088392988    1.47\nlitecoin          6.46       6.33       0.32924505647911273   2.04\nstellar           6.24       6.11       108.6101863258544     2.08\niota              4.30       4.23       16.255542418832175    1.70\ntron              4.24       4.17       384.5150471381602     1.56\nneo               3.85       3.79       0.3801398616726232    1.74\nmonero            3.07       2.99       0.09344853195578331   2.79\ndash              2.96       2.91       0.04699815459345396   1.83\nnem               2.88       2.83       52.63475007774783     1.71\nvechain           1.72       1.67       3.0749170564285194    2.60\nethereum-classic  1.64       1.61       0.5931927386020068    1.85\nqtum              1.46       1.44       0.5179110625799085    1.65\nomisego           1.38       1.36       0.596776023220714     1.49\nicon              1.35       1.33       2.264647249669606     1.46\nbinance-coin      1.29       1.27       0.6669483114341143    1.87\n\nEstimated Total Value:    $788.0573914630499\n```\n\n## How does it work ?\n\nThe algorithm takes the top 20 coins by [market capitalization](https://coinmarketcap.com/) and assign each coin a % allocation based on their weighted market capitalization.\n\nThen it caps every coin to be at most 10% of the total portfolio value. Anything above 10% gets redistributed to all the coins below by weighted market capitalization until the entire sum of the portfolio adds up to 100%.\n\nIt then fetches your current portofolio on the [Binance](https://www.binance.com/?ref=22709520) exchange and suggests a buy and sell strategy based on the divergence of the % allocated if the divergence is greater than 10%.\n\n## Cost / Benefit\n\nFor a long term cryptocurrency strategy, you want to keep your portfolio at a similar risk profile to the original design. If you don’t “reset”, one asset can overwhelm your entire portfolio. This is a starting point for users who want to make a bet on the entire crypto market.\n\nDon’t bet it all on one coin, you should bet on the long-term success of the whole cryptocurrency market.\n\n## Which exchange does it support ?\n\nIt only currently supports the [Binance](https://www.binance.com/?ref=22709520) exchange\n\n## How can I trust this with my API Keys?\n\nThe code runs on your computer, the API keys are on your computer. The APIs keys should be trade-only and are only used to fetch your current [Binance](https://www.binance.com/?ref=22709520) portfolio.\n\n## Prerequisites\n\n* Binance Account. If you haven't set up an account yet,register [here](https://www.binance.com/?ref=22709520).\n* Trade-only API Keys, [generate an API Key](https://www.binance.com/userCenter/createApi.html) and assign relevant permissions. Only enable trade-only permissions.\n* $200 USD in Cryptocurrencies (The minimum $200 protects investors from Binance's minimum trading limit and make sure that diversified portfolios can be created properly.)\n* Git\n* A working [Python](https://www.python.org/) 3.6.5 installation with [virtualenv](https://virtualenv.pypa.io/en/stable/) and [pip](https://pypi.python.org/pypi/pip).\n    ** \n    ```shell\n    # Mac OS X\n    brew update\n    brew install pyenv pyenv-virtualenv\n    pyenv install 3.7.1\n    ```\n\n## Setup\n\n* Clone repository with ``git clone https://github.com/salimane/cryptodiversify.git``\n* Copy ``config/config.py.example``,and save as ``config/config.py``\n* Edit ``config/config.py``, customize configuration and add your trade-only binance api keys\n* Run ``make setup``\n\n## Running\n\n* Run in console with ``python hodl.py``\n\n## TODO\n\n* Online trading via APIs\n* Multiple exchanges\n\n## Contributing\n\nOur goal is for this project to be used by the cryptocurrency community to maximize their investment, so we'd love your input! Got a question or an idea? Create an issue or a pull-request.\n\n## Maintainers\n\n* [Salimane Adjao Moustapha - @salimane](https://github.com/salimane)\n\n## Copyright Notice\n\nCopyright (C) 2018 Salimane Adjao Moustapha, authors, and contributors. Licensed under the [MIT License](/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalimane%2Fcryptodiversify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsalimane%2Fcryptodiversify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsalimane%2Fcryptodiversify/lists"}