Skip to main content
Prime Direction

Markets

Morrow shows market quotes in two places:

  • The header runs a short line of quotes, such as BTC 61,178 +1.0%, at the top of every page. You choose the markets with the Ticker setting. The line is hidden on screens narrower than 992 pixels.
  • The markets panel on the front page shows one lead market with its price and a line chart, and a tile per other market with your latest story about it. You choose the markets with public tags whose slug starts with market-.

A /markets/ page can bring the panel together with your markets coverage.

Where the Quotes Come From#

The quotes are loaded in the reader's browser from two free public sources. No account or key is needed.

MarketSourceChange shownLine chart
CryptoCoinGecko, priced in US dollarsOver the last 24 hoursThe last day
Currency pairsEuropean Central Bank rates, through FrankfurterSince the previous trading dayThe last month

Quotes refresh every five minutes while the page is open in front. Currency rates are the ECB's daily reference rates, so they change once a working day, not by the minute.

CoinGecko limits how often one address may ask. When it refuses, the last good quote stays, and a reader on a first visit may see no crypto quote for a few minutes.

Stock indices, commodities and other markets have no free source the theme can use. They say No live quote, unless you add a source of your own. The last part of this page shows how.

The Header Quotes#

  1. Navigate to ⛭ Settings → Design
  2. Click Customize
  3. Click Theme
  4. Scroll to the Homepage section
  5. Edit Ticker
  6. Click Save

The default value is BTC, ETH, EUR/USD. List the markets separated by commas, in the order you want them shown.

You writeMarket
BTC, ETH, SOLA cryptocurrency by its symbol
EUR/USD, GBP/USDA currency pair, the first currency priced in the second
PEPE=pepeA cryptocurrency with the CoinGecko ID written after =

Morrow knows the CoinGecko IDs of BTC, ETH, SOL, XRP, ADA, DOGE, LTC, BNB, DOT, AVAX, LINK, TON, TRX, MATIC, USDT and USDC. For any other coin, write the symbol, an equals sign and the coin's ID from its CoinGecko page, for example PEPE=pepe.

A currency pair can also be written without the slash, as EURUSD. Quotes that do not fit the line run through it. A market whose quote cannot be loaded is left out.

To remove the quotes from the header, clear the Ticker field, or add ticker to Disabled features. The panel keeps its own quotes either way. See Features.

The Markets Panel#

The panel stands on your accent color. The market tag with the most posts leads:

  • its name, the time of the quote and the sources
  • its price and its change
  • a line of its price with the times under it
  • your latest story about it, with a Read the story button

Each other market gets a tile with its name, price, change and your latest story. A tile opens that story, or the market's tag page when it has none. The front page shows up to eight markets. When a page with the slug markets exists, a last tile, All markets, opens it.

Setup#

Each market is a public tag whose slug starts with market-.

  1. Navigate to ⛭ Settings → Tags
  2. Click New tag
  3. Enter the market's name, for example Bitcoin
  4. Set the Slug to market- followed by the symbol, for example market-btc
  5. Click Save
  6. Add the tag to the stories about that market

The symbol is the part of the slug after market-. A hyphen between two currencies reads as a currency pair.

Tag slugQuote shown
market-btcBTC
market-ethETH
market-eur-usdEUR/USD
market-usd-jpyUSD/JPY

The tag's name is free text, so Bitcoin or EUR/USD both work. The slug decides the quote.

A slug cannot hold an = sign. For a coin Morrow does not know, add the coin to the Ticker setting as SYMBOL=id with the same symbol as in the slug. While the header quotes are on, the tile uses that ID too. Such a coin has no line chart, so do not let it lead the panel.

To change which market leads, look at the number of posts each market tag has. The one with the most comes first.

The Markets Page#

Morrow builds a markets page from a page with the slug markets. It shows the page's title and excerpt, the panel with every market tag, and up to 24 posts tagged markets under the heading Markets desk.

  1. Go to Pages and click New page
  2. Enter a title, for example Markets
  3. Open Page settings and change Page URL to markets
  4. Optionally, write a short description in the Excerpt field
  5. Click Publish

The page body is not shown, so it can stay empty. The title and the excerpt are displayed when Show title and feature image is on for the page. Add the page to your navigation in ⛭ Settings → Navigation.

Use the public tag with the slug markets for your general markets coverage, alongside the market- tag of each single market.

Quotes From Your Own Source#

If you have a data service for indices, commodities or other markets, you can feed its quotes to the theme through Code Injection. Morrow asks your source first and fills whatever it leaves out from CoinGecko and the ECB.

  1. Go to ⛭ Settings → Code injection
  2. Paste a script like this one into Site Header
  3. Click Save
<script>
  window.breakTheme = window.breakTheme || {};
  window.breakTheme.tickerProvider = async function (symbols) {
    // symbols is a list such as ["BTC", "EUR/USD", "SPX"]
    const response = await fetch('https://quotes.example.com/?symbols=' + symbols.join(','));
    const data = await response.json();

    // Return one entry per symbol you can quote:
    // the price, and the change in percent
    return {
      SPX: { value: data.spx.price, change: data.spx.changePercent },
    };
  };
</script>

Write breakTheme exactly as shown. The function receives the symbols as Morrow reads them, in capitals and with currency pairs written with a slash. It returns an object keyed by those symbols. Each entry has a value, which is the price, and a change, which is the change in percent, for example 0.84 or -1.2. The address and the shape of data above are placeholders for your own service.

A source of your own supplies quotes only. The line chart of the lead market always comes from CoinGecko or the ECB.

Notes#

  • Quotes are cached in the reader's browser for five minutes, so moving between pages does not load them again.
  • The times on the panel are in the site's timezone, set in ⛭ Settings → General.