[GNC] Next release of F::Q

Chris Good goodchris96 at gmail.com
Mon Sep 10 05:33:36 EDT 2018


Erik Colson
<mailto:gnucash-user%40gnucash.org?Subject=Re:%20Re%3A%20%5BGNC%5D%20Next%20
release%20of%20F%3A%3AQ&In-Reply-To=%3C87r2iy8y6t.fsf%40ecocode.net%3E> eco
at ecocode.net wrote on gnucash-user Thu Aug 16 05:20:42 EDT 2018

 

Hello all,

 

I'm on some extended vacation and will be back home next week.  My

intent is to release F::Q from master at the end of this month.

 

The alphavantage module has undergone some modifications which should

make it more reliable since we can now tell the module at which speed it

can question the alphavantage API.

 

Before releasing F::Q, I would like as many feedback as possible on the

best working arguments.  You can therefor play with the following

variables in the Alphavantage.pm file:

 

my $maxQueries = { quantity =>20 , seconds => 65}; # no more than x queries
per y seconds

 

Probably we should now set quantity to 5 and seconds to 61, but maybe

there are some better values?  The values above seem to work pretty well

on my automated home system.  Sometimes queries get rejected, but the

module is now smart enough to insert a delay if alphavantage API refuses

to answer queries.

 

The purpose of next release is to fix the problems with Alphavantage

speed control, so I won't add any other commits to other modules for

this release.  I've seen some messages on github concerning

Alphavantage.pm and will read those while enhancing the module.

 

best

--

erik colson

 

 

Hi Erik,

 

Thanks for working on this.

I have done some testing using the current github master Quote.pm &
AlphaVantage.pm.

 

Here are my results:

 

I have 16 stocks but only 1 currency.

 

Using the F::Q 1.47  code:

Only the first 5 stocks worked, the others failed.

 

Using your mods (& my variations in timing), there was never a failure to
return all the quotes requested. Yay!

 

Using your timing of no more than 20 queries per 65 seconds:

real        3m0.735s

real        2m20.476s

real        2m19.217s

real        2m17.692s

real        2m19.923s

 

Using timing of no more than 5 queries per 60 seconds:

real        3m2.503s

real        3m2.320s

real        2m9.449s

real        2m32.282s

 

Using timing of no more than 5 queries per 59 seconds:

real        2m59.858s

 

Using timing of no more than 20 queries per 50 seconds:

real        3m1.121s

real        2m38.678s

 

Looks like your 20 in 65 seconds is pretty good, which doesn't seem to agree
with

https://www.alphavantage.co/premium/ which says:

 

In certain high-frequency use cases that exceed our standard call-frequency
limit (5 requests per minute), we offer a dedicated, premium API key which
allows various tiers of API calls per minute.

 

Can you please release the new version asap?

 

Can you please also merge
https://github.com/finance-quote/finance-quote/pull/79 

  (yahooJSON.pm returns date 00/00/2000 in Windows)

as this also fixes perl warnings which can cause GnuCash to hang when
multiple quotes (>15) are requested.

 

Regards, Chris Good

 



More information about the gnucash-user mailing list