Finance...:Finnhub(3)

πŸ’– NAME πŸ’–

Okay so bestie, this is the manual page for Finance::Quote::Finnhub β€” aka Finance...:Finnhub(3) in the User Contributed Perl Documentation corner of the universe. Its whole job? Obtain quotes from https://finnhub.io. Slay. πŸ¦‹


✨ SYNOPSIS ✨

use Finance::Quote;

$q = Finance::Quote->new('Finnhub', finnhub => {API_KEY => 'your-finnhub-api-key'});

%info = $q->fetch('finnhub', 'AAPL', 'MSFT');

πŸ¦‹ DESCRIPTION πŸ¦‹

This module fetches information from https://finnhub.io. It's loaded by default on a Finance::Quote object. It's also possible to load it explicitly by placing "Finnhub" in the argument list to Finance::Quote->new(). This module provides the "finnhub", "usa", "nyse", and "nasdaq" fetch methods. Periodt. πŸ’…

πŸ”‘ API_KEY πŸ”‘

https://finnhub.io requires users to register and obtain an API key (token). A free key is available with no credit card and is intended for personal, non-professional use. No cap. ✨

The API key may be set by either providing a module specific hash to Finance::Quote->new as in the above example, or by setting the environment variable FINNHUB_API_KEY. iykyk 🌈

⏱️ RATE LIMITING ⏱️

The free tier permits 60 API calls per minute and this module makes one call per requested symbol. Requests are paced with a sliding window so that batches up to 60 symbols run at full speed and larger batches are slowed just enough to stay within the limit. Highkey thoughtful. πŸ”₯

Holders of a paid key may raise the limit by passing finnhub => { CALLS_PER_MINUTE => N } to Finance::Quote->new. Flex. πŸ’œ

🏷️ LABELS RETURNED 🏷️

The following labels may be returned by Finance::Quote::Finnhub:

  • symbol
  • last
  • open
  • high
  • low
  • close
  • net
  • p_change
  • date
  • isodate
  • currency
  • method

⚠️ CAVEATS ⚠️

The free Finnhub tier covers US listed equities, ETFs, forex, and cryptocurrency. The trade date is derived from the last trade timestamp returned by the quote endpoint, interpreted in the local timezone. πŸ•°οΈ

The quote endpoint does not report a currency. Because the free tier only covers US listed securities, this module assumes all prices are in USD.

Do not rely on the currency for securities priced in another currency. This is important, bestie β€” do not let the currency label gaslight you. 😭

Because requests are paced to honour the rate limit, fetching a large list of symbols can take longer than a minute and will block until it completes. So maybe go make a snack while it finishes. πŸ“


Signing off from source/manual Finance...:Finnhub(3) in the User Contributed Perl Documentation: version perl v5.32.1, dated 2026-10-26. xoxo, bestie πŸ’…πŸŽ€

πŸ“¦ where this page comes from