Crypto Lookup

by Andrew Lombardi
5
4
3
2
1
Score: 31/100

Description

Category: 3rd Party Integrations

The Crypto Lookup plugin allows users to quickly check the exchange rate between various cryptocurrencies and target currencies directly within Obsidian. Using the Cryptonator API, it provides a simple command to fetch exchange rates for a specified cryptocurrency or the default currency set in the plugin's settings. Users can view essential data like the current price as well as additional market information. Future enhancements aim to support auto-complete for currency lookup and improved error handling. This plugin offers a convenient way for users tracking crypto values to access real-time financial data within their notes and workflows.

Reviews

No reviews yet.

Stats

13
stars
4,322
downloads
2
forks
1,805
days
849
days
1,818
days
1
total PRs
0
open PRs
1
closed PRs
0
merged PRs
3
total issues
3
open issues
0
closed issues
0
commits

Latest Version

5 years ago

Changelog

README file from

Github

Crypto Lookup

Look up the price of a cryptocurrency in a target currency (fiat or crypto) and insert it into your note.

Features

  • A command to fetch the exchange rate for currencies entered in a modal (price only, or extended with 24h volume, 24h % change and timestamp)
  • A command to fetch the exchange rate for the default currencies in settings (price only, or extended)
  • A crypto code block that shows live prices whenever the note is rendered
  • An API for DataviewJS and other plugins

Live price code block

Add a crypto code block with one pair per line. A line with only a coin uses the default target currency from settings.

```crypto
BTC USD
ETH/EUR
SOL
```

The block renders a table with each pair's price and 24h change. Prices refresh every 5 minutes while the note is open (configurable in settings, 0 turns it off). Lookups are cached for a minute and batched, so many blocks across open notes share a single request.

DataviewJS and plugin API

The plugin exposes getPrice, getQuote and getQuotes on app.plugins.plugins["obsidian-crypto-lookup"].api. The target currency is optional and defaults to the one in settings.

const crypto = app.plugins.plugins["obsidian-crypto-lookup"].api
const holdings = dv.pages("#holding").array()
const results = await crypto.getQuotes(holdings.map(h => ({base: h.coin, target: "USD"})))
dv.table(["Coin", "Amount", "Price", "Value"], holdings.map((h, i) => {
	const price = results[i].quote?.price
	return [h.coin, h.amount, price ?? results[i].error, price ? h.amount * price : ""]
}))
  • getPrice(base, target?) resolves to the price as a number, or rejects when the pair can't be priced
  • getQuote(base, target?) resolves to {base, target, price, volume?, changePercent?, timestamp, source}
  • getQuotes([{base, target}, ...]) resolves to [{pair, quote?, error?}, ...] in the same order and never rejects

Price data and network use

Prices come from the CoinGecko API (data provided by CoinGecko). If CoinGecko is unavailable or rate limited, the plugin falls back to Coinbase spot prices, which include the price only.

The plugin only contacts api.coingecko.com and api.coinbase.com, and only when you run one of its commands. No account is required. The keyless CoinGecko API has a low rate limit; if you run into it, create a free CoinGecko Demo API key and enter it in the plugin settings.

Coming Soon

  • Autocomplete for supported currencies

Installation

Search for "Crypto Lookup" under Settings → Community plugins → Browse.

Manual Installation

Two methods and the first one is easier:

Method 1
  • Enable community plugins and install Obsidian42 - BRAT
  • Go to settings and under Beta Plugin List click "Add Beta plugin" and type kinabalu/obsidian-crypto-lookup
Method 2
  • Create an obsidian-crypto-lookup folder under .obsidian/plugins in your vault. Add the main.js, manifest.json, and the styles.css files from the latest release to the folder.

Say Thanks 🙏

If you like this plugin and would like to buy me a coffee, you can!