currency-converter
Scannednpx machina-cli add skill dkyazzentwatwa/chatgpt-skills/currency-converter --openclawFiles (1)
SKILL.md
772 B
Currency Converter
Convert between currencies with exchange rates and formatting.
Features
- Exchange Rates: Convert between 150+ currencies
- Historical Rates: Date-based conversions
- Batch Conversion: Process multiple amounts
- Currency Formatting: Locale-specific formatting
- CSV Support: Convert currency columns
- Rate Caching: Efficient API usage
CLI Usage
python currency_converter.py --amount 100 --from USD --to EUR
python currency_converter.py --file amounts.csv --from_col usd --to EUR --output converted.csv
Dependencies
- forex-python>=1.8
- pandas>=2.0.0
Source
git clone https://github.com/dkyazzentwatwa/chatgpt-skills/blob/main/currency-converter/SKILL.mdView on GitHub Overview
Convert between 150+ currencies using real-time rates, with date-based historical conversions. It supports batch processing, locale-aware formatting, and CSV workflows, while caching rates to minimize API usage.
How This Skill Works
Relies on forex-python to fetch current and historical exchange rates and uses pandas for CSV input/output and data handling. It can process multiple amounts in a single run and caches rates to reduce unnecessary API calls for efficiency.
When to Use It
- Travel budgeting and price comparisons across currencies.
- International invoicing or expense reports requiring batch conversions.
- CSV-based data enrichment by converting currency columns.
- Auditing or analyzing historical exchange rates for a specific date.
- Locale-aware reporting that formats numbers per region.
Quick Start
- Step 1: Install dependencies: pip install forex-python>=1.8 pandas>=2.0.0
- Step 2: Run a simple conversion: python currency_converter.py --amount 100 --from USD --to EUR
- Step 3: Process a CSV file: python currency_converter.py --file amounts.csv --from_col usd --to EUR --output converted.csv
Best Practices
- Use explicit ISO currency codes (e.g., USD, EUR) for inputs.
- When using historical rates, specify the exact date for accuracy.
- Enable rate caching to reduce API calls in repeated runs.
- Validate and align CSV columns before processing.
- Test formatting with your target locale to ensure correct currency symbols and separators.
Example Use Cases
- Convert 100 USD to EUR using the current rate.
- Convert 250 GBP to JPY on 2023-08-15.
- Process amounts.csv to convert a USD column to EUR and save as converted.csv.
- Format outputs for en_US locale in a expense report.
- Batch-convert a list of multi-currency amounts in a single run.
Frequently Asked Questions
Add this skill to your agents