GT::DB::bean - Access to beancounter database of quotes
This module is used to retrieve quotes from a MySQL/PostgreSQL database as setup by beancounter. By default, the database is supposed to be running on localhost and the only authentication done is the standard Unix one.
You can put some configuration items in ~/.gt/options to indicate where the database is.
GT::DB::mysql->new()
$db->disconnect
Disconnects from the database.
$db->get_prices($code, $timeframe)
Returns a GT::Prices object containing all known prices for the symbol $code.
$db->get_last_prices($code, $limit, $timeframe)
Returns a GT::Prices object containing the $limit last known prices for the symbol $code.
Notice that beancounter only supports daily data, therefore it will throw an error if you try to retrieve data in timeframes smaller than daily.
$db->get_db_name($code)
Returns the name of the stock designated by $code.