F::Q 1.45 AlphaVantage quote failure

Erik Colson eco at ecocode.net
Sun Nov 12 12:43:50 EST 2017


Greg Etling <greg at gregetling.com> writes:

> Commands:
> export ALPHAVANTAGE_API_KEY=XXX...
> perl /Applications/Gnucash.app/Contents/Resources/bin/gnc-fq-dump -v
> alphavantage SCHB.US
>
> Note: same exact behavior happens with 'SCHB' and 'US:SCHB' formulations
> and other ticker symbols.
>
> Output:
> malformed JSON string, neither array, object, number, string or atom, at
> character offset 0 (before "Can't connect to www...") at
> /Library/Perl/5.18/Finance/Quote/AlphaVantage.pm line 138.
>
> For reference, line 138:
> my $json_data = JSON::decode_json $body;

The page returned by alphavantage is sometimes empty.  On my system the
SCHB works correctly from F::Q.

~/DEVELOPMENT/finance-quote >>> perl -Ilib Examples/stockdump.pl alphavantage SCHB                                                                                                                                    ±[master]
$VAR1 = {
          'SCHBopen' => '62.2500',
          'SCHBcurrency_set_by_fq' => 1,
          'SCHBisodate' => '2017-11-10',
          'SCHBdate' => '11/10/2017',
          'SCHBvolume' => '234359',
          'SCHBcurrency' => 'USD',
          'SCHBlow' => '62.1800',
          'SCHBsuccess' => 1,
          'SCHBclose' => '62.3200',
          'SCHBhigh' => '62.3700',
          'SCHBsymbol' => 'SCHB',
          'SCHBmethod' => 'alphavantage',
          'SCHBlast' => '62.3200'
        };

This is with version 1.47.  Please try with at least 1.46.

best
--
erik colson


More information about the gnucash-user mailing list