Skip to main content
The MarketService provides APIs for accessing stock quotes, cryptocurrency prices, commodity data, sector performance, stablecoin markets, ETF flows, and country stock indices.

Base Path

ListMarketQuotes

Retrieves stock and index quotes from Finnhub and Yahoo Finance. Endpoint: GET /api/market/v1/list-market-quotes

Request Parameters

string[]
Ticker symbols to retrieve (e.g., ["AAPL", "^GSPC"]). Empty returns defaults.

Response

MarketQuote[]
The list of market quotes
bool
True when the Finnhub API key is not configured and stock quotes were skipped
string
Human-readable reason when Finnhub was skipped (e.g., “FINNHUB_API_KEY not configured”)
bool
True when the upstream API rate-limited the request

Example Request

Example Response


ListCryptoQuotes

Retrieves cryptocurrency quotes from CoinGecko. Endpoint: GET /api/market/v1/list-crypto-quotes

Request Parameters

string[]
Cryptocurrency IDs to retrieve (CoinGecko IDs). Empty returns defaults.

Response

CryptoQuote[]
The list of cryptocurrency quotes

Example Request

Example Response


ListCommodityQuotes

Retrieves commodity price quotes from Yahoo Finance. Endpoint: GET /api/market/v1/list-commodity-quotes

Request Parameters

No parameters required. Returns default commodity set.

Response

CommodityQuote[]
The list of commodity quotes

Example Request


GetSectorSummary

Retrieves market sector performance data from Finnhub. Endpoint: GET /api/market/v1/get-sector-summary

Request Parameters

No parameters required.

Response

SectorPerformance[]
Sector performance data

Example Request

Example Response


ListStablecoinMarkets

Retrieves stablecoin peg health and market data from CoinGecko. Endpoint: GET /api/market/v1/list-stablecoin-markets

Request Parameters

No parameters required.

Response

StablecoinMarket[]
Stablecoin market data including peg deviation

Example Request


ListEtfFlows

Retrieves BTC spot ETF flow estimates from Yahoo Finance. Endpoint: GET /api/market/v1/list-etf-flows

Request Parameters

No parameters required.

Response

EtfFlow[]
Bitcoin spot ETF flow data

Example Request


GetCountryStockIndex

Retrieves the primary stock index for a country from Yahoo Finance. Endpoint: GET /api/market/v1/get-country-stock-index

Request Parameters

string
required
ISO 3166-1 alpha-2 country code

Response

MarketQuote
The primary stock index quote for the country
string
ISO 3166-1 alpha-2 country code
string
Country name

Example Request

Example Response

Data Sources

  • Finnhub: Real-time stock quotes and sector performance (requires API key)
  • Yahoo Finance: Commodity prices, ETF flows, country indices
  • CoinGecko: Cryptocurrency prices and stablecoin data

Rate Limiting

Finnhub has rate limits on the free tier. When rate-limited, the response will include rate_limited: true. Consider caching responses or upgrading to a paid Finnhub plan for production use.