{"id":24809523,"url":"https://github.com/clats97/clatchain","last_synced_at":"2026-05-11T05:55:07.214Z","repository":{"id":274350654,"uuid":"922637799","full_name":"Clats97/ClatChain","owner":"Clats97","description":"A simple, easy to use Python script that shows you real time cryptocurrency prices with frequent updates.","archived":false,"fork":false,"pushed_at":"2025-02-06T11:25:57.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T12:29:13.091Z","etag":null,"topics":["bitcoin","bitcoin-price","crypto","crypto-tools","cryptochecker","cryptocurrency","cryptotracker","ethereum"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Clats97.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":"2025-01-26T18:18:56.000Z","updated_at":"2025-02-06T11:21:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"59de33c1-1e48-4b5b-9b50-30c4b3029792","html_url":"https://github.com/Clats97/ClatChain","commit_stats":null,"previous_names":["clats97/clatchain"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Clats97%2FClatChain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Clats97","download_url":"https://codeload.github.com/Clats97/ClatChain/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245458710,"owners_count":20618697,"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","bitcoin-price","crypto","crypto-tools","cryptochecker","cryptocurrency","cryptotracker","ethereum"],"created_at":"2025-01-30T11:14:29.250Z","updated_at":"2026-05-11T05:55:07.205Z","avatar_url":"https://github.com/Clats97.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ClatChain Crypto Checker\n\nA command-line Python tool that fetches current cryptocurrency prices from [CoinGecko](https://www.coingecko.com/en/api) and updates them at a user-defined interval (default: 5 minutes). This script is primarily designed for Windows environments, using `msvcrt` for non-blocking user input.\n\n![clatchain](https://github.com/user-attachments/assets/b7db449d-2e70-4b32-b1ff-298a760b4009)\n\n## Features\n**Real-Time Price Fetching**: Retrieves the latest price (in USD) for various coins from CoinGecko’s Simple Price API.\n**Coin Name Mappings**: Includes a built-in dictionary (`COINGECKO_ID_MAP`) for handling common coin names and tickers (e.g., `BTC`, `ETH`, `DOGE`, etc.).\n**Auto-Update Loop**: Continuously updates the selected coin’s price every 5 minutes (or until user input).\n**Interactive Input**: \n  - Press **Enter** to change to a different coin.\n  - Type **exit** to terminate the program at any prompt.\n**Error Handling**: Gracefully handles network errors or mismatched coin names.\n\n## How It Works\n\n1. **Initialization**:  \n   - Displays an ASCII banner.  \n   - Prompts the user to enter a cryptocurrency name or ticker.\n\n2. **Coin Validation**:\n   - The script checks the user’s input against the `COINGECKO_ID_MAP` dictionary.  \n   - If a match is found (e.g., input `BTC` → `'bitcoin'` in the map), the corresponding CoinGecko ID is returned.\n   - If no match is found, the user is prompted to enter a new coin name or exit.\n\n3. **Fetching Prices**:\n   - Using the identified CoinGecko ID, the script queries the [CoinGecko Simple Price API](https://www.coingecko.com/en/api/documentation) to retrieve the coin’s current USD price.\n   - On success, it prints the fetched price to the console.  \n   - On failure, it logs an error message indicating the issue (e.g., network error).\n\n4. **Continuous Update Loop**:\n   - After fetching the price once, the script waits up to 5 minutes (300 seconds) before fetching the price again.  \n   - The user can interrupt this waiting period by pressing **Enter**, allowing them to search for another coin or by typing **exit** to terminate the program.\n\n5. **User Input (Non-Blocking)**:\n   - The script uses `msvcrt` (a Windows-specific Python library) to detect keystrokes without blocking program execution.  \n   - If no input is detected within the specified timeout, the script proceeds to re-fetch the price.\n\n## Installation\n\n1. **Requirements**:\n   - **Python 3.6+**  \n   - **Windows OS** (due to `msvcrt` usage)  \n\n2. **Python Libraries**:\n   - `time` (standard library)\n   - `sys` (standard library)\n   - `msvcrt` (Windows-only standard library)\n   - `requests` (third-party library for HTTP requests)\n\n3. **Install Required Libraries**:\n\npip install requests\n\n## Usage\n\n1. **Clone or Download**:\n   - Clone or download this repository or copy the script file into your local system.\n\n2. **Run the Script**:\n\n3. **Enter the Coin**:\n   - Input the ticker or name of the cryptocurrency when prompted (e.g., `BTC`, `ETH`, `DOGE`, `ADA`).\n   - Press **Enter** to confirm.\n\n4. **Wait for Updates**:\n   - The script displays the current price and updates it every 5 minutes, unless interrupted by user input.\n   - **Press Enter**: Switch to a different coin.\n   - **Type exit**: Terminates the program at any prompt.\n\n## Configuration\n\n- **Fetch Interval**:\n  - By default set to **5 minutes**.  \n  - You can adjust the `timeout` argument in `fetch_and_display_price(coin)` if you need to change it.\n\n- **Coin Mapping**:\n  - The dictionary `COINGECKO_ID_MAP` can be extended to include more coin name mappings or custom aliases.\n\n## Limitations and Warnings\n\n1. **Windows-Only**:  \n   - The script uses `msvcrt`, which is exclusive to Windows.  \n   - To use it on MacOS or Linux, you would need to replace `msvcrt` with a different mechanism for non-blocking user input.\n\n2. **Network Reliability**:  \n   - Relies on an active internet connection to fetch live data from the CoinGecko API.\n\n3. **CoinGecko API Rate Limits**:  \n   - The free tier of the CoinGecko API can limit requests per minute. If you exceed these limits, you may receive errors or get temporarily blocked. Check CoinGecko’s [API Documentation](https://www.coingecko.com/en/api/documentation) for more details.\n\n4. **Not an Investment Tool**:  \n   - The script is solely for **informational** purposes, and **does not** provide any financial or trading advice.\n\n## Troubleshooting\n\n**Error Fetching Price**:\n  - Ensure you have a stable internet connection.\n  - Verify the coin name or ticker is included in the `COINGECKO_ID_MAP` dictionary.  \n  - Check if the CoinGecko API is online.\n\n**Script Closes Immediately**:\n  - Run the script from a command prompt (e.g., PowerShell or CMD) to view output before it closes.\n\n**Keyboard Input Not Detected**:\n  - Confirm you are using Windows.  \n  - If you are using MacOS or Linux, you need a cross-platform approach for detecting keystrokes (e.g., `select` or `curses` module).\n\n**Author**\n\nJoshua M Clatney (Clats97)\n\nEthical Pentesting Enthusiast\n\nCopyright 2025 Joshua M Clatney (Clats97) \n\n**Disclaimer**: This tool is provided “as is” for informational purposes only. Always verify prices with reliable sources before making financial decisions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclats97%2Fclatchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclats97%2Fclatchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclats97%2Fclatchain/lists"}