NR Stocks
Stock, forex, and crypto charts for the WordPress block editor: swappable data providers, server-side caching, a shortcode, and a REST API. Formerly gutenberg-stocks.
Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/nikolareljin/nr-stocks/archive/refs/heads/master.zipStock, forex, and crypto charts for the block editor — multiple swappable data providers, server-side caching, a shortcode, and a headless-ready REST API. Built for submission to WordPress.org.
nr-stocks is the plugin slug and the repository name. Until November 2026
the repository was called gutenberg-stocks; see History.
Features
- Stock Chart block: symbol search, multi-symbol comparison overlays, daily/weekly/monthly/intraday series, point range, quote panel.
- Providers: Alpha Vantage, Twelve Data, Frankfurter (keyless forex),
CoinGecko (keyless crypto), ECB reference rates — swappable per block,
new ones addable via config (
docs/adding-a-provider.md). - Caching: per-endpoint TTL presets (1/5/15/60 min + custom),
per-block override, object-cache aware, stampede protection, purge +
wp nr-stocks cache purge. - Shortcode:
[nr-stocks symbols="AAPL,MSFT" provider="twelvedata"]with server-rendered output and a no-JavaScript fallback. - REST API:
nr-stocks/v1(/series,/quote,/search,/providers) with cache headers + rate limits (docs/rest-api.md). - API keys stay on the server — browsers only talk to your own site.
Screenshots
The Stock Chart block in the editor, with symbol search, a live preview, and block settings:

On the site, two symbols compared, with a legend and the latest quotes:

Settings → NR Stocks: default provider, API keys, and cache times:

More on the project site: https://nikolareljin.github.io/nr-stocks/.
Requirements
- WordPress 6.3+ (tested to 7.1), PHP 7.4+.
- Provider keys where needed: Alpha Vantage / Twelve Data free keys; Frankfurter, CoinGecko demo, and ECB need none.
- Development: Node 24+, Composer, Docker (e2e),
jq,curl,zip.
Install (development)
git clone git@github.com:nikolareljin/nr-stocks.git
cd nr-stocks
./update # git submodules (script-helpers)
npm install
composer install
Activate the plugin in WordPress, then visit Settings → NR Stocks.
Use
The default integration is the block: its settings are a plain JSON structure stored in post content, editable in the sidebar with a live preview:
<!-- wp:nr-stocks/stock-chart {"symbols":["AAPL","MSFT"],"provider":"twelvedata"} /-->
- Block (default): insert Stock Chart, search symbols, tune provider/series in the sidebar. JSON attributes stay portable, versionable, and work with revisions.
- Shortcode (fallback for classic content, widgets, page builders):
[nr-stocks symbols="EUR/USD" provider="frankfurter" quote="1"]. Kept for compatibility; new content should use the block. - Headless:
GET /wp-json/nr-stocks/v1/series?provider=…&symbols=….
Develop
| Task | Command |
|---|---|
| Lint (PHP + JS) | scripts/lint.sh |
| Unit tests (Jest + PHPUnit) | scripts/test.sh |
| E2E (Docker WP) | scripts/e2e.sh |
| Plugin Check + meta checks | scripts/pcc.sh |
| Build distributable ZIP | scripts/zip.sh (runs verify-dist, fail closed) |
| Regenerate POT | bin/make-pot.sh |
| Bump version | bash test/bin/version_bump.sh minor |
Local scripts mirror CI one-to-one: test/bin/* is what the workflows
run. See CONTRIBUTING.md for the full flow and test/README.md for the
test stack (NRSTX_TEST_PORT, NRSTX_WP_VERSION).
Release to WordPress.org
- Merge a
release/X.Y.ZPR → tag + GitHub Release are automated. - Run the manual Prepare WP.org Submission workflow → review ZIP.
- Submit at
wordpress.org/plugins/developers/add/(first time only). - The Deploy to WordPress.org workflow runs after the GitHub Release
and pushes the tag to SVN (needs
SVN_USERNAME/SVN_PASSWORDsecrets; until the SVN repo exists it verifies the payload and skips the upload). Running Create GitHub Release by hand from a branch publishes the release but skips the deploy, so select the tag as the ref. A tag released before the repo existed needs one manual run: dispatch the workflow with that tag as the ref. Tags older than this workflow'sworkflow_dispatchtrigger cannot be re-run, so cut a new release instead.
Docs: docs/adding-a-provider.md, docs/rest-api.md, docs/caching.md.
WP.org page assets live in .wordpress-org/ (never in the ZIP).
History
- March 2019: repository created as
gutenberg-stocks. Release 0.0.1 (April 2019) was a "Stock Information" block for the then-new Gutenberg block editor, built with create-guten-block: one symbol, an Alpha Vantage daily chart. - 2026, 0.1.0 and 0.1.1: dependency and security updates to that block.
- November 5, 2026, 1.0.0: complete rebuild as NR Stocks for the
WordPress.org plugin directory, with the plugin slug
nr-stocks. The 0.x block was retired; charts saved with it keep rendering and its settings migrate. - November 6-7, 2026, 1.0.1 to 1.0.3: fixes, and the license file aligned to GPLv2 or later.
- November 7, 2026: repository renamed from
gutenberg-stockstonr-stocks, so the repository, plugin slug, text domain and ZIP folder share one name. GitHub redirects the old repository URLs (web, issues, pull requests and git remotes). The project site moved fromnikolareljin.github.io/gutenberg-stocks/to https://nikolareljin.github.io/nr-stocks/; the old site address is not redirected. To point an existing clone at the new name:git remote set-url origin git@github.com:nikolareljin/nr-stocks.git.
License
GPLv2 or later; see LICENSE. Copyright (C) 2019-2026 Nik Reljin.
Copies and modified versions must keep the copyright notice. If you use or build on this code, please credit the project and link to this repository: https://github.com/nikolareljin/nr-stocks.