Re: [GNC] Finance Quote - Alphavantage Error - Subscribe to Premium

2024-06-21 Thread Bruce Schuck

On 6/22/24 07:31:44 +1000, David H wrote:


It seems Alphavantage have been limiting queries to 25 per day for
the last couple of days?


Days?! It's been more than a few weeks, if not months. I mentioned this 
some time ago. As a matter of fact, the throttling mechanism in the 
AlphaVantage module has been disabled in F::Q v1.62 since AV is no 
longer enforcing a max queries per minute limit.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Discovered install link for Finance Quotes in Win11 app menu, but many questions in install.

2024-06-16 Thread Bruce Schuck

Sun Jun 16 09:53:52 EDT 2024, David G. Pickett wrote:

I clicked the "Install Online Price Retrieval for GnuCash" in my new 
Win11 install, but had manually download install Strawberry perl as 
Norton blocked it.  I clicked it again and it went into a long 
install that now is asking mysterious questions like USE_UNALIGNED or

ZSTD. Shouldn't it run more unattended?
It should. Since I don't primarily use Windows, I'm wondering if 
Strawberry Perl changed the default setting for "use_prompt_default [0]" 
in the CPAN settings. While the Makefile for F::Q does not have a 
prompt, there are dependencies (and dependencies of dependencies) that 
prompt for user input. On a fresh install of Strawberry Perl I noticed 
that launching CPAN for the first time on a Windows 10 system did not go 
through the first time initialization process.


Setting PERL_MM_USE_DEFAULT to "yes" before running CPAN will allow the 
Finance::Quote install to continue without needing user input. At least 
it did for me on Windows 10. I'm thinking the GnuCash team may want to 
set this in the tool that installs Strawberry Perl and F::Q for Windows. 
Probably would not hurt on Linux and Mac either.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] gnucash-user Digest, Vol 254, Issue 46

2024-05-29 Thread Bruce Schuck

On 5/29/24 18:01:33 -0700, John Ralls wrote:


OBTW, I had to force-install 1.62 because
Test Summary Report
---
t/02-pod-coverage.t  (Wstat: 512 Tests: 0 Failed: 0)
   Non-zero exit status: 2
   Parse errors: No plan found in TAP output
Files=67, Tests=83,  5 wallclock secs ( 0.05 usr  0.06 sys +  3.61 cusr  0.60 
csys =  4.32 CPU)
Result: FAIL
Failed 1/67 test programs. 0/83 subtests failed.
make: *** [test_dynamic] Error 255
   BPSCHUCK/Finance-Quote-1.62.tar.gz
   /usr/bin/make test -- NOT OK


John,

Can you do me a favor and update the Perl module Moose? And try a 
reinstall of Finance::Quote.


Thanks.

Bruce
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] YahooJSON Failing Again?

2024-05-29 Thread Bruce Schuck

On 5/29/24 6:01 PM, John Ralls wrote:

Somebody filed https://bugs.gnucash.org/show_bug.cgi?id=799322 
 earlier today so it’s 
not just you. OTOH it might have been a temporary problem:


Thanks John. It just worked for me as well on my work macbook. But I 
hate to say that last time it failed there was some "now it works, now 
it doesn't" before now it doesn't became permanent. 


Odd on the 02-pod test fail. Nothing there has been touched in a few years.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] YahooJSON Failing Again?

2024-05-29 Thread Bruce Schuck
Just started failing for me again this afternoon. The never ending game 
of whack-a-mole continues.


For those having the same issue I suggest:

alphavantage (needs an API key)
twelvedata (needs an API key)

Web page scrapers
googleweb
marketwatch
fool
yahooweb

On the roadmap, you may want to get an api key from 
https://financeapi.net (100 API calls per day limit).


Not sure of the availability of quotes for securities traded on non-US 
exchanges, sorry.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.62 released!

2024-05-16 Thread Bruce Schuck

On Thu May 16 22:22:53 EDT 2024, Adrien Monteleone wrote:

Coding can be fun in many cases, but you seem to find solace in the 
mindbogglingly headache-inducing game of whack-a-mole, to everyone 
else's benefit!


heh-heh. Sometimes it does seem like playing whack-a-mole.

Thank you for the insane amount of effort you put forth on this 
project.


Thanks, but most of the time I'm just a traffic cop / gatekeeper of the 
work done by others. This release for example, Kalpesh Patel worked on 
the fixes for YahooJSON, and created the new currency rate module 
CurrencyFreaks. Paolo Maero wrote the new BorsaItaliana module.



I have yet to use (or profit) from all of it, but even in my limited
exposure, I know that if I ran into a snag, many folks would be
there to guide me along, and not just 'because', but because *you*
make the effort to keep F::Q humming along. Without this project,
many folks would be in quite the 'inedible' pickle.
I've really only been involved in F::Q for about 4 years. Started out 
giving Erik C a hand, and sort of inherited it when he stepped away for 
personal reasons. There have been times I wish he would come back, but 
emails such as yours' are appreciated.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.62 released!

2024-05-16 Thread Bruce Schuck
New version 1.62 of Finance-Quote is available with the following changes:

* Fixed AEX.pm
* Removed throttling from AlphaVantage.pm - Issue #363
* Added CurrencyFreaks.pm - new currency module
* YahooJSON.pm - added more error handling - Issue #390
* Fixed MarketWatch.pm module - Issue #389
* Fool.pm - Rewrote Fool.pm and added back to F::Q. Issue #379.
* New Module! StockData.pm. Methods stockdata, nyse, nasdaq.
* Modified yahooJSON.pm module in order handle EU consent redirects 
better.
  * TwelveData.pm - Added "last" to data being returned
* BorsaItaliana.pm - New module for Borsa Italiana, Italian traded 
bonds using ISIN
* YahooWeb.pm - Issue #377. Modified YahooWeb to account for changes 
from Yahoo.

Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Bruce Schuck 
  - Vincent Lucarelli 
  - David Hampton 
  - jvolkening 
  - Pawel Konieczny 
  - Mike Alexander 
  - AndreJ 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Paul Howarth 
  - Sam Morris 
  - Linas Vepstas 
  - Hiranya Samarasekera 
  - Manuel Friedli 
  - Achim Winkler 
  - Diego Marcolungo 
  - John Haiducek 
  - Rajan Vaswani <111571283+bgr22...@users.noreply.github.com>
  - alex314159 
  - gregor herrmann 
  - Jalon Avens 
  - Sigve Indregard 
  - bgr22112 <111571283+bgr22...@users.noreply.github.com>
  - goodvibes2 
  - Ben Hemming 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - Gabor Szabo 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Joseph Heron 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - Stephan Gambke 
  - linas 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote PreRelease 1.61_03

2024-05-03 Thread Bruce Schuck

On 5/3/24 11:36 AM, Kalpesh Patel wrote:


I looked at Makefile.PL for 1.61 source at CPAN and it does NOT have CPAN
listed in PREREQ_PM or in %FallbackPrereqs. Might be worth adding to it...
Most GnuCash users can (and probably should...) likely ignore this post. 
Any further discussion should be taken offline of the GnuCash user list.


Kalpesh,

Makefile.PL gets created when Dist::Zilla (aka dzil) creates the tarball 
for uploading to CPAN.


Please understand what the prerequisites listed in the GitHub repo 
dist.ini file and package Makefile.PL and META files are. Those are 
modules that the module being installed requires to build, run, and 
test. Technically CPAN is *not* required for that. CPAN (and CPAN Minus) 
is a tool that simplifies the module install process for both novice and 
expert Perl users. One would not be able to execute "cpan 
Finance::Quote" or "perl -MCPAN -e shell" *unless* CPAN were already 
installed. Your suggestion to add it to the module prereqs is the same 
as suggesting that *every* single Perl module on CPAN should have it 
included as a prerequisite.


But that said, either the GnuCash and/or F::Q docs/wiki would probably 
benefit from an overview on how to check if CPAN is installed, and how 
to install CPAN if it is not already installed.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote PreRelease 1.61_03

2024-05-03 Thread Bruce Schuck

On 5/3/24 9:58 AM, John Ralls wrote:

It’s normal for Linux distros to package perl modules. Fedora’s is 
https://packages.fedoraproject.org/pkgs/perl-Finance-Quote/perl-Finance-Quote/

.
Note that there are back ports of 1.61 for Fedoras 38, 39, and 40.


John,

I am well aware of that. In this message yesterday 
(https://lists.gnucash.org/pipermail/gnucash-user/2024-May/111771.html) 
I suggested that Fred install perl-CPAN and also maybe perl-App-cpanminus.


What threw me is one of Fred's earlier comments where he stated
something like "I am now able to get quotes *again*". "Again" being the
operative word, as it sounded like he would have already had F::Q
installed, which typically means CPAN and/or CPAN Minus is already
installed. Or maybe I got mixed up with another response from someone else.

Debian/Ubuntu also package F::Q 
https://packages.ubuntu.com/search?keywords=libfinance-quote-perl 


but are nowhere near as conscientious about keeping up with your
releases so patience won’t work for their users. Keeping out of the
way of the package manager is still a good practice so I think their
users should also point cpan at a user-space directory.


Again, not new to me. My primary desktop at home has been an Ubuntu LTS 
release since 12.04LTS. I've been alternating between in place upgrades 
and doing a fresh install and restoring what I need from backups. And 
the fresh install path means I first have to install the Canonical CPAN 
and CPAN Minus before I install the modules I use regularly. At home I 
go back and forth WRT installing using sudo or using local::lib to 
install modules outside of the normal @INC path. On my work macbook, I 
install all extra modules in directories under $HOME.


I've been around Perl a *long* time. Hell, if you grab the Perl source 
code from Git, I'm in the list of authors...


You're across the bay, one of these days we should meet up for a beer.

Regards,

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote PreRelease 1.61_03

2024-05-03 Thread Bruce Schuck

On May 2, 2024 at 23:44:53 EDT Kalpesh wrote:

That is possible that there is no depend target in the make file. 
Just curious how you built/get the make file for it?


Kalpesh,

The old school method of installing Perl modules.

The makefile is created by running "perl Makefile.PL". Then one would 
execute "make", "make test", and "make install". When I first started 
using Perl, there was no "cpan" or "cpanm" that automated much of the 
process. Fetching prerequisites and installing them is one of the major 
reasons for using cpan/cpanm. It's been such a long time since I had 
used the OG module install method that I forgot that it does not have a 
mechanism for fetching and installing dependencies. Back in the day the 
dependencies were typically noted in the module's README file and one 
had to manually retrieve and install them.


This method is definitely not for Perl novices. These days it's more for 
those who display masochistic tendencies...


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote PreRelease 1.61_03

2024-05-02 Thread Bruce Schuck

On Apr 30, 2024 at 22:59:34 EDT I wrote:

A new module for US traded stocks, StockData.pm, with default method 
"stockdata". This requires an API token from 
https://www.stockdata.org/. If passed in as an environment variable,
set "STOCKDATA_API_KEY" to your token. Once installed "perldoc 
Finance::Quote::StockData" will display more information.
Well that sucks. I originally tested this module this past Sunday. And 
since the US markets are closed weekends, getting data as of COB Friday 
was okay. Testing this week, I've come to find out that their data is at 
least one day old! If you query their API anytime during market business 
hours tomorrow, the data will be as of COB Wednesday 5/1. This is what 
is returns now (19:30PDT 5/2). Sometime after the markets close the data 
from StockData.org will then reflect COB today... 


Their title page does say, "Free Real-time, Intraday, Historical Stock 
Data API". I have attempted to send email and fill out their online 
contact form. No response in 2 days so far.


I'm thinking no one wants a data source that while seemingly dependable, 
is not current data.


Short version, if you've tried the 'stockdata' method and found the data 
to be wrong, please don't bother opening an issue. It's not F::Q or 
GnuCash, it's the source data.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote PreRelease 1.61_03

2024-05-02 Thread Bruce Schuck

On 5/2/24 8:38 AM, Fred Tydeman wrote:


perl -MCPAN -e shell
gets
Can't locate CPAN.pm



This is Fedora Linux 40 (the most recent)


I find it odd that your system *ever* had Finance::Quote installed, as 
the GnuCash utility to install the F::Q module depends on CPAN. Which 
also explains why the module ExtUtils::MakeMaker didn't exist since I 
believe it is a dependency of CPAN.


You should probably install perl-CPAN (this should give you the "cpan" 
executable) and perl-App-cpanminus (this should supply the "cpanm" 
excutable). I haven't used a Fedora system in ages, so I'm not sure if 
those are available from the standard Fedora repos, or if you need to 
add the EPEL repository.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote PreRelease 1.61_03

2024-05-01 Thread Bruce Schuck

On 5/1/24 7:39 PM, Fred Tydeman wrote:


On my Linux systems, after some searching, I found that I needed: dnf
install perl-ExtUtils-MakeMake* to get me started. Running perl 
Makefile.PL got me several warnings of other missing perl files. 
After doing a bunch of dnf install perl-... for them, 'make' and 
'make test' ran But, 'make install' failed due to permission issues. 
Does it need 'su' to do the install?


People not familiar with the "manual" method of installing should use
cpan or cpanm. To install an interim release

"cpanm BPSCHUCK/Finance-Quote-1.61_03.tar.gz" or "cpan
BPSCHUCK/Finance-Quote-1.61_03.tar.gz".

Depending how cpan(m) is configured, super user permissions may or may
not be required. Typically when running cpan or cpanm, the install
process will ask for the user's sudo password to install modules.

When I would install using the "perl Makefile.PL; make; make test; make
install" steps, I would become root or use sudo to execute "make
install". But again, most people should utilize cpan or cpanm. The
install tool provided by GnuCash utilizes CPAN.

There is a brief overview of installing modules at
https://www.cpan.org/modules/INSTALL.html which doesn't mention the
legacy "perl Makefile.PL" method. As I mentioned in my post though, "For 
those who are comfortable with the interim releases". Comfortable being 
the operative word.


Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote PreRelease 1.61_03

2024-05-01 Thread Bruce Schuck

On 5/1/24 7:25 AM PDT, Fred Tydeman wrote:


Can I apply this update to my older 4.14 Gnucash system on Linux?


Yes, recent and current releases of Finance::Quote are backwards 
compatible WRT to GnuCash. As a matter of fact I run GnuCash 4.8 on my 
primary Linux desktop at home and 4.8 on my OSX Catalina Macbook.


On 5/1/24 6:32 AM PDT, Fross, Michael wrote:

> Thanks Bruce.  I love the fact that you release updates as you and the
> team make fixes, and not wait for a larger rollup.  Much appreciated.

On 5/1/24 7:17 AM PDT, James Williams wrote:

> Thank-you for all your hard work on this, Bruce!

Much appreciated. I hope to get F::Q v1.62 done and uploaded to CPAN by 
the end of next week (May 11 or 12 give or take a couple days).


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote PreRelease 1.61_03

2024-04-30 Thread Bruce Schuck
A few more fixes and additions to Finance::Quote. For those who are 
comfortable with the interim releases, 1.61_03 has been uploaded to CPAN.


https://www.cpan.org/modules/by-authors/id/B/BP/BPSCHUCK/Finance-Quote-1.61_03.tar.gz

Or just "BPSCHUCK/Finance-Quote-1.61_03.tar.gz" when installing via 
"cpan" or "cpanm".


The Fool.pm module has been fixed (but like Yahoo, who knows for how 
long?), method "fool". For the time being, only returns data for 
securities on NYSE, Nasdaq, and OTC exchanges.


A new module for US traded stocks, StockData.pm, with default method 
"stockdata". This requires an API token from https://www.stockdata.org/. 
If passed in as an environment variable, set "STOCKDATA_API_KEY" to your 
token. Once installed "perldoc Finance::Quote::StockData" will display 
more information.


I also discovered that the TwelveData module was not working because the 
method "twelvedata" was not returning a value for price or last. This is 
another module that requires an API, this one from 
https://twelvedata.com/. Set environment variable "TWELVEDATA_API_KEY" 
to your token. Once installed "perldoc Finance::Quote::TwelveData" will 
display more information.


Regards,

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.61 released!

2024-04-28 Thread Bruce Schuck

On 4/28/24 06:28, Klaus Dahlke wrote:


It took a while to figure out why yahoo_json didn't work. When trying
to fetch the cookie from fc.yahoo.com the response was 'connection
refused', also when trying to connect via browser. In the end it
turned out that pihole blocked fc.yahoo.com. Once I added
fc.yahoo.com to the whitelist in pihole, yahoo_json works as
designed.


Klaus,

Thank you for that update. The YahooJSON.pm module needs to add some 
error handling for when either of the first two URL fetches fail or 
return an unexpected response. Sorry I missed that in reviewing recent 
updates.


Bruce S


OpenPGP_signature.asc
Description: OpenPGP digital signature
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote on a Mac with a foreign perl

2024-04-27 Thread Bruce Schuck

On Sat Apr 27, 2024 at 21:13:22 Mr. Ralls wrote:

I just remembered a third case that's probably the same problem: 
https://bugs.gnucash.org/show_bug.cgi?id=799195 complained that it 
took 15 minutes to install the F::Q dependencies and the attempt 
ultimately failed because SSLeay failed its unit tests.


I concur. I also have some agreement with Mr. Williams who opened that 
bug. While I understand doing the quote retrieval natively in GnuCash 
would be problematic for how much they need to be changed (especially 
recently), I am at least slightly surprised there hasn't been an effort 
to replace F::Q with something written in Python or another language.



macOS is macOS. They don't change anything for the hardware, not
even the build: Everything in the OS is universal binaries with
x86_64 snd arm64. It's possible that Xcode/command-line tools adds
stuff to /System/Library/Perl/Extras, but the user said he has both 
installed. I've asked him about what year MBA and what version of 
macOS. Perhaps there's a clue there.


I get the macOS is macOS thing. But I've ended up down too many rabbit 
holes because of assumptions that turned out wrong. I would find it odd 
that XCode would know to add stuff for Perl, but again, I don't want to 
assume it doesn't.


As for XCode command line tools being installed, I would think if they 
were, then wouldn't the libssl header files that the user's cpan output 
indicated were missing *not* be missing? It's been a while since I 
installed Xcode and the extra XCode bits on either of the Macs in my 
possession.


Take care sir. I think it's time for my scotch nightcap.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote Pre-Release 1.61_02 Uploaded to CPAN

2024-04-27 Thread Bruce Schuck

Earlier, I wrote:


Another option for retrieving US quotes is MarketWatch. No API key
needed.
And... scratch that. They must have recently made changes as I 
successfully tested this method 2 or 3 days ago.


1 gets fixed, 2 no longer work. Aggravating as all hell.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote Pre-Release 1.61_02 Uploaded to CPAN

2024-04-27 Thread Bruce Schuck

Greetings,

Finance::Quote v1.61_02 has been uploaded to CPAN.

Changes since 1.61

* Modified yahooJSON.pm module in order handle EU consent redirects better.

* TwelveData.pm - Added "last" to data being returned. The method 
"twelvedata" was returning a value for "close". GnuCash expects "last" 
or "price" in order to utilize the quote data.


* BorsaItaliana.pm - New module for Borsa Italiana, Italian traded bonds 
using ISIN


* YahooWeb.pm - Issue #377. Modified YahooWeb to account for changes 
from Yahoo.


Using cpan or cpanm, install "BPSCHUCK/Finance-Quote-1.61_02.tar.gz".

TwelveData has data for US and foreign exchanges. It does require an API 
key from https://twelvedata.com/.


Another option for retrieving US quotes is MarketWatch. No API key needed.

I'm still trying to resurrect the Fool module. But hit another wall when 
getting "too many requests" after only a half dozen requests. Even when 
spaced out at 20 seconds per request.


Thank you.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote on a Mac with a foreign perl

2024-04-27 Thread Bruce Schuck

On Fri Apr 26, 2024, at 12:07:04 EDT Mr Ralls wrote:

Here's an example of a failed session with Homebrew interference: 
https://paste.jvnv.net/view/CcsOd This comes from an IRC discussion 
at https://code.gnucash.org/logs/2024/04/16.html#T06:46:33. There

was an earlier exchange with another longer dump that implicated
Homebrew in which I told the user to clean it out but gncbot was
apparently offline when that occurred and I don't have a link to it.
In the dump you can see that the user is invoking gnc-fq-update and
that it's running /usr/bin/perl. Later at line 97 you can see that 
/System/Library/Perl/Extras/5.34 is missing from @INC. That's where 
the pre-built networking modules are.


John,

That is indeed odd. I have two Macbook Pros. One Intel based running OSX 
Catalina (It's a 2016 model), and a fairly new M1 running OSX Ventura. 
Both have HomeBrew's Perl installed along side the Apple bundled Perl. 
"Perl -V" does include "/System/Library/Perl/Extras/5.XX" on both 
(Catalina is 5.18, Ventura is 5.30). "@INC" in Perl is compiled. 
Installation of the HomeBrew Perl should in no way affect the value of 
@INC in the OSX bundled Perl. Most people wanting to modify @INC do so 
by a number of ways. Setting PERL5LIB, adding "-I" when 
executing Perl, or adding something like "use lib '/home/foobar/code';" 
to the Perl code are some examples.


As Vince showed, the HomeBrew Perl typically installs its modules under 
the $HOME/perl5 path, or as I see on my Ventura Mac, /opt/homebrew/Cellar/.


From the command line prompt in the session, it appears the user having 
the issue is on a MacBook Air. I wonder if the included version of Perl 
is not the same as what gets installed on a MacBook?


I'd be curious to see the output of this find command from that user's Mac.

find /Library/Perl /System/Library/Perl -path '*/Net/*' -type f -name 
'SSLeay.pm'


Or more simply, does /System/Library/Perl/Extras exist on the user's 
MacBook Air?


That path may not be in the system Perl's @INC, because it's not part of 
the Apple Perl package.


Bruce S

P.S. My older Intel based Mac actually has 3 separate Perls installed. 
The third being one built from source where the paths in @INC are all 
under /usr/local/bpsperl/.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote 1.61_01 - YahooWeb

2024-04-21 Thread Bruce Schuck
For those who were using the 'yahooweb' quote source, I rewrote the 
module to parse the new format being returned by Yahoo. And I hope to 
avoid the "header too large" error.


A trial release has been uploaded to CPAN.

It can be installed with:

cpan BPSCHUCK/Finance-Quote-1.61_01.tar.gz

or

cpanm BPSCHUCK/Finance-Quote-1.61_01.tar.gz

Hope this helps.

The next module on my hit list is Fool.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.61 released!

2024-04-19 Thread Bruce Schuck

On 4/19/24 9:52 AM, Murugan Muruganandam wrote:


Bruce and team, thanks for the build


It was Kalpesh that spent time looking for different Yahoo URIs and 
standing up AWS instances in other regions for testing. Me, I just did 
the administrative work to get the new package pushed to CPAN.



I think i was using yahooweb and yahoojson


With 1.60, and now 1.61, "yahoojson" is sort of an alias for 
"yahoo_json". It uses the same method within the YahooJSON.pm source module.


The "yahooweb" issue of the header being too large has not yet been 
addressed. Aside from adding code to allow the large amount of header 
information sent from the URL used, the HTML/CSS also changed recently.



now it is working perfectly


With "Yahoo!" I hate to ask, "but for how long?"... 

Thank you.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.61 released!

2024-04-19 Thread Bruce Schuck

Adam Griffis also noted that it is working from Germany.

I suspect that you set PERL5LIB to use 
$HOME/.cpan/build/Finance-Quote-1.60-0/ instead of 1.61?

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.61 released!

2024-04-18 Thread Bruce Schuck
New version 1.61 of Finance-Quote is available with the following changes:

* SIX.pm - Changed lookup for currency, added lookups for symbol and 
last. Issue #380
* YahooJSON.pm - URLs to retrieve required cookies and crumbs were 
changed to allow EU based users to use the module. Issue #373

Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Bruce Schuck 
  - Vincent Lucarelli 
  - David Hampton 
  - jvolkening 
  - Pawel Konieczny 
  - Mike Alexander 
  - AndreJ 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Paul Howarth 
  - Sam Morris 
  - Linas Vepstas 
  - Hiranya Samarasekera 
  - Manuel Friedli 
  - Achim Winkler 
  - Diego Marcolungo 
  - John Haiducek 
  - Rajan Vaswani <111571283+bgr22...@users.noreply.github.com>
  - alex314159 
  - gregor herrmann 
  - Jalon Avens 
  - Sigve Indregard 
  - bgr22112 <111571283+bgr22...@users.noreply.github.com>
  - goodvibes2 
  - Ben Hemming 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - Gabor Szabo 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Joseph Heron 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - Stephan Gambke 
  - linas 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Bruce Schuck

On Thu, 18 Apr 2024 16:13:34 +0200, Klaus writes:


I am located in Germany and only one cookie is returned. Here is the
top of the output of 'curl --include https://login.yahoo.com':


Klaus,

Thank you for posting that. It helps confirm this is a geo related issue.

Thank you to David Crowe for pointing out 
https://developer.yahooinc.com/datax/guide/gdpr/cookiemapping/ on 
https://github.com/finance-quote/finance-quote/issues/373. I suspect 
GDPR compliance is related to the YahooJSON issue.


Additional testing did indicate that the module does work from an 
Albanian IP address. I guess while this is being researched, users with 
EU IP addresses can not use the 'yahoo_json' quote method.


I believe Kalpesh is going to stand up an AWS EC2 instance in an EU 
region for further investigation. Very much appreciated.


Bruce S

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-18 Thread Bruce Schuck

On 4/18/24 06:55, Kalpesh Patel wrote:


Any ways it definitely appears to be tied to geo location. Another
gentleman out of Germany is NOT getting those cookies either.


Confirmed by the user in Spain I have been working with off-list.  
The same user receives the necessary cookies when using a VPN that gives 
him a US based IP address. Over that VPN, F::Q and GnuCash return valid 
price data.



I'll see if I can spin up EC2 in different regions to build the trend
and then propose changes to the module that could accommodate both
sides. I need to confirm if subtle changes to the URI is also geo
based or not to make it logic work better.


I also had the gentleman in Spain try 
"https://login.yahoo.com/config/login; with the same results.


Waiting to see if 
"https://login.yahoo.com/?.lang=en-US=finance&.done=https%3A%2F%2Ffinance.yahoo.com%2F=118332=ybar-signin; 
from his location yields a different result.


Thanks again.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Bruce Schuck

On 4/17/24 11:57 AM, Kalpesh Patel wrote:

You can also save cookies to a file named cookies.txt as follows: 
#curl -c cookies.txt https://login.yahoo.com -I


Some info: The user having issues with YahooJSON that I've been having a 
discussion with tried the simple curl command. Just *one* cookie is 
returned from https://login.yahoo.com/. I've tried it on 5 different 
systems in 3 different places (work, home, a FreeBSD server in NYC I 
have access to) and curl returns 4 cookies.


The user having an issue is in Europe, I believe Spain. Maybe this is a 
geo based issue? Just guessing.


On a side note about the "-I/--head" option to curl. It doesn't happen 
often but some websites disallow the HEAD fetch method. Which is why I 
default to using "-i/--include".


On a better note (I won't say good), I have identified how to get the 
YahooWeb and Fool modules to work. Notes are added to the issues 
(https://github.com/finance-quote/finance-quote/issues/379 and 
https://github.com/finance-quote/finance-quote/issues/377) if someone 
wants to work on pull requests to address those before I get a chance to.


Thank you.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Bruce Schuck

On 4/17/24 11:57 AM, Kalpesh Patel wrote:

You can also save cookies to a file named cookies.txt as follows: 
#curl -c cookies.txt https://login.yahoo.com -I



and then following to display 11 characters crumb by using cookies
saved in previous command: #curl -H "user-agent: Mozilla/5.0
(Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/39.0.2171.95 Safari/537.3" -b cookies.txt
https://query2.finance.yahoo.com/v1/test/getcrumb


I'm not interested in saving the cookies at this time. I've been having 
a discussion with another user having the same (or similar) issue. In 
debug mode his cookie jar has only 1 cookie, the "AS=v=1=..." cookie.


### [Wed Apr 17 08:59:30 2024]cookie_jar : bless( {
### COOKIES => {
### 'login.yahoo.com' => {
### '/' => {
### AS => [
### 0,
### 
'v=1=pdMraThU=A6620c4d1|itU7Kpb.2SoujXrNK8pQPMi...

### undef,
### 1,
### 1,
### undef,
### 1,
### {
### HttpOnly => undef
### }
### ]
### }
### }
### }
### }, 'HTTP::Cookies' )

The other 3 cookies that I get can see in debug mode are not in the 
cookie jar. My theory is that for those it is not working, they are not 
getting all 4 cookies.


Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.60 released!

2024-04-17 Thread Bruce Schuck

Wed Apr 17 11:58:37 EDT 2024, Kalpesh Patel writes:


Is this happening on Windows 10 with Strawberry perl?


There is one other user is having problem getting secure cookies on 
Windows 10 which is what this appears to be as well. It is related to

some Perl's SSL package being broken or not installed correctly but
haven't been able to pinpoint it.


Wednesday, April 17, 2024 5:44 AM, Richard Ullger writes:

yahoojson and yahooweb are not working for me either in v1.60 and 
they didn't work in 1.59_01.
WRT "yahooweb", Yahoo made changes to their finance pages. The URL used 
for the web scrape, aside from some formatting changes that break the 
module, also returns a huge amount of header information (over 16k bytes 
when I fetch it using curl). While I have a fix for the large amount of 
header information, work needs to be done to change the parsing to 
retrieve the data (see 
https://github.com/finance-quote/finance-quote/issues/377).


WRT "yahoo_json" (which now allows it to be called "yahoojson"), some 
users are reporting the same. Turning debug on within Perl has so far 
indicated that not all the required cookies are being returned.


From using "curl" the following cookies should be retrieved:

AS=v=...

A1=d=...

A3=d=...

A1S=d=...

From one user, it looks like only the "AS=v=..." cookie is returned.

Those having the same issue as Richard, please execute "curl --head 
https://login.yahoo.com; or "curl --include https://login.yahoo.com; and 
look for the "set-cookie:" lines in the header.


Here is a way to test outside of GnuCash on Linux and Mac. Utilizes 
cached package source left behind from install using "cpan".


# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:Ubuntu 22.04.4 LTS
Release:22.04
Codename:   jammy

# If you have installed 1.60 more than once (perhaps different
# library paths), 1.60-0 may be 1.60-1 or 1.60-2, or ...
cd $HOME/.cpan/build/Finance-Quote-1.60-0
export PERL5LIB=$HOME/.cpan/build/Finance-Quote-1.60-0/lib:$PERL5LIB
./Examples/stockdump.pl yahoo_json AAPL
$VAR1 = {
  'AAPLlow' => '168.27',
  'AAPLopen' => '171.71',
  'AAPLsymbol' => 'AAPL',
  'AAPLeps' => '6.42',
  'AAPLvolume' => 58572152,
  'AAPLisodate' => '2024-04-16',
  'AAPLname' => 'AAPL (Apple Inc.)',
  'AAPLdiv_yield' => '0.5501187',
  'AAPLcurrency' => 'USD',
  'AAPLdate' => '04/16/2024',
  'AAPLhigh' => '173.755',
  'AAPLtype' => 'EQUITY',
  'AAPLpe' => '26.457943',
  'AAPLlast' => '169.86',
  'AAPLyear_range' => '   162.8 - 199.62',
  'AAPLexchange' => 'NasdaqGS',
  'AAPLsuccess' => 1,
  'AAPLclose' => '172.69',
  'AAPLmethod' => 'yahoo_json'
};

You can output debugging information by adding "DEBUG=1" before 
executing the stockdump.pl script.


$ DEBUG=1 ./Examples/stockdump.pl yahoo_json AAPL

For those still having an issue with v1.60, my guess is that you will 
find the "AS=" cookie in the debug output.


As Kalpesh theorized, the issue could lie within another Perl 
module/package.


On Wed, 17 Apr 2024 08:23:38 +0200, Adam Griffis writes:

> However, YahooJSON is still giving me the same error. Is an API key
> required for YahooJSON now?

No, Yahoo is not requiring an API Key.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] How to get mutual fund quotes with Finance::Quote::GoogleWeb.pm

2024-04-15 Thread Bruce Schuck

On Mon Apr 15, 2024 22:02 EDT, Ken Farley wrote:


Once I sent the last message and had a bit of time to think about
it, I realized I could try something, and it worked.


There's a line in the module that uses a few exchange names to find 
the correct data on the HTML page:
What version of F::Q did you have? Getting mutual funds was fixed in 
GoogleWeb in v1.59 released 12/31/2023. So you have (unless you updated 
since your post) either v1.58 or v1.57 (the release when GoogleWeb.pm 
was added to F::Q).


Bruce S

P.S - It's always helpful to include the software versions when asking 
about a possible issue.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.60 released!

2024-04-15 Thread Bruce Schuck
New version 1.60 of Finance-Quote is available with the following changes:

* Removed not working modules. Issues #346, #366, and #368.
Fidelity.pm, Cdbfundlibrary.com, Fundata.pm, and Fool.pm.
* YahooJSON.pm - Added code to retrieve cookies and a "crumb" required
to continue to utilize the v11 API. Issue #369.
The YahooJSON.pm currency module was changed to use the v8 API.
* Added initial version of CONTRIBUTING.pod that metacpan.org utilizes.
It will completely replace the Hacker's Guide in the future.
* Bloomberg.pm - Changed module to extract data from JSON structure 
embedded within the HTML - Issue #360
* NSEIndia.pm - Eliminated need to use temp folders by storing file 
data from URL into a variable.


Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Bruce Schuck 
  - Vincent Lucarelli 
  - David Hampton 
  - jvolkening 
  - Pawel Konieczny 
  - Mike Alexander 
  - AndreJ 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Paul Howarth 
  - Sam Morris 
  - Linas Vepstas 
  - Hiranya Samarasekera 
  - Manuel Friedli 
  - Achim Winkler 
  - Diego Marcolungo 
  - John Haiducek 
  - Rajan Vaswani <111571283+bgr22...@users.noreply.github.com>
  - alex314159 
  - gregor herrmann 
  - Jalon Avens 
  - Sigve Indregard 
  - bgr22112 <111571283+bgr22...@users.noreply.github.com>
  - goodvibes2 
  - Ben Hemming 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - Gabor Szabo 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Joseph Heron 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - Stephan Gambke 
  - linas 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance Quotes Yahoo off the rails again?

2024-04-14 Thread Bruce Schuck

On 4/14/24 3:02 PM, David Reiser wrote:


yahoo_json not YahooJSON


Yeah... I've made that mistake myself many times. The original author of 
the YahooJSON module chose to name the method (aka subroutine with the 
name used in the Security Editor and on the command line) "yahoo_json". 
Most other modules, the main method has the same name as the module 
except all lower case. I probably should add to the method hash so both 
'yahoo_json' and 'yahoojson' work.


Oh yeah, I'm assuming it's working now that you used the method name?

Bruce S


OpenPGP_0xFBCD3E088F8FA737.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance Quotes Yahoo off the rails again?

2024-04-14 Thread Bruce Schuck

On 4/13/24 20:08:20 -0700, Bruce S wrote:


There is some miscellaneous housekeeping and cleanup that needs to be
done before pushing a final release to CPAN. Plus I had some other
changes that I was planning for v1.60 but haven't done yet. Instead of
v1.60, I may upload v1.59_01 tomorrow so people can at least fetch the
fix for YahooJSON before v1.60 is uploaded and indexed by CPAN.


Pre-release F::Q v1.59_01 has been uploaded to CPAN.

To install using cpan or cpanm you must specify the path.

cpan> install BPSCHUCK/Finance-Quote-1.59_01.tar.gz

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance Quotes Yahoo off the rails again?

2024-04-13 Thread Bruce Schuck

Just a quick status.

Just an FYI, I have worked on getting a PR ready using kalpesh Patel's 
changes. I tried applying the same logic to the 
CurrencyRates/YahooJSON.pm currency module with no luck. In that case I 
quickly modified the currency module to utilize the "v8" API. I admit, I 
suck at using the developer tool/console in Chrome and Firefox to figure 
out the magic sauce needed. Big thanks to Mr. Patel on this one.


There is some miscellaneous housekeeping and cleanup that needs to be 
done before pushing a final release to CPAN. Plus I had some other 
changes that I was planning for v1.60 but haven't done yet. Instead of 
v1.60, I may upload v1.59_01 tomorrow so people can at least fetch the 
fix for YahooJSON before v1.60 is uploaded and indexed by CPAN.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::quote YahooJSON

2024-04-11 Thread Bruce Schuck

On 4/11/24 17:29:59 +, Greg wrote:

I'm sure the Dev's are working on it, but do we have any idea what 
happened?  My log shows 401 type errors (Unauthorized) so I thought 
I'd add some diagnostics in case it helps anyone.



Hoping for some good news (and I'm sure I'm not alone on that).



I really appreciate this great working mail list and thanks for those
who devlop/fix/maintain the program.


It's important to note that these APIs are likely not meant for direct
access. Which is why the previous APIs that the YahooJSON.pm all became
unusable at some point. This would be why you cannot find official
documentation for the APIs online like you can for APIs like the 
AlphaVantage which limits what you can retrieve for free.


I've had less time to work on F::Q the last few months, so I'm not sure
when I'll be able to either rework the module to use the v8 API or test
and implement Kalpesh Patel's changes. Hopefully in the next week or so, 
but if someone else wants to step up and create a pull request at 
https://github.com/finance-quote/finance-quote that would be a great help.


On 4/11/24 12:48:09 -0600 (MDT), Terrence Branscombe wrote:

I've just noticed that my last stock price update occurred on March 
28. * 11:11:36 ERROR  [parse_quotesource_error()] 


Unrecognized Finance::Quote Error Wide character in subroutine entry 
at C:/Strawberry/perl/site/lib/Finance/Quote/Cdnfundlibrary.pm line

80.
It appears the format of page Cdnfundlibrary.pm uses to scrape the data 
from fundlibrary.com has had major changes. The Fundata.pm module 
(idata.fundata.com) has also stopped working for the same reason. See 
Issue https://github.com/finance-quote/finance-quote/issues/366 and 
discussion https://github.com/finance-quote/finance-quote/discussions/364.


Unfortunately both modules are likely going to be disabled and then 
removed from Finance::Quote. The Fool.pm module has also recently 
stopped working and it will also be disabled in the next release of F::Q.


Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::quote YahooJSON

2024-04-10 Thread Bruce Schuck

Wed Apr 10 16:12:21 EDT 2024 Jacob Larsen wrote:

Did something happen to the YahooJSON module in Finance::Quote? Or 
perhaps more likely the Yahoo API? I get this now, using 
Finance::Quote version 1.59:


Unfortunately Yahoo once again made some changes with respect to the API 
URLs. F::Q team is aware and an issue has been opened, but so far no 
determination if it can be corrected or when. For now the best 
suggestion is to select a different source.


Regards,

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] gnucash-devel list down?

2024-04-07 Thread Bruce Schuck
Odd, after sending a message to the gnucash-devel list early this 
morning, I received an email saying my message was in a queue because 
I'm not subscribed. Odd, I've been subscribed for at least a handful of 
years.


I also notice that it does not show up in the list of lists at 
https://lists.gnucash.org/mailman/listinfo. At least I *think* I 
remember it would be listed.


Is the gnucash-devel list down? Or have I somehow become unsubscribed?

Thanks.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote::Fool

2024-04-07 Thread Bruce Schuck
Just an FYI. It appears that the Fool module (quote method/source 
"fool") has stopped working in the last week or so. I've spent some time 
investigating if it would be an easy fix, but no luck.


Sorry.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance Quotes Yahoo off the rails again?

2024-04-05 Thread Bruce Schuck

On 4/5/24 8:50 AM, David G. Pickett wrote:

The quotes were fetched despite these usual errors, so it is only a 
cosmetic error.



 > 2024-04-03 23:45:06 Removed any lck, adding price quotes
 > flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get --
 > /home/dgp/GnuCash/ubuntu-DGPickett.gnucash
 > F: X11 socket /tmp/.X11-unix/X0 does not exist in filesystem, 

trying to

 > use abstract socket instead.

 > ** (process:102885): WARNING **: 23:45:07.118: Failed to connect 

to bus:

 > Could not connect: Connection refused
 > Found Finance::Quote version 1.59.

This error is from Flatpak. Could be related to this thread:

https://github.com/flatpak/flatpak/issues/938



Possibly. I noticed this in the GnuCash technical reference 
(https://gnucash.org/docs/v5/C/gnucash-manual.pdf):


=
On Linux if there is no graphic session that has already started the 
dbus, running on your
computer at the time of the quote request, you must do the entry as 
follows instead:


0 16 * * 5 env `dbus-launch` sh -c 'trap "kill $DBUS_SESSION_BUS_PID" EXIT;
gnucash-cli --quotes get ${HOME}/gnucash-filename > /dev/null 2>&1
=

For *its and giggles, change the time of your cron job to an hour or so 
before or after 23:45.


Still, I have not been able to duplicate the issue on an Ubuntu 22.04 
virtual machine (VirtualBox) and the current stable Flatpak GnuCash 5.6 
(Build ID: Flathub 5.6-1). I'm running the update every hour.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance Quotes Yahoo off the rails again?

2024-04-04 Thread Bruce Schuck

On 4/4/24 4:02 PM, David G. Pickett wrote:

Ran OK for me last night, 28 seconds, but running too often seems to 
create errors:


2024-04-03 23:45:01 Start GnuCash_price_cron 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucash 




2024-04-03 23:45:01 Killing gnucash hard



2024-04-03 23:45:06 Removed any lck, adding price quotes
flatpak run --command=gnucash-cli org.gnucash.GnuCash --quotes get -- 
/home/dgp/GnuCash/ubuntu-DGPickett.gnucash
F: X11 socket /tmp/.X11-unix/X0 does not exist in filesystem, trying to 
use abstract socket instead.


** (process:102885): WARNING **: 23:45:07.118: Failed to connect to bus: 
Could not connect: Connection refused

Found Finance::Quote version 1.59.


This error is from Flatpak. Could be related to this thread:

https://github.com/flatpak/flatpak/issues/938

Since GnuCash is running within a Flatpak, I would first address the 
Flatpak issue. As I suggested in my earlier responses, the problem is 
likely something else with your configuration. Seeing this Flatpak issue 
makes that belief stronger.


I'm curious if you don't have some sort of tmpwatch process removing 
/tmp/.X11-unix or files and directories underneath it. I could imagine 
if it gets removed while the Flatpak is running that strange issues 
could arise.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance Quotes Yahoo off the rails again?

2024-04-03 Thread Bruce Schuck

Wed Apr 3 13:40:48 EDT 2024 David G. Pickett wrote:

Looks good, (only error because I need to switch DIA back to yahoo) 
and slow but much better.  A later run under cron got lots of

errors. Do they ration by IP address? If it is by frequency, maybe we
should purposely send requests only every 10 seconds to simulate a
human user?  It cannot make it much slower.
I've been meaning to ask how many securities are you attempting to get 
prices for?


Early on in this thread I called out the "500" responses. A "500" 
typically gets returned from a web page if the site has an issue. When 
Yahoo turned off the previous APIs F::Q was using, the HTTP response was 
one of the "40?" that would be expected.


With no one else reporting the same issue my sense is that your errors 
are the result of something on your end. I also use YahooJSON, and a 
cron job fired every weekday at 13:30 Pacific time (16:30 Eastern) 
updates about 20 securities in less than 15 seconds. My log from today's 
(04/03/2024) run:


=
gnc-get-quote.sh start: Wed Apr  3 01:30:01 PM PDT 2024
DATAFILE: /home/bschuck/Documents/bschuck.gnucash
BKUPFILE: /home/bschuck/Documents/bschuck.gnucash.20240403133001.gnucash
Found Finance::Quote version 1.59.
gz_thread_func EOF
gnc-get-quote.sh completed: Wed Apr  3 01:30:13 PM PDT 2024
=

I would not be surprised if you have a sufficiently large number of 
securities that Yahoo has mechanisms in place to detect and block/limit 
further lookups.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote Default Currency Module

2024-04-01 Thread Bruce Schuck

On 3/31/24 16:46:44 -0700, Jim DeLaHunt wrote:


I'm getting ready to release Finance::Quote v1.60 to CPAN. It
appears that AlphaVantage has again changed how they deal with
throttling for requests using the free API keys/tokens. This has
affected some users that may have data that requires doing more
than a handful of currency exchange calculations.


Is there any written description of what throttling behaviour F::Q 
observes from AlphaVantage?


No. But the code currently throttles queries to 5 per minute. In the 
past AlphaVantage would return a message indicating that one has reached 
a limit of some number of queries in a minute. I've done some testing in 
the past week or so and that is no longer the case. But, the free API 
key is limited to 25 queries per day.



I have an AlphaVantage API key registered in GnuCash's settings. I
have about four currencies and 10-20 stocks, mutual funds, and ETFs
which get price updates through my daily GnuCash "Get Quotes"
regimen. Is this "more than a handful" of currency exchange
calculations? Will I be one of the users affected by the throttling?


I believe the currency calculation typically does not happen for each 
stock query unless the pricing is a currency that needs to be converted 
to match a user's default currency. Item to note here is that AV does 
not differentiate between stock price lookup and currency conversion 
lookup. Each lookup is counted towards the daily limit.



Is the proposed change only for looking up currency exchange rates,
so does not affect lookup of securities prices?


No.


What is the difference to a consumer like me of F::Q getting the
data from YahooJSON rather than from AlphaVantage?


No difference at all. I think a benefit of changing the default to 
YahooJSON is that user's would not be forced to get an AV API Key even 
if they don't have securities using AlphaVantage for the data source.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote Fidelity Module

2024-03-30 Thread Bruce Schuck
Fidelity has reworked their web pages sometime last year, breaking the 
Fidelity.pm module (fidelity method). I've done some digging using the 
Chrome/Firefox developer console and I'm not an expert but I think much 
of data now displayed comes through JavaScript calls. Unfortunately, it 
is likely being removed from F::Q in v1.60.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote Default Currency Module

2024-03-30 Thread Bruce Schuck

Hello all,

I'm getting ready to release Finance::Quote v1.60 to CPAN. It appears 
that AlphaVantage has again changed how they deal with throttling for 
requests using the free API keys/tokens. This has affected some users 
that may have data that requires doing more than a handful of currency 
exchange calculations.


While the currency module used can be changed using the FQ_CURRENCY 
environment variable, I have been asked to change the default to 
YahooJSON instead of AlphaVantage.


Before I make such a change I wanted to get a general consensus from the 
GnuCash users.


Thank you.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance Quotes Yahho of the rails again?

2024-03-23 Thread Bruce Schuck

On Fri, 22 Mar 2024 16:07:40 + (UTC) David G. Pickett wrote:


Found Finance::Quote version 1.58.* 00:49:23? WARN
 [GncQuotesImpl::parse_one_quote()] Skipped
NYSE:VZ - Finance::Quote returned fetch failure.Reason Error retrieving
quote for VZ. Attempt to fetch the 
URLhttps://query2.finance.yahoo.com/v11/finance/quoteSummary/?symbol=VZ=price,summaryDetail,defaultKeyStatistics
  resulted in HTTP response 500 (Internal Server Error)* 00:49:23? WARN
 [GncQuotesImpl::parse_one_quote()] Skipped
NYSE:T - Finance::Quote returned fetch failure.


The "500 (Internal Server Error)" indicates that Yahoo was having 
issues. When the APIs have become unusable in the past the HTTP response 
code has usually been a 401 or another 40X response code.


BTW - F::Q 1.59 is the current release.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.59 released!

2023-12-31 Thread Bruce Schuck
New version 1.59 of Finance-Quote is available with the following changes:

* Fixed XETRA, Tradegate and SInvestor after webpage was restructured - 
Issue #350
* Fidelity.pm temporarily disabled - Issue #346
* Finanzpartner.pm - Fix scraper, did not work if quote was higher than 
the previous day's quote.
* GoogleWeb.pm - Updated to retrieve mutual fund and BATS prices - 
Issue #355
* BSEIndia.pm - Updated to use standardized data file at URL
  
https://www.bseindia.com/download/BhavCopy/Equity/BSE_EQ_BHAVCOPY_{DDMM}.ZIP
  Eliminated need to use temp folders by storing standardized file data 
from URL into a variable.
  Updated names of source fields to conform to those in the 
standardized data file
* IndiaMutual.pm - Eliminated need to use temp folders by storing nav 
file data from URL into a variable.
* TMX.pm - Correct a self-reference in documentation - PR #345
* Stooq.pm - Added new currencies and a fix for commodities' prices
* YahooWeb.pm - Skip rows in the price table where the prices are "-".
  This seems to happen sometimes with TIAA (and perhaps other) 
securities
  including TILIX and QCILIX
* TSP.pm - Was not returning hash when the HTTP GET failed completely
  or the content did not contain the expected CSV file. - Issue #338
* BSEIndia.pm - Removed print when symbol not found - Issue #335

Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Vincent Lucarelli 
  - Bruce Schuck 
  - David Hampton 
  - jvolkening 
  - Pawel Konieczny 
  - Mike Alexander 
  - AndreJ 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Sam Morris 
  - Linas Vepstas 
  - Hiranya Samarasekera 
  - Manuel Friedli 
  - Achim Winkler 
  - Diego Marcolungo 
  - John Haiducek 
  - Paul Howarth 
  - alex314159 
  - gregor herrmann 
  - Jalon Avens 
  - Rajan Vaswani <111571283+bgr22...@users.noreply.github.com>
  - Sigve Indregard 
  - bgr22112 <111571283+bgr22...@users.noreply.github.com>
  - goodvibes2 
  - Ben Hemming 
  - Bruce Schuck 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - Gabor Szabo 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Joseph Heron 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - Stephan Gambke 
  - linas 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote v1.59 Tentative Release Date

2023-12-30 Thread Bruce Schuck

Happy Holidays everyone.

It's short notice, but I intend to push Finance::Quote v1.59 to CPAN 
tomorrow, December 31, 2023.


The changes from v1.58 to v1.59 are:

* Fixed XETRA, Tradegate and SInvestor after webpage was restructured - 
Issue #350


* Fidelity.pm temporarily disabled - Issue #346

* Finanzpartner.pm - Fix scraper, did not work if quote was higher than
  the previous day's quote.

* GoogleWeb.pm - Updated to retrieve mutual fund and BATS prices - Issue
  #355

* BSEIndia.pm - Updated to use standardised data file at URL
  https://www.bseindia.com/download/BhavCopy/Equity
  BSE_EQ_BHAVCOPY_{DDMM}.ZIP
  Eliminated need to use temp folders by storing standardized file
  data from URL into a variable.
  Updated names of source fields to conform to those in the
  standardized data file

* IndiaMutual.pm - Eliminated need to use temp folders by storing
  nav file data from URL into a variable.

* TMX.pm - Correct a self-reference in documentation - PR #345

* Stooq.pm - Added new currencies and a fix for commodities' prices

* YahooWeb.pm - Skip rows in the price table where the prices ar "-".
  This seems to happen sometimes with TIAA (and perhaps other)
  securities including TILIX and QCILIX

* TSP.pm - Was not returning hash when the HTTP GET failed completely
  or the content did not contain the expected CSV file. - Issue #338

* BSEIndia.pm - Removed print when symbol not found - Issue #335

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] AlphaVantage now restricting users to 25 quotes

2023-11-01 Thread Bruce Schuck

On 11/1/23 10:43 AM, Adrian Holbrook wrote:


Thanks for that - I changed all mine to Yahoo as JSON and it works,
as you say, for now. Wasn't long ago that I chenged them all from
Yahhoo to Alphvantage! Bit of a chore with over 50 to do. Would be a
very useful feature to be able to switch en masse from one provider
to another rather than do them all individually.


I crafted some commands using XMLStarlet to manipulate quote sources en 
masse. Those using an SQL backend that are familiar with SQL queries can 
probably do the same. I can see why the GnuCash developers may be 
cautious about adding such a feature as there is a risk of corrupting 
users' data files if not careful. Just my $0.02.



I did try using Alphvantage for 25 prices and Yahoo for the
remaining ones but that ended up with the prices from Alphavantage
being 100 times too high - I was very rich for a while! I suspect
that one uses pence and the pther pounds (or cents and dollars) and
Gnucash can only use one conversion. Would be interested to
understand this a bit more.


There was a discussion on this some time back, it may have been on a 
Finance::Quote Github issue or pull request and not here. As you 
noticed, some LSE traded securities are priced in pounds, and others in 
pence. There are few others that are similar. The JSON returned when 
fetching data from AlphaVantage does not include an indicator for which 
currency is used. It *can* be looked up from AV using another API, and 
hence another hit on your API's daily counter. The workaround if one did 
not want to use another quote source is to add an additional ".X" the 
symbol used for the security. For example GBP.L data from AV is in Great 
Britain Pence. But if you set the symbol to GBP.L.X 
Finance::Quote::AlphaVantage will convert the close, high, low, open 
pricing to pounds.


There has been some work in the last year to fix or add a few quote 
sources. Fool, GoogleWeb, MarketWatch, YahooWeb, and YahooJSON were 
successfully tested when they were last updated within the last year.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.58 released!

2023-08-12 Thread Bruce Schuck
New version 1.58 of Finance-Quote is available with the following changes:

* Consorsbank.pm - New module - PR #329
* Stooq.pm - New module - Issue #203
* Bloomberg.pm - Changed modules to utilize cookie jar - PR #331 - 
Issue #324
* AlphaVantage.pm - Apply currency scaling (GBp -> GBP) when symbol
  had additional ".X" suffix - Issue #281
  Fixed check for "Information" JSON usually returned when daily API
  limit has been reached.
* YahooWeb.pm - Fixed incorrect pricing for single character symbols
  and changed URL to get trade date - Issues #314 #319
* Another fix to the URL in YahooJSON and CurrencyRates/YahooJSON - 
Issue #318

Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Vincent Lucarelli 
  - Bruce Schuck 
  - David Hampton 
  - jvolkening 
  - Pawel Konieczny 
  - AndreJ 
  - Mike Alexander 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Sam Morris 
  - Linas Vepstas 
  - Hiranya Samarasekera 
  - Manuel Friedli 
  - Diego Marcolungo 
  - John Haiducek 
  - alex314159 
  - gregor herrmann 
  - Achim Winkler 
  - Jalon Avens 
  - Paul Howarth 
  - Sigve Indregard 
  - goodvibes2 
  - Ben Hemming 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - Gabor Szabo 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Joseph Heron 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Strange prices update issue (possibly with TSP)

2023-08-11 Thread Bruce Schuck

On Aug 10, 2023, at 12:13, Kalpesh Patel mailto:kalpesh.pa...@usa.net> > wrote:


The difficult part in debugging this is that when I do query three times
from the command line, it succeeds without any issue for me as well, but
when I update prices from GNC, it fails two times and then succeeds third
time consistently. So this is not an issue with throttling from TSP source
which you validated as well. Is there more in terms of debugging this by any
chance? Can I use STDERR and STDOUT from Perl to emanate messages to console
but not interfere with what JSON comes back or butcher the response back to
gnc-fq-helper so it doesn't bomb to run a full cycles from GNC to test? Any
help in debugging is appreciated.


Kalpesh,

Many, but not all, of the F::Q modules make use of the Smart::Comments 
module. TSP.pm is one of them. The environment variable DEBUG will need 
to be set, and with no changes to the Perl code you should see helpful 
information printed to STDERR. In the code, these are lines that begin 
with "###" (note, just 3 pound signs) in those modules using 
Smart::Comments.


A quick look at the TSP module and I see two where the "tsp" method will 
return *without* setting "success" and "errormsg" for any of the symbols 
passed to it. This will happen if the http get call fails, or whatever 
is downloaded is not 2 or more lines.


my $reply = $ua->get($url, @HEADERS);
### [] url  : $url
### [] reply: $reply

return unless ($reply->is_success);

my @line = split(/\n/, $reply->content);

return unless (@line > 1);

In the code snippet, there are two examples Smart::Comments use which 
could be useful in your case. With DEBUG set the code would print the 
url to STDERR, and entire $reply object (status, headers, cookies, body).


Whether or not this helps you, the omission of not returning the proper 
failure data is an issue.


Hope this helps.

Bruce S

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] finance quote not working

2023-08-05 Thread Bruce Schuck

On 2023-08-04 at 20:16 EDT, Jim DeLaHunt wrote:


Paras:



On 2023-08-04 06:23, Paras Desai wrote:


So far, Mutual fund is concerned, following is an example of the 
fund


1. Axis Special Situation Fund , symbol for fetching price is 
INF846K01Y05


Excellent. That is helpful information. Next, try testing quote 
retrieval from the command line. If this succeeds, then your problem
is probably inside GnuCash. If this fails, then the problem is 
probably with the Finance::Quote software bundled with GnuCash, or

with the data source, or with the configRelauration.
The ISIN "INF846K01Y05" does not exist in the data used by the nseindia 
method.


The Finance::Quote module NSEIndia.pm module works by extracting data 
from a zipped CSV file retrieved from nseindia.com. Friday's file would 
have been 
https://archives.nseindia.com/content/historical/EQUITIES/2023/AUG/cm04AUG2023bhav.csv.zip


Reliance and INFY do exist, and F::Q's own example retrieval script will 
show (The example scripts are in the tarball CPAN downloads when 
installing the F::Q module):


bschuck@valhalla:~/tmp/finance-quote$ ./Examples/stockdump.pl nseindia 
INFY RELIANCE

$VAR1 = {
  'RELIANCElow' => '2471.6',
  'RELIANCEhigh' => '2516',
  'INFYexchange' => 'NSE',
  'RELIANCElast' => '2508',
  'INFYdate' => '08/04/2023',
  'RELIANCEmethod' => 'nseindia',
  'INFYlast' => '1377.9',
  'RELIANCEsuccess' => 1,
  'INFYmethod' => 'nseindia',
  'RELIANCEcurrency' => 'INR',
  'RELIANCEclose' => '2509.55',
  'INFYcurrency' => 'INR',
  'RELIANCEexchange' => 'NSE',
  'RELIANCEdate' => '08/04/2023',
  'INFYsymbol' => 'INFY',
  'RELIANCEisodate' => '2023-08-04',
  'RELIANCEprevclose' => '2475.9',
  'RELIANCEsymbol' => 'RELIANCE',
  'RELIANCEopen' => '2498.8',
  'INFYprevclose' => '1364.3',
  'INFYlow' => '1362',
  'INFYclose' => '1378.35',
  'INFYisodate' => '2023-08-04',
  'INFYhigh' => '1385.9',
  'INFYsuccess' => 1,
  'INFYopen' => '1368.9'
};


Why the data for INF846K01Y05 is not available from NSE India (did it 
perhaps stop trading?) is beyond the scope of both GnuCash and 
Finance::Quote. Sorry.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote Usage

2023-07-29 Thread Bruce Schuck

Hello all,

Just an FYI. Getting a simple count of the Finance::Quote sources used. 
At least for those with v1.57 installed. I'd like to keep the counter in 
place for maybe another release, but will be removed by release v1.59.


As noted in the discussion post, the ukfunds number is misleading. Early 
on I discovered that a single IP was using that method on somewhat of an 
hourly schedule resulting in hundreds of times a day.


The list can also be found on this post in F::Q discussions:

https://github.com/finance-quote/finance-quote/discussions/274#discussioncomment-6584392

7447yahoo_json
6151xetra
5633ukfunds
4035alphavantage
3720yahooweb
 739usa
 638bourso
 624googleweb
 624mstaruk
 485marketwatch
 444aex
 426tsp
 405tradegate
 393australia
 369europe
 351fool
 346bloomberg
 341asx
 290ftfunds
 184deka
 184nseindia
 182nasdaq
 178fidelity
 175amfiindia
 156tsx
 135indiamutual
 128fidelity_direct
 127unionfunds
 122nyse
 118canada
 113bseindia
  78morningstarch
  71hu
  69bse
  68finanzpartner
  67canadamutual
  64tiaacref
  60sinvestor
  56tmx
  55fundlibrary
  52goldmoney
  52tesouro_direto
  49nzx
  47dwsfunds
  45morningstarjp
  43troweprice_direct
  41troweprice
  40comdirect
  40morningstaruk
  33aufunds
  33seb_funds
  32india
  29fondsweb
  28six
  27onvista
  27twelvedata
  26known_currencies
  25fundata
  24treasurydirect
  23dutch
  23za
  18asegr
  18france
  16fetch_live_currencies
  13bet
  13bvb
  13oslobors
  12cse
  12greece
  12morningstarau
  11bamosz
  10hufund
  10iexcloud
  10romania
   9hungary
   9hustock
   9tradeville
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Issue with Finance::Quote

2023-07-29 Thread Bruce Schuck

On 7/29/23 05:06, bern...@deprez.biz wrote:

I wasn't aware of the IP tracking and that may be the explanation - 
without my knowledge, somebody else in my household was playing

around with a Node-RED flow that was pulling a request from
Alphavantage each minute with a third API key :-)  We've now tuned
that flow back to once every 4 hours (which is totally adequate for
our use case)


Bernard,

Cool, glad I can help. Your issue did expose a minor issue in the 
AlphaVantage module. It was not properly catching the message returned 
when the daily limit has been reached. I did address that and the fix 
will be included in the next release.


If you would like to test a pre-release while you are still having the 
issue, please try installing BPSCHUCK/Finance-Quote-1.57_03.tar.gz from 
CPAN.


I'll have to give it another try tomorrow (the flow has been up and 
running overnight) and see if all is back to normal.


Good luck, looking forward to the result.


I'm super thankful for your help & mentioning the below!!!


You're welcome.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Issue with Finance::Quote

2023-07-28 Thread Bruce Schuck

On 7/28/23 12:31 PM, bern...@deprez.biz wrote:


{
     "Information": "Thank you for using Alpha Vantage! You have reached 
the 100 requests/day limit for your free API key. Please subscribe to 
any of the premium plans at https://www.alphavantage.co/premium/ to 
instantly remove all daily rate limits."

}


The interesting part is that the original API key I have was used 
perhaps 15 times today, the second API key mentioned above wasn't used 
today at all... And I have no automation nor CRON/scheduled tasks 
anywhere that use either API...


Bernard,

Are you connecting from home, work, or through something like NordVPN?

I found out while doing a PoC of using a different key for each request 
to avoid needing to throttle requests (I stumbled onto the fact that 
almost any random string will work as an API key) that their limitation 
is also likely based on source IP. After 5 requests using 5 different 
generated random API keys, the 6th request with a different API within a 
minute will get the message about the 5 per minute limitation.


If you are on a network where multiple people happen to be using 
AlphaVantage, this could be the cause of the AlphaVantage limit message.


That said, please open an issue at 
https://github.com/finance-quote/finance-quote/issues. I identified 
where the AlphaVantage module may not be catching this particular 
failure, since I suspected it may be that you have surpassed a 
daily/monthly limit and was looking into it.


Thank you.

Bruce.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Issue with Finance::Quote

2023-07-28 Thread Bruce Schuck

On 7/28/23 8:45 AM, bern...@deprez.biz wrote:


Just ran it in a fresh window:


C:\Users\Bernard>perl -MFinance::Quote -e "print 
qq{{$Finance::Quote::VERSION\n}}"

{1.57
}


Bernard,

One last command. curl. Replace "YOURAPIKEY" with, of course, your 
ALphaVantage API key.


C:\Users\bschuck>curl 
"https://www.alphavantage.co/query?function=GLOBAL_QUOTE=json=QQQ=YOURAPIKEY;

{
"Global Quote": {
"01. symbol": "QQQ",
"02. open": "383.0700",
"03. high": "384.7100",
"04. low": "375.3100",
"05. price": "376.6200",
"06. volume": "63940225",
"07. latest trading day": "2023-07-27",
"08. previous close": "377.5200",
"09. change": "-0.9000",
"10. change percent": "-0.2384%"
}
}

As stated, you can open an issue at 
https://github.com/finance-quote/finance-quote/issues. At the very least 
it would steer this thread off of the GnuCash-User list. But without 
being able to duplicate it, no guarantee that it can be resolved.


Thank you.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Issue with Finance::Quote

2023-07-28 Thread Bruce Schuck

On 7/28/23 3:21 AM, bern...@deprez.biz wrote:

The version was in the C: path so didn't run the version command ;-) but 
ran it anyway, and I'm on {1.57}


Bernard,

Was that before of after you set PERL5LIB? It makes a difference. Please 
run the command in a new console window. Thank you.


Same issue - so I guess, like John suggested, creating an issue on the 
Finance::Quote page might be the right way forward?


Well, at the moment it seems to be more of a user environment issue and 
not an issue within F::Q. In any case, unless someone else steps in, the 
same person will be the one trying to help.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Issue with Finance::Quote

2023-07-27 Thread Bruce Schuck

On 7/27/23 10:46 AM, bern...@deprez.biz wrote:


Just gave that a shot:


C:\Strawberry\cpan\build\Finance-Quote-1.57-0>perl Examples\stockdump.pl 
alphavantage QQQ
Can't use an undefined value as a HASH reference at 
C:/Strawberry/perl/site/lib/Finance/Quote/AlphaVantage.pm line 234.


You left out the command that shows the version.

C:\Users\bschuck>perl -MFinance::Quote -e "print 
qq{{$Finance::Quote::VERSION\n}}"


{1.57
}

It could also be helpful to send the output of "perl -V" (upper case V 
to be sure). It's only the last 5 to 10 lines that I am interested in at 
the moment, but the entire output would be okay.


If you don't mind, please also try to set PERL5LIB before running the 
example script.


C:\Strawberry\cpan\build\Finance-Quote-1.57-0>set 
PERL5LIB=C:\Strawberry\cpan\build\Finance-Quote-1.57-0\lib


Followed again by:

C:\Strawberry\cpan\build\Finance-Quote-1.57-0>perl Examples\stockdump.pl 
alphavantage QQQ

$VAR1 = {
  'QQQ∟close' => '377.5200',
  'QQQ∟last' => '376.6200',
  'QQQ∟currency' => 'USD',
  'QQQ∟net' => '-0.9000',
  'QQQ∟date' => '07/27/2023',
  'QQQ∟low' => '375.3100',
  'QQQ∟volume' => '63506417',
  'QQQ∟p_change' => '-0.2384',
  'QQQ∟method' => 'alphavantage',
  'QQQ∟symbol' => 'QQQ',
  'QQQ∟success' => 1,
  'QQQ∟currency_set_by_fq' => 1,
  'QQQ∟open' => '382.9700',
  'QQQ∟isodate' => '2023-07-27',
  'QQQ∟high' => '384.7100'
};

Bruce S.

P.S. - did you forget to Cc the list, or did you mean to reply just to me?
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Issue with Finance::Quote

2023-07-27 Thread Bruce Schuck

On 7/27/23 10:37:17 -0400, Bernard wrote:


Thanks for that suggestion - did that on 2 different Windows systems,
both still fail the same way...



C:\Program Files (x86)\gnucash\bin>gnucash-cli -Q dump alphavantage QQQ
* 10:21:02 ERROR  [parse_quotesource_error()]
Unrecognized Finance::Quote Error Can't use an undefined value as a HASH
reference at C:/Strawberry/perl/site/lib/Finance/Quote/AlphaVantage.pm
line 234.
Finance::Quote retrieval failed with error Unrecognized Finance::Quote
Error: Can't use an undefined value as a HASH reference at
C:/Strawberry/perl/site/lib/Finance/Quote/AlphaVantage.pm line 234.


Please verify the version of Finance::Quote. On Linux:

$ perl -MFinance::Quote -e 'print "$Finance::Quote::VERSION\n"'
1.57

On Windows:

C:\Users\bschuck>perl -MFinance::Quote -e "print 
qq{{$Finance::Quote::VERSION\n}}"

{1.57
}

C:\Users\bschuck>gnucash-cli -Q dump alphavantage QQQ
Finance::Quote fields GnuCash uses:
symbol: QQQ <=== required
  date: 07/26/2023  <=== recommended
  currency: USD <=== required
  last: 377.5200<=\
   nav: <=== one of these
 price: <=/

You should also be able to execute the example perl script that comes 
with the Finance::Quote module package.


Since you are on Windows and recently installed Finance::Quote:

> cd C:\Strawberry\cpan\build\Finance-Quote-1.57-0

C:\Strawberry\cpan\build\Finance-Quote-1.57-0>perl Examples\stockdump.pl 
alphavantage QQQ


$VAR1 = {
  'QQQ∟net' => '-1.2600',
  'QQQ∟symbol' => 'QQQ',
  'QQQ∟success' => 1,
  'QQQ∟currency' => 'USD',
  'QQQ∟currency_set_by_fq' => 1,
  'QQQ∟date' => '07/26/2023',
  'QQQ∟volume' => '47075710',
  'QQQ∟method' => 'alphavantage',
  'QQQ∟open' => '377.7200',
  'QQQ∟p_change' => '-0.3326',
  'QQQ∟close' => '378.7800',
  'QQQ∟last' => '377.5200',
  'QQQ∟low' => '375.1800',
  'QQQ∟isodate' => '2023-07-26',
  'QQQ∟high' => '379.2400'
};
C:\Strawberry\cpan\build\Finance-Quote-1.57-0>

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote - AlphaVantage Trade

2023-07-22 Thread Bruce Schuck

On 07/21/2023 at 18:34 EDT Kaligula wrote:

In general the suffix idea looks like a nice workaround – but I'd 
like to throw in my two cents.


So maybe a general solution in case of AV module pricing errors – a 
".???" suffix (to any ticker, not only LSE ones) where the "???" is 
the currency that the security is traded in? (Or even better with a 
":???" suffix, to avoid confusion with stock exchange suffixes). This

would allow the user to inform the AV module about changes in
default currency – e.g. "GBP.L:GPX" or "MVOL.L:USD".

Kaligula,

Please don't disturb the horse. It's well beyond deceased and we're not 
trying to make glue. At least I am not. I've made my decision on how 
it's going to be handled. I'm not going to waste any more time beyond 
writing this email on this issue.


My original question in this thread was asking how many of the users (at 
least GnuCash users on the email list) used AlphaVantage for non-US 
traded securities. *No one* responded answering that question, but John 
and I had a decent little discussion of the matter.


For a real solution, I would urge anybody using AlphaVantage for quote 
data to contact AV's support and request that the trade currency be 
added to the JSON returned from the GLOBAL_QUOTE API.


As always, F::Q is community supported software. So anyone is welcome to 
submit a pull request.


Bruce S

P.S. Likely any further responses with suggestions or ideas related to 
this issue will be ignored. Please let the Equus ferus caballus rest in 
peace.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote - AlphaVantage Trade Currencies

2023-07-19 Thread Bruce Schuck

On 7/18/23 10:34 AM, John Ralls wrote:


YahooJSON and now YahooWeb are already doing the GBX->GBP
conversion (not my doing). Easy because both of those sources have
the pricing currency in the data returned. I hope you are not
suggesting that the conversion is removed from both of those
modules?



I'm not. I'm pointing out the disadvantages of handling the pricing
issue on the client side.


Okay. I think it would be reasonable assumption that Finance::Quote
returns pricing in ISO-4217 currencies. But definitely a quagmire when
faced with an issue like this one.


Roger, but slowing AV down to 5 quotes/2 minutes will make it pretty
useless for anyone with even a small number of LSE stocks. Users
already gripe about the 5/sec throttling.


Which is why I posed the original question. Aside from the two of us
having this wonderful exchange of ideas, no one else stepped in to say
"Hey! I get some LSE traded stock data from AlphaVantage, and doubling
the time it takes to get quotes would annoy the heck out of me!". At
this point, the only one to raise an issue is someone that could deal
with it as is for all I care.



To clarify, are you suggesting have AlphaVantage check for the
additional (let's say ".X") suffix? Or any quote source? Much
easier to accomplish on a per module basis, than F::Q in general.
But as stated, that means the user needs to know to use GBP.L.X
(Global Petroleum) for AV to return GBP, but YahooJSON does not
need the extra ".X". Then again, that's what man pages are for...
;)



Yes, I think that's the best alternative to asking AV for the
currency. Another that we haven't discussed would be caching the
results somewhere, but that conflicts with F::Q's stateless design.


Alright. At some point I'll have AlphaVantage look for symbols supplied 
with an additional '.X' suffix. If it's given, divide the pricing info 
by 100. If not, leave it be. Of course I'll add info on this to the 
manpage/POD. I'll also ping AV support again. I was told they would look 
into adding the currency to the JSON returned from the GLOBAL_QUOTE API 
which would make my job a zillion times easier.


Thanks again John.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote - AlphaVantage Trade Currencies

2023-07-18 Thread Bruce Schuck

On 7/17/23 9:06 PM, john wrote:


Well, a user wouldn't want to set GBX as their default currency,
just to create an account in their tree denominated in it to be a
parent for stock accounts that are priced in GBX. But you're right
that it's not something that a user can do now because GBX isn't an
ISO4217 currency and that's historically how we decide what's a
currency. Implementing it would require making an exception to that
policy and adding an entry to our currency file.


Probably why AlphaVantage and YahooJSON convert GBX quotes to GBP. I
started to get involved with Finance::Quote after AV was added because a
Google finance API was discontinued.

To be pure it would also require F::Q to leave the GBX->GBP 
conversion to the client program, because while it's reasonable to 
expect a user who owns GBP.L shares to know that they trade in GBX 
it's not reasonable to expect them to know that it's one of the 
exceptions that doesn't get adjusted automatically when getting the 
price from AlphaVantage, but *does* get adjusted automatically when 
retrieved from Yahoo!.


YahooJSON and now YahooWeb are already doing the GBX->GBP conversion
(not my doing). Easy because both of those sources have the pricing
currency in the data returned. I hope you are not suggesting that the
conversion is removed from both of those modules?

There-in lies why I figure the additional lookup to get the correct
currency is needed. So the user doesn't need to worry about what modules
may or may not be doing GBX->GBP or ZAc->ZAR conversion. Consistent with
two Yahoo modules, AV would return the ISO currency. At least that was
my thinking.


And repeating myself for emphasis, that's how GnuCash could handle it
but I have no idea if it's reasonable for other programs. From that
standpoint the extra suffix is more straightforward: Just add it and
F::Q will unconditionally multiply the price by 100. That will work
for any client and is pretty easy to explain to users.
To clarify, are you suggesting have AlphaVantage check for the 
additional (let's say ".X") suffix? Or any quote source? Much easier to 
accomplish on a per module basis, than F::Q in general. But as stated, 
that means the user needs to know to use GBP.L.X (Global Petroleum) for 
AV to return GBP, but YahooJSON does not need the extra ".X". Then 
again, that's what man pages are for... ;)


Definitely validates what I tried to explain in the F::Q issue, where 
the solution is *not* just a simple "remove the adjustment".


I may just shelve this for a while longer. Thanks for the discussion and 
insight.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote - AlphaVantage Trade Currencies

2023-07-17 Thread Bruce Schuck

On 7/17/23 10:02 AM, john wrote:


It's not all non-US securities. In AlphaVantage it appears to be only
 LSE stocks; JSE stocks aren't supported and Tel Aviv stocks support
only ILS. The Yahoo JSON module adjusts prices for Zac (South Africa)
and ILA (Israel) as well as GBX, but Yahoo JSON apparently includes a
currency code to make that easy. That seems to be missing from
YahooWeb, perhaps an oversight on Vincent's part. The currency is
available on https://finance.yahoo.com/quote/GBP.L 
 prefixed by "Currency In" in

div id="quote-header-info".


The currency is being captured by YahooWeb. For GBP.L (traded in 
GBp/GBX) has its price converted to GBP and currency reported as such. 
At the time of this writing, GBP.L was 0.1850 GBp, F::Q v1.57 yahooweb 
returns 0.00185 GBP.


% gnc-fq-dump -v yahooweb GBP.L

stock   field  value
-   -  -
GBP.Lcurrency: GBP
GBP.Ldate: 07/17/2023
GBP.Lexchange: LSE - LSE Delayed Price
GBP.L isodate: 2023-07-17
GBP.Llast: 0.00185
GBP.L  method: yahooweb
GBP.Lname: Global Petroleum Limited
GBP.L success: 1
GBP.L  symbol: GBP.L

> So for AlphaVantage it seems only .L and .IL suffix securities would
> need to be queried, and maybe only .L unless there are known
> instances where .IL-suffixed symbols are priced in GBP.

I will change the AlphaVantage.pm fix I'm working on to only execute the 
extra API call for securities ending with '.L'.



Rather than spending an extra query maybe AlphaVantage.pm could
accept a special extra suffix indicating that the user wants quotes
to be multiplied by 100, perhaps X, so a request for GBP.L priced in
GBP would be GBP.L.X.


If I understand, this method assumes the user knows that the data from 
AV for GBP.L is priced in GBp/GBX. Correct?



Alternatively we could create a GBX, ZAX, and ILA pseudo-currencies
in GnuCash and users would create parent accounts in those currencies
for stocks quoted that way. That would take a little finessing on
users' part because using it would depend both on the currency the
stock is quoted in and whether F::Q converts it to the "real"
currency.


F::Q currently sets currency based on suffix. '.L' gets mapped to 'GBP'. 
I just checked, currently no map in AV for ZAR. By chance, you don't 
have an example for me? Thanks. Like the previous comment, this also 
expects users to know what currencies the different securities are 
reports as coming from the AV module, correct? While I like the idea on 
a high level, I think that is asking for trouble reports from users 
having pricing issues.


Thanks again.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote - AlphaVantage Trade Currencies

2023-07-17 Thread Bruce Schuck

On 7/17/23 03:48 PDT AM, Brad Morrison wrote:


Does it also make sense to post this situation & question to the
other 6 GnuCash Mailman 2 mailing lists that are not in English? 
https://wiki.gnucash.org/wiki/Mailing_Lists  & 
https://lists.gnucash.org/mailman/listinfo


If someone cares to translate and cross-post, be my guest. I would think 
that those GnuCash users who can understand English may be subscribed to 
gnucash-user in addition to the gnucash-?? list of their native language.



2.5 securities per minute seems really slow!


Not a limitation of the module, a limitation of the AlphaVantage API for 
those using their free API key.


"We are pleased to provide free stock API service covering the majority 
of our datasets for up to 5 API requests per minute and 500 requests per 
day. If you would like to target a larger API call volume, please visit 
premium membership."


The currency is *not* supplied in the JSON returned when fetching the 
price data. So for securities such as GBP.L (GBX/GBp) or GBPG.L (GBP), a 
second API call is required to determine the currency. Otherwise that 
module maps '.L' to GBP which would be incorrect for GBP.L. So, for 
non-US stocks, 2 API calls are needed for one security.


Thanks.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote - AlphaVantage Trade Currencies

2023-07-16 Thread Bruce Schuck

Hello again,

At some point I am going to take a break from F::Q, I thought this 
weekend I was going to escape.


### For the question, skip to the next ###

Anyway, some time ago the issue was raised about prices from 
AlphaVantage for LSE traded stocks (see 
https://github.com/finance-quote/finance-quote/issues/281). While there 
is an issue, the user's perceived solution was not the answer. 
Apparently my attempt to explain that the root cause was that the data 
returned from the AV "GLOBAL_QUOTE" API did *NOT* contain the currency 
used for the pricing returned.


What the AV module does is assign a currency based on the suffix of the 
lookup symbol. So stocks like GBP.L and GBPG.L get mapped to GBP. The 
problem is that GBP.L (Global Petroleum Limited) is traded in GBX (aka 
GBp) and GBPG.L (Goldman Sachs Access UK Gilts 1-10) is traded in GBP. 
But the AV module as written cannot differentiate since the currency 
used is not part of the data. Stocks from South Africa have a similar issue.


Needless to say, since I was not ready to dig into the root cause and 
not wanting to remove the fix that was meant to convert GBp pricing to 
GBP pricing based solely on the symbol's suffix, the user decided to go 
on a rant and throw a tantrum in the comments and had to be blocked from 
the Finance::Quote repository.


### Question here ###

The currency for the trades can be gotten from AV, but an additional 
call using the "SYMBOL_SEARCH" API is necessary. Obviously this would 
impact the throttling limitation of AlphaVantage. For non-US stocks, 
this means that including an additional currency lookup an average of 
2.5 securities can be fetched per minute. I am curious how many of you 
all use AV for non-US traded securities? Has the pricing discrepancy 
affect you, and would you want it corrected even though that means 
increasing retrieval time due to the extra API usage?


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote 1.57_02 - YahooWeb gets correct trading date and fixed pricing for single char symbols

2023-07-16 Thread Bruce Schuck

Greetings,

Another beta pre-release for F::Q v1.58 has been uploaded to CPAN. The 
URL used by YahooWeb (yahooweb) has been changed to the date is pulled 
from web page. The issue with some single-character symbols getting bad 
pricing has also been fixed, and labels 'open', 'high', 'low', and 
'volume' have been added.


Again, not a production indexed release, you can still install it using 
CPAN.


$ cpan BPSCHUCK/Finance-Quote-1.57_02.tar.gz

or

$ cpanm BPSCHUCK/Finance-Quote-1.57_02.tar.gz

or

$ perl -MCPAN -e shell
cpan> install BPSCHUCK/Finance-Quote-1.57_02.tar.gz


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.57_01 - YahooJSON Quick Fix

2023-07-15 Thread Bruce Schuck

On 07/15/2023 04:52 EDT, Richard Ullger wrote:


On 07/15/2023 03:28, Bruce Schuck wrote:



A beta pre-release for F::Q v1.58 has been uploaded to CPAN. It
has the quick fix I noted in the earlier "Yahoo Closed the Door on 
Finance API" thread.


I've already updated Friday's prices using your quick fix which 
worked fine, so I'll test this using v1.57_01 after Monday's close.

Richard,

Thanks for the report. Good to know.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote 1.57_01 - YahooJSON Quick Fix

2023-07-14 Thread Bruce Schuck

Greetings,

A beta pre-release for F::Q v1.58 has been uploaded to CPAN. It has the 
quick fix I noted in the earlier "Yahoo Closed the Door on Finance API" 
thread.


Not a production indexed release, you can install it using CPAN.


$ cpan BPSCHUCK/Finance-Quote-1.57_01.tar.gz

or

$ cpanm BPSCHUCK/Finance-Quote-1.57_01.tar.gz

or

$ perl -MCPAN -e shell
cpan> install BPSCHUCK/Finance-Quote-1.57_01.tar.gz

For those who have been trying the YahooJSON currency rates module, that 
was also fixed.


And now to relax and start the weekend with Johnnie Walker Black on ice.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo Closed the Door on Finance API

2023-07-14 Thread Bruce Schuck

At 07/14/2023 at 1958 EDT, WR D wrote:


Thanks for this - the yahooweb source worked for retrieving
crypto-AUD exchange rates too.


At 07/14/2023 at 08:50:29 EDT, Bart A.J. Seesing wrote:


The latest release of F::Q (1.57) contains a new YahooWeb module
that still works, at least for my selection of European ETFs. Install
that release if you haven't done so already, go to Tools > Security
Editor, edit your security, change 'Type of source quote' to
'Unknown', and select 'yahooweb' from the dropdown list.
Just note there is currently a caveat for the YahooWeb module. The trade 
date is not available (at least not without JavaScript). The date 
returned is the date the data is retrieved unless it's a weekend, in 
which case it will be set to the previous Friday.


A recent web based URL with the trade date has been identified, but the 
module has not yet been modified to use it. Other modules that work 
without requiring an API key (at least for US exchanges) are Fool 
(fool), GoogleWeb (googleweb), and MarketWatch (marketwatch).


Thank you.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Yahoo Closed the Door on Finance API

2023-07-14 Thread Bruce Schuck

On 07/14/23 at 00:14 EDT, Bruce S wrote:

Some of us suspected this would come, getting reports of the Yahoo 
URLs


> 
https://query2.finance.yahoo.com/v11/finance/quoteSummary/AAPL?modules=price,summaryDetail,defaultKeyStatistics



and


> 
https://query2.finance.yahoo.com/v10/finance/quoteSummary/AAPL?modules=price,summaryDetail,defaultKeyStatistics



now returning a 404 (v11) or "Unauthorized" (v10).
For those comfortable with locating and editing the YahooJSON.pm module 
manually I have a quick fix. If you have F::Q v1.57 change the lines 
defining $YIND_URL_HEAD and $YIND_URL_TAIL (lines 38 and 39) to:


my $YIND_URL_HEAD = 
'https://query2.finance.yahoo.com/v11/finance/quoteSummary/?symbol=';

my $YIND_URL_TAIL = '=price,summaryDetail,defaultKeyStatistics';

Or you can wait for new release to be pushed to CPAN.

On 07/14/13:43 EDT, Tom T replied:

> The YahooWeb module mostly works for me except for some reason it
> gives a ridiculously high value for AT (call sign T).

Interesting. It also returns a bad value for Genpact Limited (G), but 
not Hyatt Hotels (H). Will need to open an issue and hopefully Vincent 
(who originally wrote the YahooWeb module) will take a look.


Thanks all.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Yahoo Closed the Door on Finance API

2023-07-13 Thread Bruce Schuck
Some of us suspected this would come, getting reports of the Yahoo URL 
https://query2.finance.yahoo.com/v11/finance/quoteSummary/AAPL?modules=price,summaryDetail,defaultKeyStatistics 
and 
https://query2.finance.yahoo.com/v10/finance/quoteSummary/AAPL?modules=price,summaryDetail,defaultKeyStatistics 
now returning a 404 (v11) or "Unauthorized" (v10).


Sorry to say this, but more than likely the YahooJSON module (aka 
yahoo_json) is going to be removed from Finance::Quote in the next 
release. This is not to say that if someone can figure out a way to 
successfully access Yahoo's https://query2.finance.yahoo.com/v?... APIs, 
please pass on that info or better yet, have a go at reworking the 
current module.


There is already an issue raised on F::Q's GitHub, 
https://github.com/finance-quote/finance-quote/issues/318. Please 
refrain from "me too" comments. Unfortunately as I said in the previous 
paragraph, this issue will likely be resolved by removing the module.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Unable to get TIAA-CREF price quotes

2023-07-05 Thread Bruce Schuck

On 7/5/23 19:23 UTC, Doug Brown wrote:


Linux Mint v. 20.?GNUCASH v. 4.2Finance::Quote v. 1.56
When I update the price Data Base it fails to retrieve TIAA-CREF quotes.
The Security Editor is set up as follows:



Running?gnc-fq-dump gives the following result:
doug@sager:~/src/gnucash-5.1$  gnc-fq-dump tiaacref QCBMPXFinance::Quote fields Gnucash uses:? ? 
symbol: QCBMPX (deduced)? ? ?<=== required? ? ? date: ** missing **? ? ? ? <=== recommended? 
currency: ** missing **? ? ? ? <=== required? ? ? last: **missing**? ? ? ? ? <=\? ? ? ?? ? ? 
?nav: **missing**? ? ? ? ? <=== one of these? ? ?price: **missing**? ? ? ? ? <=/? ? ? ??? 
timezone:? ? ? ? ? ? ? ? ? ? ? <=== optional
** This stock quote cannot be used by GnuCash!


Doug, et al.,

It looks like TIAA-CREF has changed the format of their website sometime 
since last changed in October 2020. This in turn breaks the parsing 
logic in the module. It will need more investigation to determine if it 
can be corrected and the amount of effort required.


In the meantime, feel free to open an issue at 
https://github.com/finance-quote/finance-quote/issues.


Thank you.

Bruce S.

P.S. I am not sure if the last person to modify the TIAA-CREF module is 
on the GnuCash user list, but I Bcc'd the email address used in their 
commits.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.57 released!

2023-07-05 Thread Bruce Schuck

On 7/4/23 23:22:09 +, Richard Ullger wrote:

When prices are updated after midnight, the yahooweb price source is
returning the current date instead of the price date. See below...

On 7/4/23 22:35 -0400, Ken Farley replied:


My understanding of the new Yahooweb module is that it uses the 
current date when reporting prices. I believe this is because the 
data source from which the quote is built does not provide a "quote

date" or that sort of information. Therefore, the author of the new
module had to do something to satisfy the requirements of Gnucash,
so they chose to use today's date. It does, judging from the Perl
code, make adjustments if the date returned is not a "work day",
but doesn't do any other sort of "date correction".


Thank you for that explanation, since I receive GnuCash-user in digest
form I did not see Richard's email until receiving the digest.

Yes, I believe I may have posted this caveat of the YahooWeb module in
the last week or so. It is also noted in the POD documentation of the
module (although I misspelled caveat).

"Yahoo cleverly obscures the trade date using JavaScript. Because of 
this the module uses the current date, but accounts for weekends."


I have been investigating the use of the Date::Business module, but that 
would require regular maintenance of keeping holidays for multiple 
exchanges updated.


But, the YahooWeb module is intended as an emergency module if Yahoo 
pulls the plug on access to the API used in the YahooJSON module.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.57 released!

2023-07-03 Thread Bruce Schuck

On 7/2/23 18:27 EDT, Bruce S wrote:

I should have taken a closer look at the data before posting.

For this release I added a quick way to count F::Q usage. It is 
just a simple web fetch of a URL containing the method (yahoo_json,

fool, alphavantage, etc).



Just 48 hours after pushing F::Q v1.57 to CPAN, these are the current
counts. Assuming with a degree of confidence that the majority of
Finance::Quote users do so through GnuCash, it appears that most 
GnuCash users may be UK based. I'll be curious to see if that hold

up after a month or so.
Seems that almost all the ukfunds fetches are from a single IPv6 
address. Looks like possibly a scheduled fetch, averaging over 60 
ukfunds fetches per hour, every hour.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.57 released!

2023-07-03 Thread Bruce Schuck

On 7/1/23 at 16:09 EDT, Bruce S wrote:

For this release I added a quick way to count F::Q usage. It is just 
a simple web fetch of a URL containing the method (yahoo_json, fool, 
alphavantage, etc).


Just 48 hours after pushing F::Q v1.57 to CPAN, these are the current 
counts. Assuming with a degree of confidence that the majority of 
Finance::Quote users do so through GnuCash, it appears that most GnuCash 
users may be UK based. I'll be curious to see if that hold up after a 
month or so.


Bruce S.

HitsFetch Method
1991ukfunds
385 yahoo_json
167 alphavantage
38  bloomberg
27  aex
25  googleweb
20  asx
20  yahooweb
18  usa
17  xetra
12  fundata
11  australia
11  tsp
10  fidelity_direct
10  indiamutual
8   tradegate
7   fool
7   nyse
6   fidelity
5   europe
5   goldmoney
5   marketwatch
5   sinvestor
4   bourso
4   ftfunds
4   morningstaruk
4   tesouro_direto
4   treasurydirect
3   asegr
3   aufunds
3   bseindia
3   dwsfunds
3   finanzpartner
3   mstaruk
3   nseindia
3   unionfunds
2   bvb
2   comdirect
2   cse
2   deka
2   fondsweb
2   fundataus
2   fundlibrary
2   hu
2   morningstarau
2   morningstarch
2   morningstarjp
2   nzx
2   onvista
2   oslobors
2   seb_funds
2   six
2   tiaacref
2   tmx
2   troweprice
2   za
1   canadamutualus
1   moex_bond_ofz
1   moex_stock
1   nasdaq
1   troweprice_direct
1   twelvedata
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.57 released!

2023-07-01 Thread Bruce Schuck

On 7/1/23 12:37, Bruce S wrote:


New version 1.57 of Finance-Quote is available with the following
changes:

I'd also like to add the following disclosure.

For this release I added a quick way to count F::Q usage. It is just a 
simple web fetch of a URL containing the method (yahoo_json, fool, 
alphavantage, etc). Actually just capturing the headers returned. With 
no coding, looking at the web logs I can see how often F::Q is called to 
fetch stock quotes. For those inclined, it's just a few lines in 
Quote.pm. I will likely remove this simple count mechanism in the next 
or subsequent release.


Thank you.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.57 released!

2023-07-01 Thread Bruce Schuck
New version 1.57 of Finance-Quote is available with the following changes:

* Correct set exchange in YahooJSON.pm - Issue #306
* Added close, change and p_change to Tradegate, XETRA and Sinvestor
  Added optional parameter INST_ID to specify the institute id.
  Fixed bug in Tradegate, XETRA and Sinvestor for numbers equal or 
higher than 1.000 - PR #304
* Added GoogleWeb Module
* YahooWeb module added - PR #296
* Added MarketWatch Module
* Replaced cached file with IO::String object in IndiaMutual.pm
* Fixed missing date in AEX.pm - Issue #298
* Fixed Examples in POD Documentation in a few modules - PR #295
* move use strict to be the first statement in TreasuryDirect.pm and 
TwelveData.pm #290
* remove old perl version requirement statements from TreasuryDirect.pm 
and TwelveData.pm #290
* removed Data::Dumper that caused another test to fail from 
TreasuryDirect.pm #290
* Fixed Fool.pm and fool.t - PR #289

Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Vincent Lucarelli 
  - Bruce Schuck 
  - David Hampton 
  - jvolkening 
  - Pawel Konieczny 
  - AndreJ 
  - Mike Alexander 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Sam Morris 
  - Linas Vepstas 
  - Hiranya Samarasekera 
  - Manuel Friedli 
  - Diego Marcolungo 
  - John Haiducek 
  - alex314159 
  - gregor herrmann 
  - Achim Winkler 
  - Jalon Avens 
  - Paul Howarth 
  - Sigve Indregard 
  - goodvibes2 
  - Ben Hemming 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - Gabor Szabo 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Joseph Heron 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance Quote 1.56 - Crashing Gnucash / Error for Gnucash v5+ (Issue #309)

2023-06-27 Thread Bruce Schuck

On 6/27/23 4:12 PM, Trentan Healey wrote:


Having an issue with retrieve quotes latest version (in conjunction
with Gnucash get quotes and using cli).



When attempting get quotes through gnucash, looks like it starts up
cmd prompt, then get wheel of death and Gnucash crashes, no quotes
updated.



Using cli (windows), get the following gnucash-cli.exe --quotes get
file://C:/temp/myFile.gnucash Found Finance::Quote version 1.56. 
terminate called after throwing an instance of 'std::out_of_range' 
what(): basic_string::substr: __pos (which is 3) > this->size()

(which is 0)



Is there a way to debug this better ?


Trentan,

Sorry, but this is not a Finance::Quote issue.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_03 Available for Evaluation

2023-06-26 Thread Bruce Schuck

On 6/26/23 22:42 +, Richard Ullger wrote:


Thanks for the 1.56_04 update.



The price format for LSE securities using the yahooweb price source
is fixed but I'm getting a difference in precision on crypto between 
yahoo_json and yahooweb.


Unfortunately that is because the precision available from 
https://finance.yahoo.com/quote/USDT-USD?p=USDT-USD&.tsrc=fin-srch is 
not the same as it is from the API.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_03 Available for Evaluation

2023-06-24 Thread Bruce Schuck

Oooops!

Make that 1.56_04. I forgot to merge one pull request.

https://www.cpan.org/modules/by-authors/id/B/BP/BPSCHUCK/Finance-Quote-1.56_04.tar.gz

It can be installed via cpan/cpanm as
'BPSCHUCK/Finance-Quote-1.56_04.tar.gz'.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote 1.56_03 Available for Evaluation

2023-06-24 Thread Bruce Schuck

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Greetings all,

Non-production release 1.56_03 is available for evaluation/testing.

https://www.cpan.org/modules/by-authors/id/B/BP/BPSCHUCK/Finance-Quote-1.56_03.tar.gz

It can be installed via cpan/cpanm as
'BPSCHUCK/Finance-Quote-1.56_03.tar.gz'.

I changed the date calculation in yahooweb to use Date::Manip instead of 
Date::Business, and return the correct exchange in yahoo_json.


There has been quite a few changes in the recent weeks, I will likely 
push F::Q v1.57 to CPAN next weekend.


Thank you to everyone who gave the recent non-production releases a test.

Bruce S.
-BEGIN PGP SIGNATURE-

iHkEARECADkWIQRzL0H5rBaeDPnpeL1IjAeprJFQBwUCZJdj8hscYnNjaHVja0Bh
c2dhcmQtc3lzdGVtcy5jb20ACgkQSIwHqayRUAcPyQCgjEQVxrsUE/mJgLPKM1dy
hy5Rld8AoN551GOqlE1TBjYpDC3tmxz9jKGh
=5/IC
-END PGP SIGNATURE-
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-23 Thread Bruce Schuck

On 6/22/23 18:47 -0700, Bruce Schuck wrote:

Assuming the F::Q 1.56_02 build files still exist in your 
C:\Strawberry\cpan\build directory, trying the stockdump.pl example 
script as I did would help.


If there is no Finance-Quote-1.56_02-? directory in 
C:\Strawberry\cpan\build (-? could be -0, -1, -2, ... ) then download 
the package from CPAN first.


C:> perl -MCPAN -e shell

cpan> get BPSCHUCK/Finance-Quote-1.56_02.tar.gz
Database was generated on Thu, 22 Jun 2023 17:25:12 GMT
Checksum for 
C:\STRAWB~1\cpan\sources\authors\id\B\BP\BPSCHUCK\Finance-Quote-1.56_02.tar.gz 
ok

Scanning cache C:\STRAWB~1\cpan\build for sizes
DONE
cpan> quit

Once downloaded, there should be both

C:\Strawberry\cpan\build\Finance-Quote-1.56_02.tar.gz

and

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0

Once you test using the the stockdump.pl example script, one can 
differentiate between an F::Q or Perl issue or a GnuCash issue.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-22 Thread Bruce Schuck

Kalpesh

Assuming the F::Q 1.56_02 build files still exist in your 
C:\Strawberry\cpan\build directory, trying the stockdump.pl example 
script as I did would help.


GnuCash 4.x uses the old gnc-fq-check gnc-fq-dump scripts for checking 
F::Q. Please show the output from trying these.


cd C:\Program Files (x86)\gnucash\bin

perl gnc-fq-check

perl gnc-fq-dump -v yahoo_json AAPL

perl gnc-fq-dump -v yahooweb AAPL

cd C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0
(directory name may be slightly different)

perl Examples\stockdump.pl yahoo_json AAPL

perl Examples\stockdump.pl yahooweb AAPL

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-22 Thread Bruce Schuck

On 6/22/23 9:16 -0400, Kalpesh Patel"  wrote:


I was using this release in a prod like env (on my own real live
files in an non-business use case) and seem to be getting unknown
error in calls from GNC since last night. What is the best way to go
about debugging this? Precise (un-helpful) error message is:



There was an unknown error while retrieving the price quotes.



Other than two securities using AlphaVantage as the source they all
use Yahoo JSON as the source.


Kalpesh,

First order of business, it's always helpful to include OS info and 
GnuCash version in addition to the F::Q version. Even better, the 
version of Perl as well (output of "perl -v" or "perl -V").


But from my quick tests, this looks like some odd issue with GnuCash, at 
least in Gnucash v5.1 build 5.1+(2023-04-30).


On my Windows 10 VirtualBox system I opened the command prompt and 
changed directory to the CPAN build directory for F::Q v1.56_02. Then 
executed F::Q's own example program. Using yahoo_json and the new 
yahooweb as the source method.


C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>perl 
Examples\stockdump.pl yahoo_json AAPL

$VAR1 = {
  'AAPL∟low' => '183.67',
  'AAPL∟last' => '186.4784',
  'AAPL∟year_range' => '  124.17 - 186.99',
  'AAPL∟open' => '183.74',
  'AAPL∟currency' => 'USD',
  'AAPL∟isodate' => '2023-06-22',
  'AAPL∟high' => '186.73',
  'AAPL∟eps' => '5.9',
  'AAPL∟pe' => '31.606506',
  'AAPL∟close' => '183.96',
  'AAPL∟date' => '06/22/2023',
  'AAPL∟div_yield' => '0.50010870001',
  'AAPL∟volume' => 34407477,
  'AAPL∟name' => 'AAPL (Apple Inc.)',
  'AAPL∟method' => 'yahoo_json',
  'AAPL∟success' => 1,
  'AAPL∟exchange' => 'Sourced from Yahoo Finance (as JSON)',
  'AAPL∟type' => 'EQUITY',
  'AAPL∟symbol' => 'AAPL'
};

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0> perl 
Examples\stockdump.pl yahooweb AAPL

$VAR1 = {
  'AAPL∟date' => '06/22/2023',
  'AAPL∟currency' => 'USD',
  'AAPL∟last' => '186.49',
  'AAPL∟isodate' => '2023-06-22',
  'AAPL∟success' => 1,
  'AAPL∟symbol' => 'AAPL',
  'AAPL∟method' => 'yahooweb',
  'AAPL∟name' => 'Apple Inc.',
  'AAPL∟exchange' => 'NasdaqGS - NasdaqGS Real Time Price'
};

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>

Both worked fine. As well as using the GnuCash CLI.

C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>gnucash-cli --verbose 
--quotes dump yahoo_json AAPL

AAPL:
  volume => 36019308
 success => 1
date => 06/22/2023
open => 183.74
high => 186.73
last => 186.4601
 low => 183.67
exchange => Sourced from Yahoo Finance (as JSON)
name => AAPL (Apple Inc.)
   div_yield => 0.50010870001
   close => 183.96
type => EQUITY
currency => USD
  symbol => AAPL
  year_range =>   124.17 - 186.99
  method => yahoo_json
 isodate => 2023-06-22
  pe => 31.603407
 eps => 5.9


C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>gnucash-cli --verbose 
--quotes dump yahooweb AAPL

AAPL:
date => 06/22/2023
currency => USD
  symbol => AAPL
name => Apple Inc.
exchange => NasdaqGS - NasdaqGS Real Time Price
  method => yahooweb
last => 186.45
 success => 1
 isodate => 2023-06-22


C:\Strawberry\cpan\build\Finance-Quote-1.56_02-0>

Thank you.

Bruce S.

P.S. - When replying to all, please remove mailing lists that you are 
not subscribed to from the recipients (in your case it was 
finance-quote-devel and finance-quote-user, but you are not the only 
guilty party).

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-18 Thread Bruce Schuck

On 6/18/23 10:34, john wrote:


I'm at a loss. Although at the current moment, YahooWeb isn't
required as long other viable quote sources exist. I like the
Date::Business module, I just wish its install honored the
PERL_USE_MM_DEFAULTS environment variable. It would be trivial to
create different holiday subroutines for various
exchanges/countries and use the one for the exchange indicated in
the data returned. I have started the process CPAN/Pause requires
for adopting the Date::Business module namespace if the original
author/authors are unresponsive.



OK, that seems to be the best alternative.


I have somewhat good news. I did some testing with Date::Manip without 
creating a config file. The Date_PrevWorkDay method does skip weekends 
properly as long the $offset is set to 1 when called on Sat/Sun.


I can replace Date::Business with Date::Manip in YahooWeb. At the very 
least it will skip back over weekends for all quotes, and not create 
issues during Date::Business install requiring for user input. We lose 
holiday calculations, but for an "emergency" use module, better than 
nothing.


Again, not optimal, but better than the original version where the trade 
date would be set to "today" regardless of what day F::Q was executed.


Happy Fathers' Day to all the dads.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-17 Thread Bruce Schuck

On June 17, 2023 at 18:43 EDT wrote:

> I'm doing preliminary testing using gnc-fq-dump with the yahoo_json
> and yahooweb sources.

> I'm getting different price formats between the two sources for
> LSE securities with yahoo_json being the correct format.

gnc-fq-dump yahoo_json SUK2.L

 symbol: SUK2.L   <=== required
   date: 06/16/2023   <=== recommended
   currency: GBP  <=== required
   last: 3.53975  <=\
nav:  <=== one of these
  price:  <=/
   timezone:  <=== optional


gnc-fq-dump yahooweb SUK2.L

 symbol: SUK2.L   <=== required
   date: 06/16/2023   <=== recommended
   currency: GBp (0.01 GBP)   <=== required
   last: 353.98   <=\
nav:  <=== one of these
  price:  <=/
   timezone:  <=== optional

Thank you Richard. I Cc'd Vincent as he quickly threw the module 
together a couple weeks ago. GBp sometimes coded as GBX for Pence 
Sterling. The emphasis was to at least have something ready if the 
current yahoo_json URL stopped working, so hurried testing was likely 
only done on US securities. And you may have seen the thread with John R 
about the trade date issue. The trade date on the web page is produced 
by Java script and cannot just be parsed from the HTML.


Thanks.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-17 Thread Bruce Schuck

On June 16, 2023 at 15:11 EDT, John Ralls wrote:


On 06/15/2023 12:23 -0700, Bruce S wrote:


Non-production release 1.56_02 is available for 
evaluation/testing.


It can be installed via cpan/cpanm as 
'BPSCHUCK/Finance-Quote-1.56_02.tar.gz'.


The YahooWeb module currently requires the Date::Business module. 
Installing it cannot be done unattended, as the Makefile.PL used 
requires a yes/no question be answered. Not updated since January 
2000, attempts to reach the author have been unsuccessful so far. 
Maybe you could use Date::Manip::Date_PrevWorkDay instead?


As I mentioned, I was looking at that along with Date::Business. I also 
looked at Date::Holidays today.


What I found about Date::Manip is that for business mode calculations 
the module requires a configuration file. See Date::Manip::Config where 
is notes:


"NOTE: if you use business mode calculations, you must have a config 
file since this is the only place where you can define holidays."


From the documentation (a rabbit hole of many man pages/PODs) that 
includes have date_PrevWorkDay skip over weekends (haven't tested if 
this just means you want to define your own custom work week).


I going to assume that requiring GnuCash users to have a config file for 
Date::Manip and keep it updated could be problematic for some.


What I found about Date::Holidays so far is that users would need to 
install all the Date::Holidays:: modules that Finance::Quote 
may use. F::Q would then be at the mercy of all the different authors 
with respect to those modules being updated. Also, the current US or 
USFederal modules do not account for Juneteenth or Good Friday. 
Juneteenth being a newly created holiday here in the US, and Good Friday 
is observed by the US stock market each year.


But either way it's pretty US-centric because of the holidays 
enumeration. What about the Monday-Friday trading days assumption?

Is that valid for all of the stock markets that Yahoo can get quotes
for?
I'm at a loss. Although at the current moment, YahooWeb isn't required 
as long other viable quote sources exist. I like the Date::Business 
module, I just wish its install honored the PERL_USE_MM_DEFAULTS 
environment variable. It would be trivial to create different holiday 
subroutines for various exchanges/countries and use the one for the 
exchange indicated in the data returned. I have started the process 
CPAN/Pause requires for adopting the Date::Business module namespace if 
the original author/authors are unresponsive.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-16 Thread Bruce Schuck

On 6/16/23 12:11 PM, John Ralls wrote:


Maybe you could use Date::Manip::Date_PrevWorkDay instead?



But either way it's pretty US-centric because of the holidays
enumeration. What about the Monday-Friday trading days assumption? Is
that valid for all of the stock markets that Yahoo can get quotes
for?


The module was written by Vincent L. Without a trade date available in 
the HTML, I added using Date::Business as a quick fix for the time 
being. Before pushing 1.57 to CPAN I may just revert to Vincent's 
original version which uses today's date at the trade date, even if 
executed on weekends and holidays. Pick yer poison, I was just trying to 
make it a little better for some subset of users.


Thanks.

BTW - Fixed the 2025 US NYSE holiday dates in YahooWeb.pm.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-16 Thread Bruce Schuck

On 6/16/23 10:12 AM, Murugan Muruganandam wrote:


i checked YahooWeb module with different combinations including
symbols with .extensions , all the quotes were fetched correctly.


Awesome, thank you for the response.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-16 Thread Bruce Schuck

On 06/15/2023 12:23 -0700, Bruce S wrote:

Non-production release 1.56_02 is available for evaluation/testing. 
https://www.cpan.org/modules/by-authors/id/B/BP/BPSCHUCK/Finance-Quote-1.56_02.tar.gz


> It can be installed via cpan/cpanm as

'BPSCHUCK/Finance-Quote-1.56_02.tar.gz'.


The YahooWeb module currently requires the Date::Business module. 
Installing it cannot be done unattended, as the Makefile.PL used 
requires a yes/no question be answered. Not updated since January 2000, 
attempts to reach the author have been unsuccessful so far.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote 1.56_02 Available for Evaluation

2023-06-15 Thread Bruce Schuck

Greetings all,

Non-production release 1.56_02 is available for evaluation/testing.

https://www.cpan.org/modules/by-authors/id/B/BP/BPSCHUCK/Finance-Quote-1.56_02.tar.gz

It can be installed via cpan/cpanm as 
'BPSCHUCK/Finance-Quote-1.56_02.tar.gz'.


Anticipating that Yahoo may block access to the URL used in the 
YahooJSON (yahoo_json) module, there are 3 new modules that gather 
information from URLs normally accessed through a browser.


GoogleWeb (googleweb)
MarketWatch (marketwatch)
YahooWeb (yahooweb)

In addition the Fool module was corrected so it now works.

Bruce S.

___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance::Quote PreRelease

2023-06-07 Thread Bruce Schuck

Hello all,

We've been trying to stay ahead of yet another possible disruption of 
the URL F::Q uses to fetch data in JSON format from Yahoo.


Work is underway to extract data from the HTML of a standard Yahoo 
Finance page such as https://finance.yahoo.com/quote/AAPL?p=AAPL. In the 
meantime, there have been fixes/updates to AEX (aex), IndiaMutual 
(indiamutual), and Fool (fool). There is a completely new module to 
extract data from https://www.marketwatch.com/, MarketWatch (marketwatch).


You can download a recent trial release from CPAN as 
'BPSCHUCK/Finance-Quote-1.56_01.tar.gz'.


Thank you.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance::Quote Quote Throttling

2023-06-03 Thread Bruce Schuck

On 6/3/23 13:40, Mike Alexander wrote:

I would pay a few dollars a month for a key to avoid throttling. I 
looked into buying a key from IEXCloud, but the cheapest one that

seems to do the trick is $1500 a month. :-)


In other words, your answer is no.

Obviously we are aware of the cost of the various vendors' API offerings 
and have no control over that. So the question was not meant to assume a 
hypothetical "if the vendors reduced their pricing would you...". Rather 
than looking to see if anybody may already be paying for premium keys or 
were thinking about it but are aware that F::Q throttles regardless of 
key type.


Thanks for the response though.

Bruce
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] New Finance-Quote-User email List at SourceForge

2023-06-03 Thread Bruce Schuck

Greetings all,

Just an FYI. I created a new finance-quote-u...@lists.sourceforge.net 
email list. This will augment any ongoing discussions on 
https://github.com/finance-quote/finance-quote/discussions.


Have a good weekend.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] [Finance-quote-news] Finance-Quote 1.56 released!

2023-05-30 Thread Bruce Schuck

On 5/30/23 12:59 PM, Vincent Lucarelli wrote:


You can verify that by setting the environment variable DEBUG=1 and
repeating the gnucash-cli command.  You should see the AlphaVantage
key error.



I don’t think we’ve clearly documented this requirement anywhere and
maybe we should change the code to error out only if currency
conversion is actually necessary and the Currency module API key
isn’t set.  We can move this part of the discussion to our GitHub
project.


Skipping the currency conversion when it's not needed does indeed sound 
like a good idea. And as long as Yahoo does not block the 
query1.finance.yahoo.com/v11/finance/... URL, there is now a 
CurrencyRates::YahooJSON currency module. Not sure if want to make it 
the default, but currently users can set an environment variable "export 
FQ_CURRENCY=YahooJSON" to use it instead of AlphaVantage.


Thanks.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] [Finance-quote-news] Finance-Quote 1.56 released!

2023-05-30 Thread Bruce Schuck

On 5/30/23 7:59 AM, Fross, Michael wrote:


Running directly via the rest api works:
https://api.twelvedata.com/quote?symbol=acn=xx 
 
(I've hidden the actual key)



But when I run:

C:\Program Files (x86)\gnucash\bin>gnucash-cli.exe --verbose --extra -Q 
dump twelvedata aapl
Finance::Quote reported a failure for symbol aapl: TwevleData return and 
unexpected json result



I have the environment variable set:
C:\>echo %TWELVEDATA_API_KEY
xx  (I've hidden the actual key)



Something seems off and it's probably on my part.


Michael,

I am not sure if it is on your end. Please open an issue on 
https://github.com/finance-quote/finance-quote/issues.


Vincent, you just contributed this mmodule, could you please look at this?

Thank you.

Bruce S
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Revisiting Quotes (Bruce Schuck)

2023-05-29 Thread Bruce Schuck
While I would confirm if the Python source is grabbing the normal 
webpage or the API calls we use(d) in F::Q, this did give me the idea

to search CPAN. I found the module Yahoo::Finance which may also be a
good start and possibly does the heavy lifting already.


Colin,

The Yahoo::Finance Perl module is based on the 
https://query2.finance.yahoo.com/v7/... URL. So it's currently broken. 
Looking at the source for the yfinance Python library, it uses a couple 
different Yahoo URLs including at least one instance of a 
https://query2.finance.yahoo.com/v10/... URL.


Which means that if Yahoo blocks access to the v10 and v11 URLs, both 
Finance::Quote::YahooJSON and yfinance will break.


It was worth a look though.

As I said, extracting the data from the HTML returned from 
https://finance.yahoo.com/quote/AAPL?p=AAPL&.tsrc=fin-srch is doable. 
Just not as simple as parsing JSON. I recently created the 
Finance::Quote::BVB module to replace a broken module of a different 
name for Romanian stocks. It is a web scrape of the HTML.


Thanks.

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Revisiting Quotes (Bruce Schuck)

2023-05-29 Thread Bruce Schuck

On 5/29/23 7:41 PM, Colin Arndt wrote:


Thanks for all your work to keep up this past month. The latest 1.56
 update fixes price retrieval within GnuCash.



This means modules will need to be rewritten to parse the HTML.
Doable, but not as simple as parsing JSON.



There is an excellent python module ‘yfinance’ which does exactly
this - scrapes price data from Yahoo!’s website. This might not be of
any use because it’s written in python instead of Perl, but
nonetheless wanted to make sure you’re aware of it.


Colin,

While I would confirm if the Python source is grabbing the normal web 
page or the API calls we use(d) in F::Q, this did give me the idea to 
search CPAN. I found the module Yahoo::Finance which may also be a good 
start and possibly does the heavy lifting already.


Thanks a bunch for the info!

Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Finance-Quote 1.56 released!

2023-05-29 Thread Bruce Schuck

On 5/29/23 15:13, WR D wrote:


Can I confirm ... does this take time to propagate?


Depending on what CPAN mirrors are configured on your system, yes.


So I am not clear if this install method will update eventually and
then look for 1.56?


Unless there is some other issue with your CPAN or Perl installation, 
you are correct?


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


[GNC] Finance-Quote 1.56 released!

2023-05-29 Thread Bruce Schuck
New version 1.56 of Finance-Quote is available with the following changes:

  * Replaced Tradeville.pm with BVB.pm - Issue #269
* Added new TwelveData module
* Updated YahooJSON.pm and CurrencyRates/YahooJSON.pm to use 
https://query2.finance.yahoo.com/v11 - PR #284
* Bourso.pm - Squash anything but numbers and period in quote values.
* Renamed MStarUK.pm to MorningstarUK.pm
* Added get_features method - PR #260

Authors:
  - Erik Colson 
  - Paul Fenwick 
  - Vincent Lucarelli 
  - David Hampton 
  - Bruce Schuck 
  - jvolkening 
  - Pawel Konieczny 
  - AndreJ 
  - Mike Alexander 
  - Vinay S Shastry 
  - Bradley Dean 
  - Brent Neal 
  - Jacinta Richardson 
  - e-dorigatti 
  - goodvibes2 
  - Sam Morris 
  - Linas Vepstas 
  - Manuel Friedli 
  - Diego Marcolungo 
  - John Haiducek 
  - alex314159 
  - gregor herrmann 
  - Hiranya Samarasekera 
  - Jalon Avens 
  - Paul Howarth 
  - Sigve Indregard 
  - goodvibes2 
  - Ben Hemming 
  - Caleb Begly 
  - CleanShed <72849657+cleans...@users.noreply.github.com>
  - Eelco Dolstra 
  - Emmanuel Di Pretoro 
  - Florian Schlichting 
  - GitGord <46006740+gitg...@users.noreply.github.com>
  - Gustavo R. Montesino 
  - Henrik Ahlgren 
  - Jean-Marie Pacquet 
  - Lance Wicks 
  - Liviu Tinta 
  - Martin Kompf 
  - Pete Ratzlaff 
  - Ross Peachey 
  - Stephan Ebelt 
  - linas 
  - thinus 
  - x42x64 
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


Re: [GNC] Revisiting Quotes

2023-05-29 Thread Bruce Schuck

On Thu May 25, 2023 at 14:59:14 EDT R Losey wrote:

From the discussion here, one would get the idea that the only two 
options for quotes are Alphavantage and Yahoo/JSON... don't the other

options work? I seem to remember seeing a very long list of options.
Most of the other modules retrieve data for non-US based securities, or 
specific funds such as TSP.pm for data from https://www.tsp.gov/. 
Fool.pm is one that probably just needs someone to spend a little time 
investigating why it no longer works, but it could be a viable alternative.


People either forget or don't realize that companies like AlphaVantage, 
Yahoo, Alphabet (aka Google), and others pay for the stock market data 
available on their websites or through APIs. Along with what is likely a 
a large cost, there are license limitations on how they may make that 
data available to others. This would be the reason AlphaVantage has 
limits placed on access using the free API key, and probably why Yahoo 
has been blocking access to long utilized URLs/APIs. I fully expect the 
new URL for Yahoo in coming F::Q release 1.56 to get blocked at some 
point. Maybe a few months, maybe a year, but I would bet on it.


This means modules will need to be rewritten to parse the HTML. Doable, 
but not as simple as parsing JSON.


Bruce S.
___
gnucash-user mailing list
gnucash-user@gnucash.org
To update your subscription preferences or to unsubscribe:
https://lists.gnucash.org/mailman/listinfo/gnucash-user
-
Please remember to CC this list on all your replies.
You can do this by using Reply-To-List or Reply-All.


  1   2   >