can we call live stream and historical simultaneously in parallel ??

Madan M. shared this question 6 months ago
Answered

i am going to subscribe both Historical and Live stream API services.

can we call live stream and historical simultaneously in parallel through Python program ?? or we can only request one by one ??

Comments (1)

photo
1

If you subscribe to both Historical and Live Streaming using our Market Data (WebSocket) API service, you would be able to fetch Real-Time Data and Historical Data simultaneously in parallel. This can also be done using our python or nodejs libraries which we provide.

You can also join TrueData Forum and Telegram Channel wherein you would find many more queries being answered related to Market Data API services.

photo
1

Hi,

Could you plz help me with below error:

(2021-09-05 23:28:43,029) WARNING :: Connected successfully to TrueData Real Time Data Service... (PID:22948 Thread:18892)

(2021-09-05 23:28:43,179) ERROR :: Failed to connect REST historical API -> <class 'requests.exceptions.SSLError'> = HTTPSConnectionPool(host='auth.truedata.in', port=443): Max retries exceeded with url: /token (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1129)'))) (PID:22948 Thread:22316)

Please wait.. Beginning Historical Data Test !

Traceback (most recent call last):

File "d:\StockFetch\test.py", line 24, in <module>

hist_data_1 = td_obj.get_historic_data(f'{symbol}')

File "C:\Users\poonam.kumari03\AppData\Local\Programs\Python\Python39\lib\site-packages\truedata_ws\websocket\TD.py", line 130, in get_historic_data

return self.get_historical_data_from_duration(contract=contract,

File "C:\Users\poonam.kumari03\AppData\Local\Programs\Python\Python39\lib\site-packages\truedata_ws\websocket\TD.py", line 173, in get_historical_data_from_duration

hist_data = self.historical_datasource.get_historic_data(contract, end_time, start_time, bar_size, options=options, bidask=bidask)

File "C:\Users\poonam.kumari03\AppData\Local\Programs\Python\Python39\lib\site-packages\truedata_ws\websocket\support.py", line 324, in dec_helper

if obj.access_token_expiry_time < datetime.now():

TypeError: '<' not supported between instances of 'NoneType' and 'datetime.datetime'

photo
1

There seems to be an issue with your code.

To begin with, please first test the Historical REST API, with your login details on our sandbox page

https://wstest.truedata.in/

Let us know how that goes and then you can check your code accordingly.

photo
Leave a Comment
 
Attach a file