{"id":15561917,"url":"https://github.com/doodzik/crypto-index-fund","last_synced_at":"2025-04-23T22:53:17.894Z","repository":{"id":74936587,"uuid":"443656248","full_name":"doodzik/crypto-index-fund","owner":"doodzik","description":" A CLI tool for building your own crypto index fund","archived":false,"fork":false,"pushed_at":"2022-04-24T23:40:32.000Z","size":2070,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-23T22:53:09.761Z","etag":null,"topics":["bitcoin","crypto","crypto-index-fund","cryptocurrency","ethereum","index-fund"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/doodzik.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":"2022-01-02T01:12:58.000Z","updated_at":"2022-05-29T18:10:32.000Z","dependencies_parsed_at":"2023-02-24T20:00:33.616Z","dependency_job_id":null,"html_url":"https://github.com/doodzik/crypto-index-fund","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/doodzik%2Fcrypto-index-fund","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doodzik%2Fcrypto-index-fund/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doodzik%2Fcrypto-index-fund/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doodzik%2Fcrypto-index-fund/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doodzik","download_url":"https://codeload.github.com/doodzik/crypto-index-fund/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250528698,"owners_count":21445511,"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":["bitcoin","crypto","crypto-index-fund","cryptocurrency","ethereum","index-fund"],"created_at":"2024-10-02T16:10:39.154Z","updated_at":"2025-04-23T22:53:17.888Z","avatar_url":"https://github.com/doodzik.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# crypto-index-fund\n\nI was curious if I could build a crypto fund for myself. And it looks like I can. Currently, 80% of the ex-stablecoin crypto market consists of 21 cryptocurrencies. There's few enough that it's possible for one person to buy some of each. Alternatively, one could pick the top 10 crypto currencies, which makes allocation possible with fewer funds.\n\n![example allocation](./data/80ex-stable-example.png)\n\nThis repository contains a CLI tool for building your own crypto fund.  It supports the following strategies: \n- Market Dominance Top 10 Coins ex-Stablecoin\n- Market Dominance 80% ex-Stablecoin\n\nHappy to add other allocation strategies as well.\n\nIf you like this type of project consider [following me on twitter](https://twitter.com/dudzik_eth) to see what else I'm building.\n\n## Installation\n\nClone the repository and `cd` into it.\n\n```bash\n$ git clone https://github.com/doodzik/crypto-index-fund\n$ cd $_\n$ npm install\n```\n\n## Usage\n\nBefore getting started make sure to set the `COINMARKET_API_KEY` env variable. You can get the key [here](https://coinmarketcap.com/api/).\n\n```bash\n$ export COINMARKET_API_KEY=\"xxx-xxx-xxx-xxx\"\n```\n\nWhen you are in the repository execute the following command.\n\n```bash\n$ node ./src/crypto-index-fund.js\n```\n\nThe output will be something like this:\n\n```javascript\n{\n  dominance: '80.30%',\n  meta: { thresholdDominance: 80, strategyID: 'TOP_80_PERCENT_DOMINANCE' },\n  entriesCount: 23,\n  entries: [\n    {\n      dominance: '40.62%',\n      symbol: 'BTC',\n      name: 'Bitcoin',\n      baseCurrency: 'USD',\n      price: '$41,938.87',\n      distribution: '50.72%',\n      amountBaseCurrency: '$11,809.92',\n      amount: '₿0.281598431240517422',\n      currentHolding: '₿0.534809920691298957',\n      changeNominal: '-₿0.253211489450781535',\n      changeBaseCurrency: '-$10,619.40'\n    },\n    // etc...\n  ]\n}\n```\n\n### Flags\n\n#### --strategy=STRING \nspecify the strategy to allocate funds\ndefaults to `TOP_10_COINS`\n\nstrategies:\n- `TOP_10_COINS`: selects the top 10 coins weighted by market dominance\n- `TOP_80_PERCENT_DOMINANCE`: selects the coins constituting 80% of the market dominance\n\n#### --funds=DECIMAL \nspecify funds to allocate to the fund\ndefaults to 0.0\n\n#### --currency=STRING \nbase currency for all conversions \ndefaults to USD \n\n#### --holdings=PATH\nadd a path to a holdings file in the format that can be seen in `test/holdings.json` file. \nDefaults to empty \n\n#### --cache=PATH \ntakes a path to the marketplace API response data\ndefaults to false\n\n#### --no-colors/--colors \nWill the output of the output have color encoding\ndefaults to colors true\n\n## Testing\n\n```bash\n$ npm test\n```\n\n## Potential Improvements\n\n- [Calculate how to make the least costly rebalancing](https://en.wikipedia.org/wiki/Change-making_problem)\n\n\n## Disclaimer\n\nThe information provided in this repository does not constitute investment advice, financial advice, trading advice, or any other sort of advice and you should not treat any of the repository's content as such. I do not recommend that any cryptocurrency should be bought, sold, or held by you. Do conduct your own due diligence and consult your financial advisor before making any investment decisions.\n\nThe data in this repository is provided by CoinMarketCap and I don't take any responsibility for any missing or wrong information. CoinMarketCap provides all information as is. You understand that you are using any and all information available here at your own risk.\n\nHyperlinks in this repository do not constitute an endorsement, guarantee, warranty, or recommendation by me. Do conduct your own due diligence before deciding to use any third party services.\n\n## License\n\nCopyright (c) The year when you are reading this | Frederik Dudzik\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoodzik%2Fcrypto-index-fund","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoodzik%2Fcrypto-index-fund","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoodzik%2Fcrypto-index-fund/lists"}