Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-12 Thread Edward d'Auvergne
On Wed, 12 Feb 2020 at 07:44, Mike Alexander wrote: > On 11 Feb 2020, at 3:59, Edward d'Auvergne wrote: > > F::Q uses this URL for all queries: > > > > https://www.alphavantage.co/query?function=GLOBAL_QUOTE=json=IDRUSD=$MY_KEY > > > > The result I see is: > > > > { > > "Global Quote": { > >

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-11 Thread Mike Alexander
On 11 Feb 2020, at 8:14, Edward d'Auvergne wrote: Although most runs pass, I have noticed that some do not [4]. Have you seen that behaviour or know what might be happening? Sometimes AlphaVantage refuses to return a quote. Right now

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-11 Thread Mike Alexander
On 11 Feb 2020, at 3:59, Edward d'Auvergne wrote: F::Q uses this URL for all queries: https://www.alphavantage.co/query?function=GLOBAL_QUOTE=json=IDRUSD=$MY_KEY The result I see is: { "Global Quote": { "01. symbol": "IDRUSD", "02. open": "0.0001", "03. high":

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-11 Thread Edward d'Auvergne
On Tue, 11 Feb 2020 at 09:59, Edward d'Auvergne wrote: > On Mon, 10 Feb 2020 at 22:28, Mike Alexander wrote: > > By the way, I didn't mean to suggest that we should encourage all users of > > GnuCash to patch F::Q. I still remain hopeful that the maintainers will > > merge my pull request that

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-11 Thread Edward d'Auvergne
On Mon, 10 Feb 2020 at 22:28, Mike Alexander wrote: > On 10 Feb 2020, at 6:27, Edward d'Auvergne wrote: >> I realise that F::Q is broken in some places. As I said, I reported >> an issue. However, as you have seen yourself, the F::Q developers are >> simply non-responsive. I believe that asking

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-10 Thread Mike Alexander
On 10 Feb 2020, at 6:27, Edward d'Auvergne wrote: I realise that F::Q is broken in some places. As I said, I reported an issue. However, as you have seen yourself, the F::Q developers are simply non-responsive. I believe that asking all GnuCash users to manually patch their own

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-10 Thread Edward d'Auvergne
On Sun, 9 Feb 2020 at 23:41, Mike Alexander wrote: > You don't seem to be following what I'm saying. I thought I was ;) > First, the delay when currency quotes exceed the AlphaVantage rate limit is > in Finance::Quote itself, not in any code distributed as part of GnuCash. > You're right

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-09 Thread Mike Alexander
On 9 Feb 2020, at 3:49, Edward d'Auvergne wrote: That sounds like it would work, however I see quite a different behaviour with the debugging (in my first post) and from the code (gnucash/price-quotes.scm and libgnucash/quotes/gnc-fq-helper.in). What I see in both is that for each iteration of

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-09 Thread Edward d'Auvergne
On Fri, 7 Feb 2020 at 05:50, Mike Alexander wrote: > > On 4 Feb 2020, at 6:21, Edward d'Auvergne wrote: > > That's a good point. In the future, F::Q might also be able to > respect the API fetching limits across multiple calls, and then this > would add an additional delay. That could be fixed by

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-07 Thread Mike Alexander
On 4 Feb 2020, at 6:21, Edward d'Auvergne wrote: That's a good point. In the future, F::Q might also be able to respect the API fetching limits across multiple calls, and then this would add an additional delay. That could be fixed by properly timing this while loop. As for sleeping for

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-04 Thread Edward d'Auvergne
On Sun, 19 Jan 2020 at 06:24, David H wrote: > > Mike/Edward, I'm not sure if either of you have seen Vince's posting in > Finance-quote-devel which seems > like he's working on a similar thing? > > Copy below > > Cheers Dave H > > > Hi, > > In June, Erik sent a message about his idea for

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-02-04 Thread Edward d'Auvergne
On Sun, 19 Jan 2020 at 01:51, Mike Alexander wrote: > > I'm glad you're looking at this since it does need some work. However I think > there are a couple of things you're not aware of. I, too, have quite a ffew > currencies in my file (around 30) and by coincidence I was running a price >

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-01-18 Thread David H
Mike/Edward, I'm not sure if either of you have seen Vince's posting in Finance-quote-devel which seems like he's working on a similar thing? Copy below Cheers Dave H Hi, In June, Erik sent a message about his idea for cleaning up the FQ API to have consistent ways to set/get instance

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-01-18 Thread Mike Alexander
I'm glad you're looking at this since it does need some work. However I think there are a couple of things you're not aware of. I, too, have quite a ffew currencies in my file (around 30) and by coincidence I was running a price fetch in the background when I first saw your message. It

Re: [GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-01-18 Thread Mike Alexander
I'm glad you're looking at this since it does need some work. However I think there are a couple of things you're not aware of. I, too, have quite a ffew currencies in my file (around 30) and by coincidence I was running a price fetch in the background when I first saw your message. It

[GNC-dev] Robust error handling and respecting the Apha Vantage API limits in gnc-fq-helper.

2020-01-18 Thread Edward d'Auvergne
Hello, I've decided to tackle an issue that has been bugging me for a couple of years now [1]. I travel a lot so I have accounts currently set up for 45 currencies (and 5 other commodities). Ever since the shift from the Yahoo finance APIs to Alpha Vantage in Finance::Quote, I have had to