Shekel currency converter

From squadcodercom/squadcoder · View interactive version

Shekel currency converter is an AI agent skill from the GitHub repository squadcodercom/squadcoder. Convert currencies to/from Israeli New Shekel (NIS/ILS) using Bank of Israel official representative rates (shaar yatzig). Use when user asks to convert shekels, NIS, ILS, asks about exchange rates, "shaar yatzig" (representative rate), or needs currency conversion for Israeli tax or business purpos

How to use this skill

Skill file

Shekel Currency Converter

Instructions

Step 1: Identify Conversion Request

Parse the user's request for:

Common currency codes:

| Code | Currency | Hebrew |

|------|----------|--------|

| ILS | Israeli New Shekel | shekel chadash |

| USD | US Dollar | dolar |

| EUR | Euro | euro |

| GBP | British Pound | lira sterling |

| JPY | Japanese Yen | yen |

| CHF | Swiss Franc | frank shveitzi |

Step 2: Fetch Exchange Rate

Current rate (live JSON endpoint):

The legacy XML feed at currency.xml is gone (it now redirects to the JSON API), so do NOT parse XML. Fetch the JSON endpoint and read the exchangeRates array.

Fetch: https://www.boi.org.il/PublicApi/GetExchangeRates
Parse JSON: response.exchangeRates is an array of objects.
Each object: key (currency code), currentExchangeRate (NIS per "unit"),
             unit (1, 10, or 100), currentChange (percent move vs. previous
             publication), lastUpdate (ISO timestamp).

Example object: {"key":"USD","currentExchangeRate":2.872,"unit":1,"currentChange":1.66,"lastUpdate":"..."}. Here currentChange is a percentage daily move, not an absolute NIS delta, and it is NOT used in conversion math.

Historical / tax-date rate (SDMX series):

The JSON endpoint's ?date= parameter is IGNORED, it always returns today's rate. For a specific past date (the rate that matters for tax), use the Bank of Israel SDMX EXR series instead:

Fetch: https://edge.boi.gov.il/FusionEdgeServer/sdmx/v2/data/dataflow/BOI.STATISTICS/EXR/1.0/RER_<CUR>_ILS?startPeriod=YYYY-MM-DD&endPeriod=YYYY-MM-DD&format=csv
Replace <CUR> with the currency code (e.g., RER_USD_ILS, RER_EUR_ILS).
Parse CSV: read OBS_VALUE keyed by TIME_PERIOD.

The series omits non-publication days (Saturday, Sunday, holidays). If there is no row for the exact requested date, walk back to the most recent published date on or before it, and tell the user which date's rate you used.

Step 3: Calculate Conversion

If converting FROM NIS:
  result = amount / rate * unit

If converting TO NIS:
  result = amount * rate / unit

If converting between two foreign currencies:
  nis_amount = amount * rate_source / unit_source
  result = nis_amount / rate_target * unit_target

Note: Bank of Israel rates express how many NIS per unit(s) of foreign currency.

Example (illustrative; fetch the live/dated rate): USD rate around 2.87, unit = 1 means 1 USD is about 2.87 NIS.

Example (illustrative): JPY rate around 1.80, unit = 100 means 100 JPY is about 1.80 NIS.

Step 4: Present Results

Format the result with:

Which date's rate applies (tax)

Examples

Example 1: Simple USD to NIS

User says: "Convert 1000 dollars to shekels"

Result: "1,000 USD = X NIS (at the live Bank of Israel representative rate; fetch the dated rate before quoting a figure)."

Example 2: Historical Rate

User says: "What was the dollar rate on January 1, 2026?"

Result: Fetch the SDMX RER_USD_ILS series. Jan 1, 2026 is a non-publication day, so report the most recent published date on or before it (the first 2026 observation is Jan 2, 2026) and say which date you used.

Example 3: Tax-Relevant Rate

User says: "I need the EUR rate for my VAT report for December 2025"

Result: Provides the representative rate for the relevant transaction date from the SDMX series, noting it is the official rate for tax purposes. For import VAT specifically, point the user to the weekly customs rate.

Bundled Resources

Scripts

References

Reference Links

| Resource | URL |

|----------|-----|

| BOI exchange rates page | https://www.boi.org.il/en/economic-roles/financial-markets/exchange-rates/ |

| Live JSON rates endpoint | https://www.boi.org.il/PublicApi/GetExchangeRates |

| BOI SDMX EXR historical series | https://edge.boi.gov.il/FusionEdgeServer/sdmx/v2/data/dataflow/BOI.STATISTICS/EXR/1.0/RER_USD_ILS |

Recommended MCP Servers

For live exchange rate data, pair this skill with:

| MCP Server | What it provides | Install |

|------------|-----------------|---------|

| boi-exchange | Official Bank of Israel daily representative rates (sha'ar yatzig) for the published currencies, historical rate series, rate change calculations, and direct currency conversion via BOI SDMX API. No API key required. | Install boi-exchange |

When the boi-exchange MCP is available, use its tools for real-time conversions instead of the static reference tables above. The MCP provides the official representative rate (shaar yatzig) which is the legally binding rate for tax purposes.

Gotchas

Troubleshooting

Error: "Rate not available for date"

Cause: Requested date is Saturday, Sunday, an Israeli holiday, or a future date.

Solution: Use the most recent published date on or before the requested date from the SDMX series. Bank of Israel publishes rates Monday to Thursday (soon after 15:15) and Friday (soon after 12:15), not on Saturday, Sunday, or holidays.

Error: "Currency not supported"

Cause: Bank of Israel does not publish a representative rate for this currency (only the 14 listed currencies are covered).

Solution: Suggest using USD or EUR as an intermediate currency for conversion.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.