python-tradingview-ta icon indicating copy to clipboard operation
python-tradingview-ta copied to clipboard

Reading the price

Open AminAbdiyan opened this issue 4 years ago • 5 comments

Hello, How can I read the current price?

AminAbdiyan avatar Sep 05 '20 22:09 AminAbdiyan

Hello AminAbdiyan,

python-tradingview-ta is not designed to read realtime prices. However, you can read the simple moving average, which is the average price.

To read the realtime price, you can use free API from finnhub[dot]io, alphavantage[dot]co, or directly from an exchange.

Please let me know if you have any other questions.

folfcoder avatar Sep 05 '20 23:09 folfcoder

Hello deathlyface,

Thank you for your quick reply. I scan the network with Chrome dev tools but when price changes there is no request, how Tradingview update price?

AminAbdiyan avatar Sep 06 '20 09:09 AminAbdiyan

As I said in the previous comment, TradingView's API is not in realtime. You need to send a request repeatedly according to the timeframe, for example every 1 minute.

folfcoder avatar Sep 06 '20 13:09 folfcoder

Might consider the gist here giving streaming data from TV

rahulmr avatar Oct 27 '20 21:10 rahulmr

can read prices with python and metatrader with this repo

TheSnowGuru avatar Dec 14 '20 13:12 TheSnowGuru