Your ID should be authorized before making a successful connection to the websocket server. To do so you need to make http call to
https://s3.vbiz.in/directrt/gettoken
Upon successful authentication, the call will return accesstoken which can be used for all further requests. The accesstoken will be valid for 24 hours. A new accesstoken will be generated each time a gettoken call is made
required parameters
product : DirectRT product comes in different flavors to suite client’s needs. Click here to more about available products & its features.
Values : DIRECTRTLITE, DIRECTRTPLUS, DIRECTRTPRO, DIRECCTRTPRIME.
loginid : a valid & active login id, you need to register in CROWN web portal to get a valid login id.
apikey : You need a valid API key, which can be found in your CROWN account under User Information >> Profile>>API key.
Example : http://s3.vbiz.in/directrt/gettoken/?loginid=dc-test0000&product=directrtpro&apikey=599C891907C748D2911F
Response
The response will be JSON string contain a valid accesstoken upon successful validation, which you can use for all further requests.
Successful response sample
{“Status”:true,“AccessToken”:”e30a485d65974b0dbd7683cb9c7d0739″,“MaxSymbol”:70,“Message”:”<csvheader>Ticker,UniqueName,Symbol,Expiry,StrikePrice,OptionType,LTD,LTT,Open,High,Low,LTP,Vol,PrevVol,OI,PrevOI,TTQ,TTV,DayOpen,DayHighest,DayLowest,BBQ,BBP,BSQ,BSP,PrevClose</csvheader> <tickrtheader>Instrument,Symbol,Expiry,Strike,OptionType,Skip,TimeStamp,BidPrice,BidQty,AskPrice,AskQty,LTP,Volume,Skip,Open,High,Low,PrevClose,ATP,TTV,Skip</tickrtheader> <tickoiheader>Instrument,Symbol,Expiry,Strike,OptionType,OI,Skip,TimeStamp,Skip”,”UpdateTime”:”2022-05-19T10:33:04.4330423+05:30</tickoiheader>”,“UpdateTime”:”2022-03-08T14:24:22.9398067+05:30″,“ValidUntil”:”2022-03-08T23:59:59″}
{“Status”:true,“AccessToken”:”e30a485d65974b0dbd7683cb9c7d0739″,“MaxSymbol”:70,“Message”:”<csvheader>Ticker,UniqueName,Symbol,Expiry,StrikePrice,OptionType,LTD,LTT,Open,High,Low,LTP,Vol,PrevVol,OI,PrevOI,TTQ,TTV,DayOpen,DayHighest,DayLowest,BBQ,BBP,BSQ,BSP,PrevClose</csvheader>
<tickrtheader>Instrument,Symbol,Expiry,Strike,OptionType,Skip,TimeStamp,BidPrice,BidQty,AskPrice,AskQty,LTP,Volume,Skip,Open,High,Low,PrevClose,ATP,TTV,Skip</tickrtheader>
<tickoiheader>Instrument,Symbol,Expiry,Strike,OptionType,OI,Skip,TimeStamp,Skip”,”UpdateTime”:”2022-05-19T10:33:04.4330423+05:30</tickoiheader>”,“UpdateTime”:”2022-03-08T14:24:22.9398067+05:30″,“ValidUntil”:”2022-03-08T23:59:59″}
Unsuccessful response sample, with Message explain the reason for failure.
{“Status”:false,“AccessToken”:””,“MaxSymbol”:100,“Message”:”Incorrect API key.”,“UpdateTime”:”2022-03-08T14:26:24.839674+05:30″,“ValidUntil”:”2022-03-08T14:26:24.9334311+05:30″}
Note: The access token is valid only for the PC that obtains it.
Powered by BetterDocs
You must be logged in to post a comment.