Skip to content
Orvyn

Spreadsheets

Orvyn in Google Sheets

A cell that shows the number and keeps it current, step by step, for someone who has never installed anything.

Takes
About 5 minutes
You need
  • A Google account
  • A spreadsheet, new or old
  • Nothing to pay: the free number needs no key
Costs
Nothing for the free number, which runs a little behind. The signed, newest number takes a pack bought on the feed’s page; every guide ends with how.

First, pick the number you want

Every line further down is then written for it, ready to copy.

Or one of these:

You picked

EUR / USD, ECB reference rate

by Orvyn · changes every day · its page

Its address, which the lines below carry:orvyn/eur-usd-ecb-reference

The free number right now

1.1411

measured · runs 15 minutes behind

Then follow the steps

In about five minutes a cell of your spreadsheet shows EUR / USD, ECB reference rate, and shows the newest number each time you refresh it. You paste one script; there is nothing to install on your computer.

  1. Open the script editor

    Open your spreadsheet. In the menu bar click Extensions, then Apps Script. A new tab opens with a code editor and one file, Code.gs, holding a few lines.
  2. Paste the Orvyn script

    Press the button, which copies the whole script. Back in the editor, click inside Code.gs, select everything (Ctrl+A, or ⌘A on a Mac), paste (Ctrl+V or ⌘V), and save with the disk icon or Ctrl+S.

    or open it

  3. Add the key window (only for the signed number)

    Skip this if the free number is all you want; you can come back to it. In the left column press the + beside Files, choose HTML, and name it Sidebar, nothing more. Select everything in the new file, paste, and save.

    or open it

  4. Reload the spreadsheet

    Close the editor tab and reload the spreadsheet’s tab. After a few seconds an Orvyn item appears at the end of the menu bar.
  5. Type the formula in a cell

    Copy it, paste it into any cell and press Enter.

    any cell
    =ORVYN_PREVIEW("orvyn/eur-usd-ecb-reference")

    The first time, Google asks whether the script may run. Click Review permissions, choose your account, then Advanced and Go to Untitled project (unsafe), then Allow. Google says that of every script pasted by hand: it is asking whether you trust what you pasted. This script reads from orvyn.me and touches this spreadsheet, nothing else.

    You should see: The cell shows 1.1411. It is the free number, which runs 15 minutes behind.

  6. Make it refresh by itself (optional)

    Sheets keeps a formula’s answer until something in it changes, so a cell stays as it was until you edit it. To have it fetch again on its own, put =NOW() in a spare cell, say A1, and add that cell to the formula as an extra argument. Then under File › Settings › Calculation set Recalculation to On change and every hour.

    any cell
    =ORVYN_PREVIEW("orvyn/eur-usd-ecb-reference", A1)

    However often the sheet recalculates, Orvyn is asked at most once every day, which is how often this feed changes.

Want the signed number instead?

What you set up above shows the free number. It runs 15 minutes behind and is not signed, which is fine for a dashboard. The signed number is the newest one, and it comes with a proof anyone can check on the check page or on chain. It costs a little: you buy a pack of reads once, with your wallet, then a key spends from that pack. Three steps, in this order.

  1. 1

    Buy a pack on the feed’s page. The smallest is enough to start; a pack is a number of reads, and the page says what each costs.

  2. 2

    Make a key with the wallet that bought the pack. Sign in here and it is made for you, or make one under Dashboard, API keys, with the read scope only. A read key can spend the reads you bought and nothing more, and you revoke it there.

  3. 3

    Put the key in Google Sheets. Click Orvyn in the menu bar, then API key, paste the key and press Save. From then on =ORVYN("orvyn/eur-usd-ecb-reference") gives the signed number, =ORVYN_TEXT("orvyn/eur-usd-ecb-reference") gives it with its unit, and =ORVYN_PROOF("orvyn/eur-usd-ecb-reference") gives a link that proves it. The key is saved with this spreadsheet, so anyone you share the sheet with can spend from your pack; to keep it to yourself, put the key in a cell only you can see and pass that cell as the second argument instead.

No tool holds a wallet or pays by itself. However often a sheet recalculates or a workflow runs, a feed is read from your pack at most once every day, because that is how often it changes.

If something looks wrong

You seeIt means
#ORVYN: no calls left for …Your key holds no pack for this feed. Buy one on the feed’s page, then edit the cell again.
#ORVYN: the key was refusedThe key is wrong or was revoked. Make a new one in the dashboard and save it again from the Orvyn menu.
#ORVYN: no feed at …The address in the formula has a typo. Pick the feed above and copy the formula again.
#ORVYN: no report yet, or the feed is staleThe feed has not published yet, or its last report is old. Try later, or pick another feed.
The Orvyn menu does not appearReload the tab once more. If it is still missing, open Extensions › Apps Script and check that Code.gs holds the script and was saved.
#NAME?The spreadsheet does not know the formula yet: the script was not saved, or the tab was not reloaded.

Still stuck? Say so on X with the words on your screen, and we will answer.

Take it out again

Delete the formulas from the cells. To take the script out, open Extensions › Apps Script, then Project settings or the project’s overview, and delete the project. The Orvyn menu goes with it.