Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update constants.py #35

Open
tameike000 opened this issue Jul 6, 2024 · 12 comments
Open

Update constants.py #35

tameike000 opened this issue Jul 6, 2024 · 12 comments

Comments

@tameike000
Copy link

First, great package!

I tried to use "close_1_days_back" and I get:
requests.exceptions.HTTPError: 400 Client Error: Bad Request
Body: {"totalCount":0,"error":"Unknown field "close_1_days_back"","data":null}

Seems not existing (anymore).

Is there a way to create an updated constants.py?

Thanks!!
M

@shner-elmo
Copy link
Owner

Hey, thanks for the feedback.

Yeah, the fields change all the time, that's why I'm thinking of putting them on the website instead of hard-coding them in the library.

I could definitely update it, but I'm curious where you usually search the fields: in the Github repository, source code installed locally, or the docs at https://shner-elmo.github.io/TradingView-Screener?

@tameike000
Copy link
Author

tameike000 commented Jul 7, 2024

I am a docs guys ;-) But that's me ...

Thank's for looking into this!

@shner-elmo
Copy link
Owner

@tameike000 It's not officially published, but check this out:
https://shner-elmo.github.io/TradingView-Screener/fields/stocks.html

I'd appreciate it if you can give me some feedback

@Stail7
Copy link

Stail7 commented Jul 10, 2024

@tameike000 It's not officially published, but check this out: https://shner-elmo.github.io/TradingView-Screener/fields/stocks.html

I'd appreciate it if you can give me some feedback

Great page! Thank you!
Is there a way (except of using another API) to get a Daily prices for: close[2], close[1] and low[1] (where: 2 - two days ago, 1 - one day ago)?
I need this data to create a short sale restriction condition (SSR)

@tameike000
Copy link
Author

@tameike000 It's not officially published, but check this out: https://shner-elmo.github.io/TradingView-Screener/fields/stocks.html

I'd appreciate it if you can give me some feedback

That's Gold!!

Thanks!!

@shner-elmo
Copy link
Owner

@Stail7 Thanks. I don't think you can do that through the screener API.

There is another API that the charts use to get historical and live data through a websocket I believe, but haven't looked into it.

@shner-elmo shner-elmo changed the title close_1_days_back Update constants.py Jul 20, 2024
@dietmarb01
Copy link

Thanks for this list, it is immensely helpful!
IMHO there are different approaches:

  • you provide the list and update it every now and then (I would prefer github for config mgt over a web page)
  • you provide a utility for consumers to pull the list from ... (where?), but TradingView might not welcome this if it puts unreasonable stress on their system.

@shner-elmo
Copy link
Owner

shner-elmo commented Aug 11, 2024

@dietmarb01 of course, glad you found it useful.

That page is generated every day through a cronjob, to keep the data updated (if you look in the bottom it says the UTC time it was last generated).

Regarding your second point, why would you want to pull the list? is it for runtime validation or what?
And yes I agree, we need to be careful not to overwhelm TradingView's API.

@shner-elmo
Copy link
Owner

shner-elmo commented Aug 11, 2024

While I'm at it, other than removing constants.py in the next major release, I'm also going to remove screener.py, because screeners also change.

What do you guys think about the following:
https://shner-elmo.github.io/TradingView-Screener/screeners/main_screeners.html
https://shner-elmo.github.io/TradingView-Screener/screeners/stocks/america.html

(the code doesn't work with the latest PyPi version, you need to clone master if you want to test the queries)

@shner-elmo
Copy link
Owner

Also implemented syntax for And/Or filtering:
image

@hitemel
Copy link

hitemel commented Sep 8, 2024

@tameike000 It's not officially published, but check this out: https://shner-elmo.github.io/TradingView-Screener/fields/stocks.html

I'd appreciate it if you can give me some feedback

Thats a great info. Thank you.

@shner-elmo
Copy link
Owner

Thats a great info. Thank you.

Of course, glad you find it useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants