Finance...:USBonds(3)

πŸ’– Finance::Quote::USBonds(3) β€” the Perl doc, but make it make sense πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation β€” literally we're pulling bond quotes from the US Treasury. Let me walk you through it 🫢


✨ NAME ✨

Finance::Quote::USBonds β€” the module that grabs you quotes for US Federal Bonds in the E, EE, or I series, straight from the Treasury Direct website: http://www.treasurydirect.gov. slay πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

here's the whole vibe, copy-paste ready:

    use Finance::Quote ;

    $q = Finance::Quote->new ;

    %quote = $q->fetch ( "usbonds", "\EE-100-1993-10" ) ;

yes that backslash in "\EE-100-1993-10" is really there in the original β€” keep it, don't "fix" it, iykyk πŸ™ˆ


πŸ¦‹ DESCRIPTION πŸ¦‹

so this module gets quote info from the Treasury Direct website, www.treasurydirect.gov. you hand it a bond symbol, it hands you back the current prices for that bond. that's the whole deal, and honestly? iconic ✨

the symbol nomenclature goes like this:

    SS-DDDDD-YYYY-MM

where, in order:

  • SS = series (EE, E, or I)
  • DDDDD = denomination
  • YYYY = year issued
  • MM = month issued

for example: 'EE-500-1988-02' πŸ“

and here's the part where it actually checks your work, bestie: the symbols you supply get checked for format and validity. like, for example, bonds were only issued after 1942, and only the specific denominations issued for EE bonds are allowed, etc. so don't try to be cute with it πŸ’€


πŸ‘‘ LABELS RETURNED πŸ‘‘

these are the labels that may be returned by Finance::Quote::USBonds:

exchange method source symbol currency date isodate version price

nine of them, all present and accounted for, we don't skip πŸ’œ


🌈 SEE ALSO 🌈


🌸 AUTHOR 🌸

Kenneth J. Farley β€” thank you for your service 🫢


ngl that's the whole page β€” no options, no flags, no environment variables, no exit statuses. just symbols, labels, and one very specific backslash. periodt πŸ’…

okay that's a wrap! this page is from perl v5.32.1, dated 2026-10-26, filed under User Contributed Perl Documentation β€” stay hydrated and go buy a savings bond πŸ§šπŸ’–

πŸ“¦ where this page comes from