Skip to content

Add currencies tab to markets app#154

Merged
asim merged 2 commits intomainfrom
copilot/add-currencies-tab-markets-app
Feb 26, 2026
Merged

Add currencies tab to markets app#154
asim merged 2 commits intomainfrom
copilot/add-currencies-tab-markets-app

Conversation

Copy link
Contributor

Copilot AI commented Feb 26, 2026

Markets page only covered crypto, futures, and commodities. Adds a fourth Currencies tab tracking major fiat currencies (EUR, GBP, JPY, CAD, AUD, CHF, CNY, INR) priced in USD with 24h change.

Changes

  • New category: CategoryCurrencies = "currencies" constant; tab rendered in generateMarketsPage; category validated in Handler
  • Data source: Yahoo Finance forex quotes via quote.Get (e.g. EURUSD=X) — same library already used for futures, providing both spot price and RegularMarketChangePercent
  • Chart links: Each currency links to its Yahoo Finance forex chart (/chart/EURUSD%3DX, etc.)
  • forexSymbols map: Maps currency codes → Yahoo Finance ticker symbols
  • getAssetsForCategory: Extended to return currencyAssets for the new category
var forexSymbols = map[string]string{
    "EUR": "EURUSD=X",
    "GBP": "GBPUSD=X",
    "JPY": "JPYUSD=X",
    // ...
}

Prices are fetched alongside futures in fetchPrices, using the same IIFE/recover pattern. Currency data is persisted and cached identically to other asset classes.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: asim <17530+asim@users.noreply.github.com>
Copilot AI changed the title [WIP] Add currencies tab to markets app for tracking currencies Add currencies tab to markets app Feb 26, 2026
@asim asim marked this pull request as ready for review February 26, 2026 10:19
@asim asim merged commit c5755bb into main Feb 26, 2026
@asim asim deleted the copilot/add-currencies-tab-markets-app branch March 2, 2026 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants