Replies: 4 comments 3 replies
|
its a good idea, perhaps I'll extended the existing fields webpage to show also the possible values for each field, what do you think? |
|
I think extending the webpage to cover field values is a great idea - preferable to mine (bringing data into the project) which would always limit the data to a snapshot 'as of the release date of the installed version'. If you were able to extend the webpage I'd probably then have a look at writing a function that gets the data direct from the webpage. This might offer the best of both worlds - up-to-date data and search functionality to be able to do the likes of Cheers |
|
Yo @maread99 check out the new fields page! Now all that's left is to update all the docs references with links like this: And to bump the version ofc |
|
And least I forget: https://shner-elmo.github.io/TradingView-Screener/markets.html |
Uh oh!
There was an error while loading. Please reload this page.
Hi @shner-elmo
What a great package! Thanks for making this open source and continuing to maintain it.
I've been having a bit of a dig around in the code (you'll see I've offered a couple of small PRs). I particularly like the design choice to go 'thin-wrapper' and opting to provide field info via the daily-updated webpage rather than hardcode volatile endpoints. Here comes the but...a negative consequence I've come across is the lack of knowledge on possible values for fields which are effectively categorical, not least "market" and "index". I'm left with the question, where can I find an up-to-date set of values that these fields can take? I see that they are available in the stocks.json file in the metadata directory on the docs branch. I suspect it would be pretty simple to create a function that could read this .json file and return the values for a given field (and indeed all field names themselves). It wouldn't seem to be too much of a stretch to add an option to return only those values that match a pattern, so that one could query, for example,
get_stock_field_values("index", pattern="IBEX"). However, all this would require the docs, or at least a copy ofstocks.json, being within the project on the master branch...Is the workflow for the 'pages build and deployment' action anywhere in the public repo (I've been driving myself slightly mad looking for it)? Would you consider extending the action to include a copy of the daily-updated
stocks.jsonfile to somewhere in the project on the master branch? If that were possible I'd happily look at writingget_stock_field_values.Thanks again.
Marcus
All reactions