Skip to content

UniRate-API/obsidian-currency

Repository files navigation

UniRate Currency for Obsidian

Inline live and historical currency exchange rates in your notes.

Type `usd:eur` and the plugin renders the current USD→EUR rate where the inline code used to be. Type `usd:eur:100` and it renders the converted amount. 170+ currencies plus the major cryptocurrencies, with daily history back to 1999 (Pro plan).

Powered by UniRateAPI.

Why

Existing Obsidian finance plugins are either crypto-only (obsidian-crypto-lookup) or general-purpose calculators that happen to handle currency (obsidian-numerals). Neither gives you inline, in-line live rates in normal prose. A 2022 forum thread asking for one is still open.

Install

Until the plugin is approved on the community plugins list, install manually:

  1. Download main.js, manifest.json, and styles.css from the latest release.
  2. Drop them into <your vault>/.obsidian/plugins/unirate-currency/.
  3. Reload Obsidian and enable UniRate Currency under Settings → Community plugins.
  4. Open the UniRate Currency tab and paste your API key (get a free key).

Syntax

All forms go inside a single inline code span (`…`):

You write Renders as
`usd:eur` 0.9234 EUR/USD
`usd:eur:100` 92.34 EUR
`100 usd:eur` 92.34 EUR
`gbp>jpy` 198.42 JPY/GBP
`usd→eur` 0.9234 EUR/USD
  • Currency codes can be 3-5 characters, case-insensitive (USDT, BTC, XAU).
  • Decimal places, thousand-grouping, and the appended currency code are all configurable.
  • Rates are cached in memory for 60 minutes by default to avoid hammering the API.

Commands

  • Insert exchange rate — opens a modal to pick from/to/amount/date and inserts the result at the cursor.
  • Convert selection — select something like 100 USD to EUR (or 100 usd:eur) and run the command to replace the selection with the converted value.
  • Clear rate cache — drop the in-memory cache; the next render will re-fetch.

Pricing

UniRateAPI's free tier covers live rates and supports 170+ currencies. Historical rates and commodities (XAU, XAG, XPT, XPD) require a Pro plan.

Disclosure

This plugin is built and maintained by UniRateAPI. If you'd rather use a different rate source, the inline syntax is generic enough that another plugin could implement it the same way — open an issue if you'd find that useful.

Development

npm install
npm run dev      # esbuild watch
npm run build    # tsc + esbuild production
npm test         # jest unit tests

The plugin uses Obsidian's requestUrl API so it works on both desktop and mobile without CORS workarounds.

UniRate ecosystem

UniRate ships official integrations for 40+ ecosystems, all maintained under the UniRate-API org.

Core clients (9 languages) Python · Node.js / TypeScript · Go · Rust · Java · Ruby · PHP · .NET · Swift

JavaScript / TypeScript React · Next.js · Remix · SvelteKit · Vue · Angular · Nuxt · NestJS · tRPC

Static-site generators Astro · Eleventy · Hugo · Jekyll

CMS & e-commerce Wagtail · WordPress · WooCommerce · Drupal · Strapi · Medusa · Symfony · Laravel · Directus

Data, AI & backend LangChain (Python) · LangChain.js · FastAPI · Flask · Django REST Framework · Apache Airflow · dbt

Platform & tools MCP server · CLI · Cloudflare Workers · Home Assistant · n8n · Google Sheets · VS Code · Obsidian

Money library bridges money gem (Ruby) · NodaMoney (.NET)

Get a free API key at unirateapi.com.

License

MIT. See LICENSE.

About

Obsidian community plugin: inline live and historical currency exchange rates. Type `usd:eur` in a note to see the rate.

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors