A real-time reconnaissance tool built to interface with live financial databases. This script programmatically queries the CoinGecko API to extract live cryptocurrency market data.
The engine utilizes Python's requests library to send HTTP GET requests to public API endpoints. It features built-in status code validation to prevent engine crashes on failed connections (Unhappy Path handling). Upon a successful 200 OK response, the script parses the raw JSON payload and uses multi-level dictionary indexing to extract specific target data (e.g., live USD prices).
- API Integration: Establishing robust connections to external REST APIs.
- JSON Parsing: Translating complex, multi-tiered JSON responses into usable Python dictionaries.
- Error Handling: Validating HTTP status codes before executing data extraction logic.
- Object-Oriented Programming: Encapsulating the API logic within a modular
CryptoFetcherclass.
- Python 3
requests(Third-Party Library)