Open pingplass123 opened 1 day ago
@gadicc do you have time to see this?
@pingplass123, trendingSymbols
and screener
worked fine for me, but maybe I didn't quite understand your code. Code sample and output below. Those 400 "Bad Request" errors can often be transient errors on Yahoo, that fix themselves. dailyGainers
had a validation which I'll need to look into, however, that error comes with instructions on how you can disable validation per request if you'd like.
Hope that helps!
@gadicc this my function i try to seem like you but i have bad request idk what wrong
async stockTrending(): Promise<any> {
try {
const queryOptions = { count: 5, region: "US", lang: "en-US" };
const result = await yahooFinance.trendingSymbols("US", queryOptions)
return result;
} catch (error) {
this.logger.error('Failed to fetch stock trending', error.message);
throw new Error('Failed to fetch stock trending');
}
}
Sometimes it can be region specific. Where are you based? Try from another country with a VPN if possible, and I'll look into it further as soon as I can (and once I know where you are making your requests from). Thanks for your patience, super busy period for me atm 😞
On Wed, 16 Oct 2024, 17:07 Areefeen Hayeeyapa, @.***> wrote:
@gadicc https://github.com/gadicc this my function i try to seem like you but i have bad request idk what wrong
async stockTrending(): Promise
{ try { const queryOptions = { count: 5, region: "US", lang: "en-US" }; const result = await yahooFinance.trendingSymbols("US", queryOptions) return result; } catch (error) { this.logger.error('Failed to fetch stock trending', error.message); throw new Error('Failed to fetch stock trending'); } } — Reply to this email directly, view it on GitHub https://github.com/gadicc/node-yahoo-finance2/issues/820#issuecomment-2417235159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAC5IGVF64TI5WUZT3UPCELZ32FMZAVCNFSM6AAAAABP6N4PTSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJXGIZTKMJVHE . You are receiving this because you were mentioned.Message ID: @.***>
i request from thailand so i will try to vpn and call it again
Bug Report
Describe the bug
when i try to use this 3 module trendingSymbols, screener, dailyGainers for parameter i try to use the same as docs when call yahoo finance return bad request with all 3 module
Minimal Reproduction
Environment
Browser or Node: Node version (if applicable): 18 Npm version: Browser verion (if applicable): Library version (e.g.
1.10.1
): 2.13.2Additional Context