chart api fails when stock ticker contains a period such as BRK.B
Bug Report
Describe the bug
api fails when stock ticker contains a period such as BRK.B
Minimal Reproduction
await yfinance.chart('BRK.B', { period1: new Date(), period2: new Date() - 100, interval: '1d' });
Environment
Browser or Node: node
Node version (if applicable): latest LTS version
Npm version:
Browser verion (if applicable):
Library version (e.g. 1.10.1):
Additional Context
I just had the same error today.
I fixed it when I realized that yahoo finance uses BRK-B instead of BRK.B on their page.
See https://finance.yahoo.com/quote/BRK-B
Hi all, thanks, yes, as @YannickDot said, there is no such symbol BRK.B on Yahoo and you probably meant BRK-B, so, the error:
Error: Uncaught (in promise) Error: No data found, symbol may be delisted
is accurate. Chart API works fine for sybols with dots / periods.