2018-06-09 13:05:44 +02:00
|
|
|
#!/usr/bin/perl -w
|
|
|
|
|
|
|
|
|
|
|
|
use Finance::Quote;
|
|
|
|
|
|
|
|
my @papers;
|
|
|
|
if (@ARGV) {
|
|
|
|
@papers = @ARGV;
|
|
|
|
} else {
|
|
|
|
# example values
|
2020-06-03 22:33:43 +02:00
|
|
|
#@papers = ("A0M9A2", "DE0005326565", '986855');
|
|
|
|
@papers = ('986855', 'LU0055631609', 'F0GBR05V3L');
|
2018-06-09 13:05:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-06-03 22:33:43 +02:00
|
|
|
# DKB
|
|
|
|
#my $q = Finance::Quote->new("DKB");
|
|
|
|
#my %retvals = $q->fetch("dkb",@papers);
|
|
|
|
#my @details = ('name', 'price', 'currency', 'date');
|
2018-06-09 13:05:44 +02:00
|
|
|
|
2020-06-03 22:33:43 +02:00
|
|
|
# should-be possible
|
2018-06-09 13:05:44 +02:00
|
|
|
#my @details = $q->labels();
|
2020-06-03 22:33:43 +02:00
|
|
|
|
|
|
|
# Morningstarde
|
|
|
|
my $q = Finance::Quote->new("Morningstarde");
|
|
|
|
my %retvals = $q->fetch("morningstarde",@papers);
|
|
|
|
my @details = ('name', 'nav', 'currency', 'date');
|
2018-06-09 13:05:44 +02:00
|
|
|
|
|
|
|
foreach my $fund (@papers) {
|
|
|
|
foreach my $detail (@details) {
|
|
|
|
print "got $detail with value $retvals{$fund, $detail}\n";
|
|
|
|
}
|
|
|
|
print "\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
print "\n";
|