ValueRaider / yfinance-cache

Caching wrapper for yfinance module. Intelligent caching, not dumb caching of web requests.
MIT License
22 stars 9 forks source link

Issue with exchange_calendars and currencies (CCY) #58

Closed KentFredo closed 1 month ago

KentFredo commented 2 months ago

Hey everyone, first of all thanks for the great library.

I have just switched from yfinance to this lib and am trying to get currency data such as 'EUR=X'. YFC gets the exchange as CCY, which is not known by exchange_calendars. However, creating a custom calendar / creating an alias and linking to another calendar is not helping.

I am always receiving this exception from yfc.time.

_raise Exception("Need to add mapping of exchange {} to xcal (ticker={})".format(exchange, self.ticker))

Exception: Need to add mapping of exchange CCY to xcal (ticker=EUR=X)_

I am quite new here.. how are you dealing with currency conversion and gettig currencies?

ValueRaider commented 2 months ago

I need FX rarely so just use yfinance direct. But I have FX and crypto working locally so expect an update soon.

ValueRaider commented 2 months ago

Checkout branch feature/prices-updates

KentFredo commented 2 months ago

That was quick, thanks a lot! Just tested it briefly, branch looks fine so far.

ValueRaider commented 2 months ago

Are you ok to keep using branch? I'm working on some other price fixes, will release together.

KentFredo commented 2 months ago

Definitly, that is fine for me. So far, all changes working stable.