Planned maintenance tomorrow
We have a planned maintenance from 9:00 am to 11:45 am tomorrow ( 26 Jan). Will update once the maintenance is complete.
We have a planned maintenance from 9:00 am to 11:45 am tomorrow ( 26 Jan). Will update once the maintenance is complete.
Python Library - Bug Reported - For History requests using the default end_time
For Historical data requests, if you are using default end_time , you will get the data up to end_time as 11:59:59 am only and not up to the current time.
This has been corrected in the Python library version 2.0.3, which is being uploaded tonight !
Please continue to report all bugs & improvements to us.
For Historical data requests, if you are using default end_time , you will get the data up to end_time as 11:59:59 am only and not up to the current time.
This has been corrected in the Python library version 2.0.3, which is being uploaded tonight !
Please continue to report all bugs & improvements to us.
Python Library updated v 2.0.3
Incorrect default end_time corrected !
Incorrect default end_time corrected !
https://pypi.org/project/truedata-ws/
pip install —upgrade truedata-ws
Python library Tips for Beginners - Sample code to get anything in Real Time
> Everything is an object
> You can get any data field you need from this object...
> Say, you need the LTP in Real time, then just use '.ltp', like so...
Symbol > LTP > Change (have used an f string for the change, to limit the decimals to 2)
> Try this code to understand how to use it better in your code. (Rotate ur phone or check this code on your PC to see it with proper formatting)
> Everything is an object
> You can get any data field you need from this object...
> Say, you need the LTP in Real time, then just use '.ltp', like so...
td_app.live_data[req_id].ltp
> Here is a sample code to print out the following;-Symbol > LTP > Change (have used an f string for the change, to limit the decimals to 2)
> Try this code to understand how to use it better in your code. (Rotate ur phone or check this code on your PC to see it with proper formatting)
req_ids = td_app.start_live_data(symbols)
live_data_objs = {}
time.sleep(1)
for req_id in req_ids:
live_data_objs[req_id] = deepcopy(td_app.live_data[req_id])
while True:
for req_id in req_ids:
if not td_app.live_data[req_id] == live_data_objs[req_id]:
print(td_app.live_data[req_id].symbol, '>',
td_app.live_data[req_id].ltp,'>',
f'{td_app.live_data[req_id].change:.2f}')
live_data_objs[req_id] = deepcopy(td_app.live_data[req_id])
Output (Format : Symbol > LTP > Change)
————
————
GOLDM-I > 49106.0 > 434.00
CRUDEOIL-I > 3809.0 > -18.00
SILVER-I > 69602.0 > 2007.00
SILVERM-I > 69554.0 > 1970.00
GOLDM-I > 49106.0 > 434.00
CRUDEOIL-I > 3809.0 > -18.00
GOLD-I > 49093.0 > 469.00
MCXCOMPDEX > 10636.15 > 73.89
SILVERM-I > 69536.0 > 1952.00
SILVER-I > 69582.0 > 1987.00
GOLDM-I > 49108.0 > 436.00
Python Library - Understanding Tick Type
In the python library we provide an additional field with each tick called tick_type.
This field helps in understanding if the data which has just landed is that of a new trade or a new Bid / Ask without a trade tick.
Further explanation below:-
1) tick_type = 1 > There has been a new trade in the symbol with new volume.
The following things would happen in this :-
(a) We have a new trade and thus a new LTP. Plus new LTQ, ATP, TTQ, Turnover etc...
(b) Updated Bid Ask would also show in respective fields
(Unless you have requested for the Bid Ask to be disabled from our backend)
(c) Tick sequence for the symbol, for the day, would be incremented by 1
2) tick_type = 2 > There is no new trade in the symbol but there has been a Bid, Bid Qty, Ask or Ask Qty change / update.
The following things would happen in this :-
(a) Updated Bid Ask and / or Bid Ask Qty
(Unless you have requested for the Bid Ask to be disabled from our backend)
(b) These fields would remain the same as per the last trade > LTP, LTQ, ATP, TTQ, Turnover, Special Tag etc..
(c) Tick sequence for the symbol, for the day, would not be incremented
In the python library we provide an additional field with each tick called tick_type.
This field helps in understanding if the data which has just landed is that of a new trade or a new Bid / Ask without a trade tick.
Further explanation below:-
1) tick_type = 1 > There has been a new trade in the symbol with new volume.
The following things would happen in this :-
(a) We have a new trade and thus a new LTP. Plus new LTQ, ATP, TTQ, Turnover etc...
(b) Updated Bid Ask would also show in respective fields
(Unless you have requested for the Bid Ask to be disabled from our backend)
(c) Tick sequence for the symbol, for the day, would be incremented by 1
2) tick_type = 2 > There is no new trade in the symbol but there has been a Bid, Bid Qty, Ask or Ask Qty change / update.
The following things would happen in this :-
(a) Updated Bid Ask and / or Bid Ask Qty
(Unless you have requested for the Bid Ask to be disabled from our backend)
(b) These fields would remain the same as per the last trade > LTP, LTQ, ATP, TTQ, Turnover, Special Tag etc..
(c) Tick sequence for the symbol, for the day, would not be incremented
Python Library Upgraded v 2.0.5
If you are using the python library, please know that the library has been upgraded to version 2.0.4 & further to v 2.0.5 now. Please upgrade to the latest version.
Both v 2.0.4 & v 2.0.5 handle the same bug. (v 2.0.5 handles the bug specifically for the 1 min live streaming feed. If you don't use the 1 min streaming feed you do not need to upgrade to this. But if you do use the 1 min live streaming feed, please upgrade to v 2.0.5)
This bug was reported by one of our patrons using the api.
Thank you so much Mr. Niranjan Kumar helping us in improving this api for everyone !
Please keep coming back with any bugs or improvements which you would like.
If you are using the python library, please know that the library has been upgraded to version 2.0.4 & further to v 2.0.5 now. Please upgrade to the latest version.
pip install —upgrade truedata-ws
orpip install truedata-ws==2.0.5
This library removes a bug which existed in the calculation of the OI Change percentage. Both v 2.0.4 & v 2.0.5 handle the same bug. (v 2.0.5 handles the bug specifically for the 1 min live streaming feed. If you don't use the 1 min streaming feed you do not need to upgrade to this. But if you do use the 1 min live streaming feed, please upgrade to v 2.0.5)
This bug was reported by one of our patrons using the api.
Thank you so much Mr. Niranjan Kumar helping us in improving this api for everyone !
Please keep coming back with any bugs or improvements which you would like.
REST APIs for Historical Data - Coming soon
We are in the process of moving away from Websockets for Historical data to REST / HTTP based APIs. These REST APIs would help us add more features and allow for much faster downloads of historical data.
Please note:-
i) The Real time feed would continue to be unaffected and would continue to be served over Websockets.
ii) There would be a sufficient overlap period for both the services to allow for smooth migration.
iii) The python library would be updated also in due course and it would be our endeavor to make the migration for the library users to be seamless.
We will update you soon about the upcoming upgrades.
We are in the process of moving away from Websockets for Historical data to REST / HTTP based APIs. These REST APIs would help us add more features and allow for much faster downloads of historical data.
Please note:-
i) The Real time feed would continue to be unaffected and would continue to be served over Websockets.
ii) There would be a sufficient overlap period for both the services to allow for smooth migration.
iii) The python library would be updated also in due course and it would be our endeavor to make the migration for the library users to be seamless.
We will update you soon about the upcoming upgrades.
NSE Spot Indices feed issue
There is an issue with live ticks for NSE indices (Nifty 50, Nifty Bank and others) across Brokers & Data Feed Vendors.
We are in touch with NSE to have this fixed ASAP.
There is an issue with live ticks for NSE indices (Nifty 50, Nifty Bank and others) across Brokers & Data Feed Vendors.
We are in touch with NSE to have this fixed ASAP.
NSE Open Interest feed Issue
Please note that there is also an issue with the Open Interest Data for F&O segment coming from NSE. The same is also not coming along with the spot indices.
Please note that there is also an issue with the Open Interest Data for F&O segment coming from NSE. The same is also not coming along with the spot indices.
NSE Data Feed has stopped
(NSE F&O and CASH MARKETS CLOSED AT 11.40 AM REPOENING WILL BE NOTIFIED: NSE INDIA).
(NSE F&O and CASH MARKETS CLOSED AT 11.40 AM REPOENING WILL BE NOTIFIED: NSE INDIA).
Market reopen timings
F&O Segment Normal Market will Re-open as follows:
Normal Market open time : 15:45 hrs
Normal Market close time : 17:00 hrs
Trade Mod cut off time: 17:30 hrs
CM Segment Market will Re-open as follows:
Pre-Open open time : 15:30 hrs
Pre-Open* close time : 15:38 hrs (random closure in last minute)
Normal Market open time : 15:45 hrs
Normal Market close time : 17:00 hrs
Call Auction Illiquid session open time (1 sessions of 1 hour) : 16:00
Post close start time : 17:10 hrs
Post close end time : 17:30 hrs
Trade Mod cut off time: 17:45 hrs
F&O Segment Normal Market will Re-open as follows:
Normal Market open time : 15:45 hrs
Normal Market close time : 17:00 hrs
Trade Mod cut off time: 17:30 hrs
CM Segment Market will Re-open as follows:
Pre-Open open time : 15:30 hrs
Pre-Open* close time : 15:38 hrs (random closure in last minute)
Normal Market open time : 15:45 hrs
Normal Market close time : 17:00 hrs
Call Auction Illiquid session open time (1 sessions of 1 hour) : 16:00
Post close start time : 17:10 hrs
Post close end time : 17:30 hrs
Trade Mod cut off time: 17:45 hrs
Websocket APIs working fine.
The TrueData Websocket APIs are working fine. There should have been no need to reconnect or restart your app unless you have hardcoded the time.
The TrueData Websocket APIs are working fine. There should have been no need to reconnect or restart your app unless you have hardcoded the time.
Gradual rollout of the Historical REST APIs
1) We have started rolling out the Historical REST APIs gradually and await feedback for improvements and additions.
2) Lots of features being added & more features like the following coming by next week:-
a) Gainers & Losers
b) Gainers & Losers by Volume
c) Gainers / Losers by OI Change / OI
..etc & more
3) Python library updation would need more time and we will keep you updated about that.
4) Expected overlap of the deprecated Historical Websocket and the Historical REST apis is about 1 month.
1) We have started rolling out the Historical REST APIs gradually and await feedback for improvements and additions.
2) Lots of features being added & more features like the following coming by next week:-
a) Gainers & Losers
b) Gainers & Losers by Volume
c) Gainers / Losers by OI Change / OI
..etc & more
3) Python library updation would need more time and we will keep you updated about that.
4) Expected overlap of the deprecated Historical Websocket and the Historical REST apis is about 1 month.
Issues with the websocket-client 0.58.0 package
We have noticed that the latest version of the websocket-client package which is version 0.58.0 is causing issues in the Real time Websocket connection.
If you have upgraded to this library, and are facing issues, please downgrade to websocket-client version 0.57.0 till a more stable version of the package is updated.
pip install websocket-client==0.57.0
We have noticed that the latest version of the websocket-client package which is version 0.58.0 is causing issues in the Real time Websocket connection.
If you have upgraded to this library, and are facing issues, please downgrade to websocket-client version 0.57.0 till a more stable version of the package is updated.
pip install websocket-client==0.57.0
Server Maintenance Timings
Please note our server maintenance timings on working days and weekends.
Services may be resumed earlier than the end of these timings, however these times are blocked for maintenance and if you have any issue during this time, please wait out the maintenance period.
https://feedback.truedata.in/knowledge-base/article/service-maintenance-timing
Please note our server maintenance timings on working days and weekends.
Services may be resumed earlier than the end of these timings, however these times are blocked for maintenance and if you have any issue during this time, please wait out the maintenance period.
https://feedback.truedata.in/knowledge-base/article/service-maintenance-timing
feedback.truedata.in
Server Maintenance Timing !
Maintenance Timings for TrueData WebSocket-API
Trading Weekday (WS-API)
07:30 am to 08:00 am
TrueData WebSo
Trading Weekday (WS-API)
07:30 am to 08:00 am
TrueData WebSo