TrueData Market Data API Documentation V 2.2
TrueData Market Data API Documentation V 2.2
TrueData Market Data API Documentation V 2.2
Technical Specifications
02 Apr 2021
V2.2
This document is covered under a Non-Disclosure agreement with the recipient. No Part of
this document must be reproduced or forwarded to any person other than the Intended
Recipient. In case you received this document by mistake, please destroy the same
immediately.
CONFIDENTIAL
CONFIDENTIAL
Table of Contents:
1. Change History .............................................................................................................................................................. 3
2. About TrueData ............................................................................................................................................................ 5
3. TrueData Advantage & Features ............................................................................................................................ 6
4. API Specifications ........................................................................................................................................................ 8
a) Overview ....................................................................................................................................................... 8
b) Streaming WebSocket (Real Time) ............................................................................................................... 8
i) Streaming WebSocket URL (Real Time) ......................................................................................... 8
ii) Authentication Response .................................................................................................................. 8
iii) Heartbeat Messages .......................................................................................................................... 9
iv) Market Messages ............................................................................................................................ 10
v) Symbol Subscribe ........................................................................................................................... 11
vi) Symbol Unsubscribe ....................................................................................................................... 12
vii) Touchline Message .......................................................................................................................... 13
viii) Tick Streaming Data Response (Real Time) .................................................................................. 14
ix) 1Min Streaming Bar Data Response (Real Time) .......................................................................... 15
x) Logout/Disconnect WebSocket (for Real Time & Historical) ........................................................ 15
xi) Forced Logout ................................................................................................................................ 16
c) Historical Data over REST .......................................................................................................................... 16
i) Historical Data API & URL ........................................................................................................... 16
ii) REST Authentication ...................................................................................................................... 18
iii) Tick Data History ........................................................................................................................... 18
iv) Bar Data History ............................................................................................................................. 19
v) Last N Bars History ........................................................................................................................ 20
vi) Last n Ticks History ....................................................................................................................... 21
vii) Retrieve the Bhavcopy ................................................................................................................... 21
viii) Retrieve the Bhavcopy Availability Status for the day .................................................................. 22
ix) Retrieve the LTP of any symbol ..................................................................................................... 23
5. Support Contact Details ............................................................................................................................................. 24
Appendix I ............................................................................................................................................................................... 24
6. Pre-built Client Library Details (Python) .............................................................................................................. 24
7. Pre-built Client Library Details (nodejs) ............................................................................................................... 24
CONFIDENTIAL
CONFIDENTIAL
1. Change History
CONFIDENTIAL
CONFIDENTIAL
CONFIDENTIAL
CONFIDENTIAL
2. About TrueData
a) TrueData Financial Information Pvt. Ltd. is on a mission to become the best market
data vendor in the country (& beyond) by providing users with a multitude of solutions for
the financial services sector, including making market data feeds available in all its forms,
to as many applications as possible, including a wide range of technical analysis
applications, trading solutions, automated & algorithmic traders / platforms and a lot more.
b) TrueData initially started out in Feb 2007 launching the first version of the well-
known app – TDI (for True Data India). The company is now an Official Real Time Data
Vendor of the NSE and MCX with direct feeds from the exchanges.
c) The company has since then developed its own applications from the ground up
with unique data integration plugins through its flagship product ‘Velocity’. The company
has also garnered strategic partnerships to bring exceptional solutions including
Historical Tick data, corporate action adjusted intraday & EOD historical data & unique
programming language agnostic APIs.
d) The company is now on a path as described by its tag line - ‘Positioning You for
Profits!’, to deliver products and services which cover the entire spectrum for the user
from Data feeds (Into his / her favorite Applications) to Decision making + Trading.
CONFIDENTIAL
CONFIDENTIAL
TrueData is continually coming out with newer & better solutions for data
integration and Data APIs. Also, our solutions are continually improving to keep up with
the demands of users and with access to better technology. We can provide an
exceptional start point for integrating newer applications& demanding algo strategies.
The current features include: -
a) An entirely new backend customized & hosted to serve Very Low Latency Data feeds
directly from the NSE & MCX for Indices, Equities, Futures, and Currencies & Options.
b) This new backend for real time & historical data includes many new features and
improvements over the existing data structure.
c) To connect to this new backend, we have very efficient and extremely easy to
integrate APIs for Desktop applications (Socket based), Web & mobile apps (WebSocket /
REST API) with readymade code samples and quick technical support for the same. The APIs
could also be customized with regards to the data format to meet client needs (Binary / Json
/ csv).
d) Easy-to-use python (pip install truedata-ws) & nodejs libraries (npm install
truedatanodejs) with sample code is also available.
e) Real Time data for many symbols could be made available simultaneously, unlike
most brokers & vendors where you could get only up to 50 / 200 symbols at a time.
f) Real Time streaming candle data has also been made available. Streaming candle
updates are available for 1 & 5 min bars.
CONFIDENTIAL
CONFIDENTIAL
j) All bar history for trial users is available for 30 calendar days. Soon, clients would
also be able to purchase, extended history for up to 1 year by contacting TrueData. More
history in case required would need to be purchased offline.
CONFIDENTIAL
CONFIDENTIAL
4. API Specifications
a) Overview
i) The TrueData API provides Real Time streaming data via WebSocket while the historical
data is provided via REST. The earlier WebSocket API service for Historical data has been deprecated
and the service would be available only upto 30 Apr 2021. A client would need to connect to the
respective WebSocket port for which they wish to receive the real time data. In case historical data is
required, then the client would need to login to the REST service using the same login details and
obtain the authentication token (bearer token) which would be needed for each subsequent request.
ii) The API is provided under two environments. One is the sandbox and the other being the
production environment. All trials and access to real time data during the development period / initial
integration period would be provided on the sandbox environment. Once you complete your
integration, you would be shifted to the Production ports. Please change the codes in your codes
accordingly.
iii) The only difference between the two live data ports would be as follows: -
iv) Please use this sandbox webpage to test the feed during the development phase and to
keep a track of / compare your own coding results
a) https://wstest.truedata.in/
b) We have added a few buttons on this page to help you to start testing your code and
seeing the data flow immediately.
c) Please use this page to test the raw requests and responses in case your code has
some issues. This is recommended as the first step before you raise a ticket for your issue.
a) A successful login response returns the details as shown below along with the
details of segments subscribed and the type of streaming subscription enabled – which is tick
/ 1 min/ 5 min. (Note that if you are subscribed for tick, you would not receive 1 min or
5min streaming bars and vice versa.)
CONFIDENTIAL
CONFIDENTIAL
b) If the client is connected elsewhere, the client would not be able to connect. You
would first need to logout from your previous session and then attempt a login.
Response {
Success “success”: true,
“message” :“TrueData Real Time Data Service”,
“segments” : [“nseeq”, “nsefo”, “mcx”, “cds” ],
“maxsymbols” : 250,
“subscription” : “tick/1min/tick+1min/tick+5min/tick+1min+5min”,
“validity” , “31/12/2020T23:30:00”
}
Response {
Failure “success”: false,
“message” :“invalid login credentials / user subscription expired / invalid request”,
“segments” : null,
"maxsymbols":0,
“subscription” : null,
"validity":"0001-01-01T00:00:00"}
}
Response {
Broker "success":false,
Token "message":"invalid token",
Not "segments":null,
Provided "maxsymbols":0,
/ "subscription":null,
Incorrect "validity":"0001-01-01T00:00:00"
}
Response {
Duplicate "success":false,
Login "message":"User Already Connected",
"segments":null,
"maxsymbols":0,
“subscription” null,
"validity":"0001-01-01T00:00:00"}
}
a) Heartbeat messages have been added to the Real time stream (Ports 8082/8084). A
heartbeat shall be sent at every 5-6 seconds interval.
b) As soon as the client is connected to the Real time port, you would start receiving
heartbeat messages along with the time stamp, as shown below.
c) Please note that Heartbeat messages are not sent over REST for the Historical data
port. These are only sent over the Real time streaming ports.
CONFIDENTIAL
CONFIDENTIAL
10
a) Market messages indicating the start and stop of the various market sessions have been
added for NSE. The following messages are pushed automatically in the real time
WebSocket streams: -
Market
Messages {“success” : “true” , "message":"marketstatus","data":"NSE EQ Normal
Examples Market Start"}
b) Other than the market messages which are pushed automatically, you can also check at
any time if a particular market is open or closed.
Request {
"method”: " getmarketstatus ",
}
Respons
e {
"success":true,
"NSE_EQ":"CLOSED","NSE_FO":"CLOSED","NSE_CDS":"OPEN","MCX":"OPEN
"
}
CONFIDENTIAL
CONFIDENTIAL
11
v) Symbol Subscribe
a) The symbols once subscribed are referred to by their symbol ids in the real time feed.
b) When you subscribe for a symbol with the request as shown below, a successful
response would return the touchline, which would have the symbol id. This symbol id would
need to be mapped to that symbol. This would help you to identify the data in the stream to
that symbol.
c) As mentioned above, the symbol subscribed return includes a snap shot (touchline)
information about the symbol till that very moment. This is also helpful post market hours to
get the snapshot of the market at close of trade for reference till the next trading day open.
The touchline is explained in detail at Sl. No. vii below
d) Search for a symbol / symbol keyword in the masters - Another way to get the
symbol id list would be to search for the symbols (recommended) or request for the entire
masters (not recommended) from the following mentioned URL to get the master files in
json format: -
https://api.truedata.in/getAllSymbols?segment=eq&user=your_user_id&password=your_pas
sword&search=RELIANCE
e) Download entire Master files - You can also download the entire Master files if
needed. This however, may not be needed as Symbol ID is already returned when you first
subscribe to the symbol for the streaming feed.
https://api.truedata.in/getAllSymbols?segment=fut&user=your_user_id&password=your_pa
ssword&csv=true&allexpiry=false
*Please note that it is not necessary to download the master files as the symbol ID is returned once a
symbol subscription request is sent (as shown below).
*The instrument list API returns large amounts of data. It's best to request it once a day (ideally at
around 08:30 AM) and store in a database at your end.
*JSON format – removing &csv=True would give you the response in JSON format. Note that this
would increase the download size and could take longer to download
*&allexpiry=true would download all the symbols (including all expired symbols) in the TrueData
database. This could be a huge list and it is recommended to use the &search command instead as
explained above.
f) Get Option Chain Symbols - If you need to get all the symbols of an Option
chain, you can get those by calling the getOption Chain command. You need to specify the
symbol and the expiry date in yyyymmdd format. Default format for the option chain is json.
If you need the option in csv format add “&csv=true” in the end.
https://api.truedata.in/getOptionChain?user=your_user_id&password=your_password
&symbol=NIFTY&expiry=20200917&csv=true
CONFIDENTIAL
CONFIDENTIAL
12
g) Add symbol request and response is now updated to an array. Many additional
fields have been added like timestamp, Bid, Ask. Except for the message > symbols added, the
format of the message is same as the touchline message. For detailed format of the message
see the touchline fields as explained in Sl. No. vii. An example of the return when symbols are
added is as below: -
Request {
"method" : "addsymbol",
"symbols" : ["NIFTY BANK", "NIFTY-I", "RELIANCE20DECFUT",
"CRUDEOIL-I"]
}
Response {
Success "success":true,
"message":"symbols added",
"symbolsadded":4,
"symbollist":
[
["NIFTY BANK","200000004","2020-12-17T08:40:29","30698.4","0","0",
"0","30920.35","30932.25","30587.1","30698.4","0","0","0","0","0","0" ],
["NIFTY-I","900000596","2020-12-17T09:17:52","13701.8","300","13695.74",
"206850",13710.15","13715.2","13686.9","13699.45","12538050","2832963189
","13701.25","450","13701.9","375"],
["RELIANCE20DECFUT","300173228","2020-12-17T09:17:52","1996",
"12625","1991.2","448945","1996","1996.2","1985.3","1984.6","35465140","0",
"1995.55","1010","1996.55","1010"],
["CRUDEOIL-I","950000072","2020-12-17T09:17:52","3554","0","3554.48",
"209","3555","3558","3551","3520","1057","74288600","3553","40","3554","19
"]
],
"totalsymbolsubscribed":4
}
Response {
Failure "success": false,
"message" : "symbol limit reached / invalid request"
}
Request {
"method": "removesymbol",
"symbols": ["MINDTREE"]
}
Response {
Success “success”: true,
“message” :“symbols removed”,
“symbolsremoved” : 1,
CONFIDENTIAL
CONFIDENTIAL
13
}
Response {
Failure “success”: false,
“message” :“invalid symbol/invalid request”
}
b) The touchline message is similar to the symbols added message, which is now
formatted as an array in an array. The touchline message is pushed into the real time
WebSocket streams at the times mentioned above and also when symbols are added:-
Symbol, SymbolID, LastUpdateTime, LTP, TickVolume, ATP, TotalVolume, Open, High, Low ,
Previous Close , Today’s OI , Previous Open Interest Close, Turnover, Bid , BidQty , Ask , AskQty
c) Note that the requesting for touchline method ("method": "touchline"), has been
deprecated. Touchline is now pushed automatically at certain times as listed above without
the requirement of a request. Also, this is sent whenever a symbol is subscribed as explained
above. Please find the message format below:-
Touchline {
"success":true,
"message":"touchline",
"symbolsadded":4,
"symbollist":
[
["NIFTY BANK","200000004","2020-12-17T08:40:29","30698.4","0","0",
"0","30920.35","30932.25","30587.1","30698.4","0","0","0","0","0","0" ],
["NIFTY-I","900000596","2020-12-17T09:17:52","13701.8","300","13695.74",
"206850",13710.15","13715.2","13686.9","13699.45","12538050","283296318
9","13701.25","450","13701.9","375"],
["RELIANCE20DECFUT","300173228","2020-12-17T09:17:52","1996",
"12625","1991.2","448945","1996","1996.2","1985.3","1984.6","35465140","0
","1995.55","1010","1996.55","1010"],
["CRUDEOIL-I","950000072","2020-12-17T09:17:52","3554","0","3554.48",
"209","3555","3558","3551","3520","1057","74288600","3553","40","3554","1
9"]
],
"totalsymbolsubscribed":4
}
CONFIDENTIAL
CONFIDENTIAL
14
a) Tick Streaming Data needs to be allowed from the True Data backend. This is allowed
by default (Data subscription is tick).
b) The stream contains two main messages type header – ‘trade’ and ‘bidask’
c) The ‘bidask’ header needs to be also allowed from the backend. This is allowed by default
in case of Tick Streaming data is enabled. However, this could be disabled in case it is not
required by a client to reduce the flow / clutter in the feed.
d) The ‘trade’ header also contains a Special tag character which contains "O", "H","L"
or "" as a field, signifying if the tick is an open tick for the day, day’ s high or day’ low. If
it’s none of these it is demarcated with nothing. An “OHL” Tag has also been added in the
ases where we have sent the first tick (Open) itself along with a new High & also a New Low.
e) Tick Sequence number provided helps you verify that no Ticks are lost or packets
dropped and that you were able to handle all the packets received.
f) Implementing an asynchronous WebSocket client may be a complex task. We
recommend using our pre-built client libraries in Python. If not done properly this could fill
up the receive buffer at your end and the send buffer at the server end leading to packet drops.
g) In case both Tick Streaming & Bid / Ask are activated (Allowed by default),
then the following response would be sent to the user: -
i) The response with the “trade” header is sent whenever there is a trade in the
subscribed symbol, and it includes the following fields: -
Symbol ID, Date Time (Timestamp), LTP, LTQ, ATP (Average Traded Price – for
the day), TTQ (Total Traded Qty – Volume for the day), Open, High, Low, Prev
Close, OI (Open Interest), Prev Open Int Close, Day’s Turnover, Special Tag
(”O/H/L” or “”), Tick Sequence No, Bid, Bid Qty, Ask, Ask Qty
Response {"trade":["100000995","2020-12-
JSON 16T14:02:32","1472.8","635","1475.83","680949","1475.05","1484","1463","1468.35","0","0","
(with 1004964962.67","","4775","1472.8","429","1473.3","34"]}
bid/ask)
ii) The response with the “bidask” header is sent whenever there is only a
Bid / Bid Qty / Ask / Ask Qty update without any trade having been executed in the
subscribed symbol and it includes the following fields: -
Symbol ID, Date Time (Timestamp), Bid, Bid Qty, Ask, Ask Qty
h) In case only Tick Streaming is activated & Bid /Ask are deactivated on request,
then the following response would be sent to the user: -
i) The response with the “trade” header is sent whenever there is a trade in
the subscribed symbol, and it includes the following fields: -
CONFIDENTIAL
CONFIDENTIAL
15
Symbol ID, Date Time (Timestamp), LTP, LTQ, ATP (Average Traded Price – for
the day), TTQ (Total Traded Qty – Volume for the day), Open, High, Low, OI
(Open Interest),PrevDay Open Int, Special Tag (”O/H/L” or “”), Tick Sequence
No
Response {"trade":["100000995","2020-12-
JSON 16T14:02:32","1472.8","635","1475.83","680949","1475.05","1484","1463","1468.35","0
(without ","0","1004964962.67","","4775"]}
bid/ask)
a) Please note that a single user can subscribe for either Tick streaming or 1 min Bar
streaming.
b) Bid / Ask Streaming does not form a part of 1 min streaming subscription.
c) 1 Min streaming is not enabled by default.
d) The number of symbols streamed would depend upon your subscription.
e) Format shall be {“bar1min”, [symbolid, timestamp, open, high, low, close, volume,
oi]}
a) Logging out from the Real time WebSocket connection would now not force a logout
from the historical WebSocket connection or vice versa. Meaning that you would need to
logout of the real time & historical ports separately.
b) However, note that, in case of no request on the Historical Data Port, the History Data
WebSocket would get disconnected after an idle time of 90 minutes. For a subsequent
history request in that case you would need to re-login to the Historical data WebSocket port.
Request {
"method": "logout"
}
Response {
Success “success”: true
}
CONFIDENTIAL
CONFIDENTIAL
16
a) There may be occasions when you are logged in / connected via WebSocket
elsewhere and have forgotten about it and are then trying to reconnect again at a different
location with your same id or password.
b) In this case you would get a “User Already Connected” message.
c) This could also happen if you have had a dirty disconnect from your previous session
or that your coding environment has not cleanly disconnected your previous session.
d) In such a case you can use the force logout command.
i) Make sure that all your sessions are closed. This is especially important in
case automated reconnect to the WebSocket has been enabled by you.
ii) Request you to fire the below-given URL(s) to force logout from all other
places that you might have been logged in.
iii) Wait for 1 min after firing the URL and then try to log in and you should
not get this error message.
iv) URL for Real-Time
Connection: https://api.truedata.in/logoutRequest?user=xxx&password=yyy&port
=8082
(note port as per your concerned port)
v) For the historical port a re-login after 3600 seconds would provide you
with a fresh authorization token.
e) The access token is renewed once every day at around 4 am. A fresh token needs to
be obtained at that time to continue using the service without any interruptions.
f) In case there is no data available for the date time range, given in the request, then
you will get a message like so: -
g) You can download the entire postman collection for quicker development from this
link here:
h) You can pull the response in csv or json formats. You need to declare the response
format needed in your request. However, a csv response is recommended as it lowers the
CONFIDENTIAL
CONFIDENTIAL
17
amount of data transfer / bandwidth consumption and thereby the data lands up faster due to
its comparably smaller size.
i) The recommended and default response format is csv. Json responses are also
possible. We recommend choosing the csv response format as it ensures comparatively
smaller bandwidthusage for the same historical data thereby enabling faster delivery over the
internet.
timestamp,open,high,low,close,oi,volume
2021-02-01T09:07,1859.4,1859.4,1859.4,1859.4,1,0
2021-02-01T09:15,1859.4,1862.3,1853.05,1856.95,578586,0
2021-02-01T09:16,1857.8,1861.6,1856.15,1860.4,240393,0
……
{
"status": "Success",
"Records": [
[
"2021-03-22T15:29:40",
14756.55,
150,
8712225,
14756.4,
150,
14757.0,
375
],
[
"2021-03-22T15:29:42",
14757.0,
975,
8712225,
14756.5,
300,
14757.0,
225
]]}
l) For the rest of the document we have depicted all responses in the recommended
format which is csv.
m) To hasten your development process, the Postman collection for the Historical
REST API is available from this link. Please unzip the file and import it into Postman
(https://www.postman.com/) to work with it :-
TrueData_History_REST_API_v1.1.postman_collection
CONFIDENTIAL
CONFIDENTIAL
18
a) The first step in the authentication process is to obtain the token which can be used
for subsequent requests. This is a POST request like so: -
Response JSON
Sample Response {
"access_token": "og6zhJqQZuLAT54CpwPFNI8yOhC
RasyMiO6eMS62YF19A9tAMkgqJNP4LreC2vt_muHKpcMOisi
wPZgHZNmxwvfplKvU3SVZJ2QMtET3oeAMT8smgAP9HIxLTYn
QJIMJ_QB0xYWGe5efwGO4Kwun16nZ9GvNdQyPhPNed5t-oR-
ajdg_bSGdzb8XusmMbctC5aiCE2w2dcknuWKm6v8follpLD6
VvYBhEIHWxguePUuTfNztsZyVDyLn4p_-
vlwmquxDtt5BHqQfSksq_zy9hA",
"token_type": "bearer",
"expires_in": 13961,
"userName": "<your_username>",
".expires": "Sun, 21 Mar 2021 22:30:00 GMT",
".issued": "Sun, 21 Mar 2021 18:37:18 GMT"
}
Response access_token : will be used in subsequent request to retireve
parameters data
expires_in : token validity in seconds
Token_type: bearer (type of token)
Error {
"error": "invalid_grant",
"error_description": "The user name or password is
incorrect."
}
{
"error": "invalid_grant",
"error_description": "User subscription expired."
}
a) Tick Data can be retrieved using the following request. This is a GET request like
so: -
CONFIDENTIAL
CONFIDENTIAL
19
Response CSV/JSON
Sample Response timestamp,ltp,volume,oi,bid,bidqty,ask,askqty
2021-02-24T09:15:00,14755.15,1,7390425,14730,225,14745.45,375
Csv >
2021-02-24T09:15:00,14755.35,1,7390425,14730,225,14745.45,375
2021-02-24T09:15:00,14725,1,7390425,14730,225,14745.45,375
….
Response time,ltp, tickvol, openinterest,bid,bidqty,ask,askqty
parameters
Error Response1 API calls quota exceeded! maximum admitted 1 per
Second.
Error Response2 Segment not subscribed
Error Response3 Symbol does not exist
Error Response4 Authorization has been denied for this request.
Error Response5 No data exists for <symbol>
a) Bar Data History can be retrieved using the following request. This is a GET
request like so: -
CONFIDENTIAL
CONFIDENTIAL
20
Response CSV/JSON
Sample Response timestamp,open,high,low,close,oi,volume
2021-02-01T09:07,1859.4,1859.4,1859.4,1859.4,1,0
2021-02-01T09:15,1859.4,1862.3,1853.05,1856.95,578586,0
2021-02-01T09:16,1857.8,1861.6,1856.15,1860.4,240393,0
……
Response parameters time,open,high,low,close,volume,openinterest
Error Response1 API calls quota exceeded! maximum admitted 1 per
Second.
Error Response2 Segment not subscribed
Error Response3 Symbol does not exist
Error Response4 Authorization has been denied for this request.
Error Response5 No data exists for <symbol>
a) Last N Bars History is currently enabled for 1 min & EOD bars. More bar sizes
will be added in the future.
b) The Data of the last ‘n’ bars can be retrieved using the following request. This is a
GET request like so: -
Response CSV/JSON
Sample Response timestamp,open,high,low,close,oi,volume
2021-02-01T09:07,1859.4,1859.4,1859.4,1859.4,1,0
2021-02-01T09:15,1859.4,1862.3,1853.05,1856.95,578586,0
2021-02-01T09:16,1857.8,1861.6,1856.15,1860.4,240393,0
……
Response parameters time,open,high,low,close,volume,openinterest
Error Response1 API calls quota exceeded! maximum admitted 1 per
Second.
Error Response2 Segment not subscribed
CONFIDENTIAL
CONFIDENTIAL
21
a) The Data of the last ‘n’ ticks can be retrieved using the following request. This is a
GET request like so: -
Response CSV/JSON
Sample Response timestamp,ltp,volume,oi,bid,bidqty,ask,askqty
2021-02-24T09:15:00,14755.15,1,7390425,14730,225,14745.45,375
2021-02-24T09:15:00,14755.35,1,7390425,14730,225,14745.45,375
2021-02-24T09:15:00,14725,1,7390425,14730,225,14745.45,375
….
Response time,ltp, tickvol, openinterest,bid,bidqty,ask,askqty
parameters
Error Response1 API calls quota exceeded! maximum admitted 1 per
Second.
Error Response2 Segment not subscribed
Error Response3 Symbol does not exist
Error Response4 Authorization has been denied for this request.
Error Response5 No data exists for <symbol>
Note: bid, bid_qty, ask, ask_qty only comes if requested & enabled
a) The Bhavcopy of any particular date, can be retrieved. The token obtained in
authentication would need to be used in this too, like in any other request. This is a GET
request like so: -
CONFIDENTIAL
CONFIDENTIAL
22
Response CSV/JSON
Sample Response symbolid,symbol,open,high,low,close,volume,oi
800000372,MCXCOMPDEX,11059.52,11133.83,10984.32,11110.59,0,0
800000373,MCXBULLDEX,14944.58,14956.36,14771.68,14877.5,0,0
…
Response symbolid,symbol,dopen,dhigh,dlow,dclose,volume,oi
parameters
Error Response1 Authorization has been denied for this request.
Error Response2 No data exists for <date>
a) Before you can request for the Bhavcopy, you need to know if the Bhavcopy for
the day has arrived or not.
b) You can retrieve the Bhavcopy availability status of today’s bhavcopy or for that
matter, for any particular date. The token obtained in authentication would need to be used
in this too, like in any other request. This is a GET request like so: -
Response CSV/JSON
CONFIDENTIAL
CONFIDENTIAL
23
a) The Last traded price (LTP) of any particular date, can be retrieved. The token
obtained in authentication would need to be used in this too, like in any other request. This is
a GET request like so: -
Response CSV/JSON
Sample Response timestamp,ltp,volume,oi,bid,bidqty,ask,askqty
2021-03-
03T15:30:00,15300,900,10911825,15299.95,150,153
03,75
Response timestamp,ltp,volume,oi,bid,bidqty,ask,askqty
parameters
Error Response1 API calls quota exceeded! maximum admitted 1 per
Second.
Error Response2 Segment not subscribed
Error Response3 Symbol does not exist
Error Response4 Authorization has been denied for this request.
Error Response5 No data exists for <symbol>
CONFIDENTIAL
CONFIDENTIAL
24
Appendix I
CONFIDENTIAL