GnuCash
5.6-150-g038405b370+
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
~
+
Variables
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Related Functions
+
Files
File List
+
Globals
+
All
a
b
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Functions
c
d
f
g
i
n
o
p
q
s
t
u
x
Variables
+
Typedefs
a
b
g
l
o
p
q
s
t
+
Enumerations
c
d
f
g
p
q
r
s
u
+
Enumerator
a
c
d
e
g
n
q
s
t
u
w
+
Macros
a
c
e
f
g
m
n
o
p
q
s
t
v
x
y
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
bindings
python
example_scripts
get_quotes.pl
Go to the documentation of this file.
1
#!/usr/bin/perl -w
2
3
# get_quotes.pl -- Addition to example Script quotes_historc.py. Reads online stock quotes to file INTC.
4
#
5
6
20
21
use Finance::QuoteHist;
22
print
"Will get stock quotes of $ARGV[0] and save it into the file $ARGV[0]\n"
;
23
$fname = $ARGV[0];
24
open (MYFILE,
">$fname"
);
25
$q = Finance::QuoteHist->new
26
(
27
symbols => [($ARGV[0])],
28
start_date =>
'01/01/2000'
,
29
end_date =>
'today'
,
30
);
31
32
33
print
"name,date, open, high, low, close, volume\n"
;
34
foreach $row ($q->quotes()) {
35
($name,$date, $open, $high, $low, $close, $volume) = @$row;
36
print
MYFILE
"$name,$date, $open, $high, $low, $close, $volume\n"
;
37
}
38
39
close(MYFILE);
40
41
Generated by
1.8.14