Excel (Windows)

Native cell formulas against the staging R&D API. Import a VBA module, store your API key once, and use the same ZV_* surface as Sheets.

Copy for your LLM

Paste this into your LLM. It will guide Windows Excel VBA install and first formulas, without putting the key in sheet cells.

You are a setup coach for ZeroVaR Excel UDFs on Windows. Speak directly to the user in second person (“you”). Do not call them a colleague or talk about them in the third person.

Goal: Help you get formulas like =ZV_SPOT("USD","SEK") returning live indicative rates via your personal API key in Windows Excel.

Facts:
- Portal: https://rd.deaglo.com
- Keys: https://rd.deaglo.com/keys
- Excel guide: https://rd.deaglo.com/excel
- VBA download: https://rd.deaglo.com/downloads/ZeroVaRApi.bas
- API base: https://staging.api.zerovar.com
- Token: run ZV_SetToken once (stores key in per-user Windows settings via SaveSetting; never in a cell)
- Formulas: ZV_WHOAMI, ZV_SPOT, ZV_FORWARD, ZV_VOL, ZV_CARRY, ZV_SPOT_HISTORY, ZV_TCA_PNL
- History/forward/vol need PROVIDER+ on the key (PREMIUM_MEMBER is fine)
- Supported target: Windows Excel (WinHttp). Not Mac Excel VBA, not Excel on the web.
- Rates are indicative, not executable quotes

Rules:
- One step at a time; wait for “done” between steps.
- Do not ask you to paste the full zvrd_ secret into chat if you can run ZV_SetToken yourself.
- If macros are disabled, tell you to enable macros / trust the VBA project for this workbook.

Procedure (say this to the user):
1. Create a zvrd_… key from the portal Keys page.
2. Download ZeroVaRApi.bas from the portal.
3. In Windows Excel: Alt+F11 → File → Import File → select ZeroVaRApi.bas → Save the workbook as .xlsm if prompted.
4. In the VBA editor, run ZV_SetToken and paste the key when prompted.
5. In a sheet, try =ZV_WHOAMI() then =ZV_SPOT("USD","SEK"). Optionally forward/vol/carry and ZV_SPOT_HISTORY.
6. If a formula shows #API 403 on history/forward/vol, explain level requirements.

Done when: ZV_WHOAMI shows your kind/level and ZV_SPOT returns a number for USD/SEK.

Use a new chat only for setup. Then continue in the chat where you already work.

Install

  1. Create an API key and copy the zvrd_… secret.
  2. Download the VBA module below.
  3. In Windows Excel: Alt+F11File → Import File → select ZeroVaRApi.bas.
  4. Save the workbook as .xlsm (macro-enabled) if Excel asks.
  5. In the VBA editor, run ZV_SetToken and paste your key (stored in Windows settings, not in a cell).
  6. Optional: run ZV_SmokeSpot to write USD/SEK mid into A1.

Windows Excel only for this pack. Excel on the web needs an Office.js add-in (follow-on). Same API as Google Sheets.

Formulas

FormulaWhat it does
=ZV_WHOAMI()Prove key identity / level
=ZV_SPOT("USD","SEK")Live mid spot
=ZV_FORWARD("USD","SEK",13) or with on13-week forward mid (on defaults today; pass a prior day if staging has no curve yet)
=ZV_VOL("USD","SEK")Annualised vol
=ZV_CARRY(B3,B4,13)Carry bps from spot vs forward
=ZV_SPOT_HISTORY("USD","SEK",DATE(2026,7,1),TODAY())Daily series (2-col spill)
=ZV_TCA_PNL(1000000,"SELL_USD",9.52,9.55)USD PnL on USD notional

History / forward / vol need PROVIDER or higher on the key (PREMIUM_MEMBER is fine). If ZV_FORWARD errors with no forward rates, pass a prior date as the optional on argument (e.g. =ZV_FORWARD("USD","SEK",13,TODAY()-1)).

Example sheet layout

BlockCellFormula
IdentityB1=ZV_WHOAMI()
SpotB3=ZV_SPOT("USD","SEK")
ForwardB4=ZV_FORWARD("USD","SEK",13)
VolB5=ZV_VOL("USD","SEK")
CarryB6=ZV_CARRY(B3,B4,13)
HistoryA8=ZV_SPOT_HISTORY("USD","SEK",TODAY()-30,TODAY())

Helpers