Currency Quotes

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Currency Quotes

Plutocrat
[hidden email] wrote on Monday, 06 November, 2017 05:14 AM:
> Please note that while AlphaVantage does appear to offer quite a bunch
> of quotes, it doesn't seem to support funds nor currencies.
>
> I hope someone will come up with one or more sites offering those info
> so I can work on that part too.  However, my freetime is sparse and I
> already took some time I should have put on real world work.  So more
> coding might take more time to happen...

I've been using OpenExchangeRates for Currency rates. It works pretty well. Needs an API id too.

https://openexchangerates.org/

URL format is pretty simple to return info in json.

https://openexchangerates.org/api/latest.json?app_id=12372uyjhkjh123hk1h2k31

P.
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Currency Quotes

Alun Champion-2
Alphavantage supports currencies, e.g.:

$ export ALPHAVANTAGE_API_KEY=XXX
$ gnc-fq-dump alphavantage GBPUSD=X
Finance::Quote fields Gnucash uses:
    symbol: GBPUSD=X             <=== required
      date: 11/09/2017           <=== recommended
  currency: USD                  <=== required
      last: 1.3139               <=\
       nav:                      <=== one of these
     price:                      <=/
  timezone:                      <=== optional

Haven't quite figured out how to get Gnucash to use this yet.

On 5 November 2017 at 21:30, Plutocrat <[hidden email]> wrote:

> [hidden email] wrote on Monday, 06 November, 2017 05:14
> AM:
> > Please note that while AlphaVantage does appear to offer quite a bunch
> > of quotes, it doesn't seem to support funds nor currencies.
> >
> > I hope someone will come up with one or more sites offering those info
> > so I can work on that part too.  However, my freetime is sparse and I
> > already took some time I should have put on real world work.  So more
> > coding might take more time to happen...
>
> I've been using OpenExchangeRates for Currency rates. It works pretty
> well. Needs an API id too.
>
> https://openexchangerates.org/
>
> URL format is pretty simple to return info in json.
>
> https://openexchangerates.org/api/latest.json?app_id=
> 12372uyjhkjh123hk1h2k31
>
> P.
> _______________________________________________
> gnucash-user mailing list
> [hidden email]
> 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.
>
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Currency Quotes

Erik Colson

Alun Champion <[hidden email]> writes:

> Alphavantage supports currencies, e.g.:
>
> $ export ALPHAVANTAGE_API_KEY=XXX
> $ gnc-fq-dump alphavantage GBPUSD=X
> Finance::Quote fields Gnucash uses:
>     symbol: GBPUSD=X             <=== required
>       date: 11/09/2017           <=== recommended
>   currency: USD                  <=== required
>       last: 1.3139               <=\
>        nav:                      <=== one of these
>      price:                      <=/
>   timezone:                      <=== optional
>
> Haven't quite figured out how to get Gnucash to use this yet.

F::Q has a different API for currencies.  The source has to be moved to
alphavantage which will probably be done next weekend.  Till then,
GnuCash will probably not have currency rates anymore..

best
--
erik colson
_______________________________________________
gnucash-user mailing list
[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

Re: Currency Quotes

Alun Champion-2
Yes, I was looking at the F::Q Currencies.pm, unfortunately I’m not
proficient enough in Perl to do that confidently.

Alphavantage also has a the separate API for currencies which will be more
efficient because it only returns the current exchange rate (vs this daily
history for stocks), e.g.:

$ curl "[https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=GBP&to_currency=USD&apikey=XXX](https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=GBP&to_currency=USD&apikey=XXX)"

This API call also works for Crypto Currencies, e.g.:

$ curl "[https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=BTC&to_currency=USD&apikey=XXX](https://www.alphavantage.co/query?function=CURRENCY_EXCHANGE_RATE&from_currency=BTC&to_currency=USD&apikey=XXX)"

It just happens that ‘function=TIME_SERIES_DAILY’ with ‘symbol=GBPUSD=X’
also returns currency exchange rates for daily history, e.g.:

$ curl "[https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&outputsize=compact&symbol=GBPUSD=X&apikey=XXX](https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&outputsize=compact&symbol=GBPUSD=X&apikey=XXX)"

Which allowed gnc-fq-dump to work.
-A.

On 9 November 2017 at 03:51, Erik Colson <[hidden email]> wrote:


> Alun Champion <[hidden email]> writes:
>
> > Alphavantage supports currencies, e.g.:
> >
> > $ export ALPHAVANTAGE_API_KEY=XXX
> > $ gnc-fq-dump alphavantage GBPUSD=X
> > Finance::Quote fields Gnucash uses:
> >     symbol: GBPUSD=X             <=== required
> >       date: 11/09/2017           <=== recommended
> >   currency: USD                  <=== required
> >       last: 1.3139               <=\
> >        nav:                      <=== one of these
> >      price:                      <=/
> >   timezone:                      <=== optional
> >
> > Haven't quite figured out how to get Gnucash to use this yet.
>
> F::Q has a different API for currencies.  The source has to be moved to
> alphavantage which will probably be done next weekend.  Till then,
> GnuCash will probably not have currency rates anymore..
>
> best
> --
> erik colson
>

_______________________________________________
gnucash-user mailing list
[hidden email]
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.