The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::Chart::Latest -- latest price records

FUNCTIONS

App::Chart::Latest->get ($symbol)

Return a latest prices object for $symbol. It contains the following fields

Basic information

symbol        string
name          string
currency      string

Latest bid/offer quote

quote_date    ISO string like 2008-08-20
quote_time    string like 14:59:59
bid           best buyer's price
offer         best seller's price

Latest trading day

last_date     ISO string like 2008-08-20
last_time     string like 14:59:59
open          day's first trade price
high          day's highest trade price
low           day's lowest trade price
last          last trade price
change        difference 'last' from the previous day's close
volume        day's volume, so far

Other information

halt          1 if trading halted
limit_up      1 if at its daily limit up move
limit_down    1 if at its daily limit down move
dividend      ex-dividend amount, if ex today (ie. 'last_date')
note          other free-form note
error         message string

Dates and times are in the timezone of $symbol.

$latest->quote_adate()
$latest->last_adate()

Return the quote date or last trade date in the form of an "adate" number.

$latest->short_datetime()

Return a string which is a short form of the date time in $latest. The quote date/time is used if present, or the last trade date/time if not.

$latest->formatted_volume()

Return a string which is the $latest volume figure formatted and abbreviated. For example a value 150000 gives "150k".

HOME PAGE

http://user42.tuxfamily.org/chart/index.html

LICENCE

Copyright 2007, 2008, 2009, 2010, 2011, 2014, 2015, 2016, 2017 Kevin Ryde

Chart is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

Chart is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Chart; see the file COPYING. Failing that, see http://www.gnu.org/licenses/.