{"id":13305548,"url":"https://github.com/kyomind/crypto-prices","last_synced_at":"2026-01-19T04:13:45.684Z","repository":{"id":111087586,"uuid":"470166007","full_name":"kyomind/crypto-prices","owner":"kyomind","description":"透過 CoinGecko API 取得指定加密貨幣即時報價並寫入自己的 Google Sheets，搭配 crontab 定時更新","archived":false,"fork":false,"pushed_at":"2022-05-15T21:20:53.000Z","size":377,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-03-05T08:12:38.772Z","etag":null,"topics":["coingecko-api","crontab","google-sheets","gspread"],"latest_commit_sha":null,"homepage":"","language":"Python","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/kyomind.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-15T13:13:07.000Z","updated_at":"2022-03-19T12:44:46.000Z","dependencies_parsed_at":"2023-03-09T03:00:26.574Z","dependency_job_id":null,"html_url":"https://github.com/kyomind/crypto-prices","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyomind%2Fcrypto-prices","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyomind%2Fcrypto-prices/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyomind%2Fcrypto-prices/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyomind%2Fcrypto-prices/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyomind","download_url":"https://codeload.github.com/kyomind/crypto-prices/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242859603,"owners_count":20196972,"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":["coingecko-api","crontab","google-sheets","gspread"],"created_at":"2024-07-29T17:53:51.501Z","updated_at":"2026-01-19T04:13:45.643Z","avatar_url":"https://github.com/kyomind.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crypto Prices\n透過 CoinGecko API 取得指定加密貨幣即時報價並寫入自己的 Google Sheets 裡，供後續製作專屬的 Portfolio\n\n![](image/demo.png)\n\n## Main pacakges\n- [pycoingecko](https://github.com/man-c/pycoingecko)\n- [gspread](https://github.com/burnash/gspread)\n  - ❌ [pygsheets](https://github.com/nithinmurali/pygsheets)\n- [poetry](https://python-poetry.org/)\n  - 套件依賴管理\n  - 虛擬環境建立\n\n\n## Devlogs\n`2022/03/15`\n- 建立開發環境，使用 [Poetry](https://python-poetry.org/)\n- 將 CoinGecko 所有支援的加密貨幣以`csv`清單格式存到本機，作為快取對照表，以取得 coin 的 symbol 比如 BTC、ETH（預設使用 id 查詢）。清單內容也可參見 [API 說明](https://www.coingecko.com/en/api/documentation)\n\n`2022/03/16`\n- 以 Python 標準庫——configparser 建立並讀自己的追縱 coin 清單\n- 建立`config.ini`\n- coin 決定以「`,`」分隔，而不採用空白分隔，因為和 API 的參數格式（id of coins, comma-separated if querying more than 1 coin\n）較為一致\n\n`2022/03/17`\n- 改用`gspread`套件，因為`pygsheets`年久失修，Google Sheets API 驗證一直過不了，錯誤訊息：`Client secrets must be for a web or installed app.`\n- 完成取得與更新 sheet 內容測試\n\n`2022/03/18`\n- 完成主要功能\n- 調整寫入 sheets 的順序與 config 一致，以免新增幣種時，原來的順序會被打亂\n- 新增兩種可能錯誤訊息\n- 新增可單獨更新 coins.csv 的 py 檔，可另安排週期性事件或於必要時執行\n- 新增可自訂 Google sheet 名稱\n\n`2022/03/19`\n- 新增 demo 圖片\n- 新增 crontab job，此部分較麻煩因為 crontab process 會使用獨立的 shell\n  - 修正路徑，以免 crontab process 出現路徑錯誤\n- 新增獨立 logging，不使用全域設定","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyomind%2Fcrypto-prices","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyomind%2Fcrypto-prices","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyomind%2Fcrypto-prices/lists"}