Data Services - BSE

This path is about the data services of BSE Equity : TPILWebAPI/Api/V1/Data/BseEquity

URL

Example POST API Request

http://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/BseEquity

Request Data Information

The data based on Segment ID( sid ), Instrument Type(instId), Request Type(rType), Other Info(oInfo)

  • Http Method: must be a POST Request
  • Http Scheme: http
  • Hostname: http://uat.tickerplant.com
  • Path: TPILWebAPI/ Api/V1/DATA/BseEquity (Data Services Endpoint path)
  • POST parameters:

Request

Key Required Value Discription
Segments TPIL_BSE 3 BSE Segment
Instrument TPIL_BSE Equity 1 BSE Equity Instruments
Request Type BSE Equity 1 - 34 BSE Data Feed Services
Otherinfo Optional 0 Timestamp-Seconds
                                                      
                            {
                              "sid":"3",
                              "instId":"1",
                              "rType":"2"
                            }
                                                                              
                                                      
                            Authorization: Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-
                            Content-Type: application/json
                            Accept: application/json
                          
                                                      
                        [
    {

      "Segment": "BSE",
        "Instrument": "Equity",
        "TPILCode": 4571,
        "ScripCode": 511431,
        "Symbol": "VAKRANGEE   ",
        "GroupName": "A ",
        "CompanyName": "Vakrangee Ltd",
        "DateTime": "1-August-2022 16:1:30",
        "BestBuyQty": 0,
        "BestBuyPrice": 0.00,
        "BestSellQty": 0,
        "BestSellPrice": 0.00,
        "LastTradedPrice": 28.30,
        "Volume": 336067,
        "NetChange": 0.25,
        "PercentChange": 0.89,
        "OpenPrice": 28.35,
        "HighPrice": 28.65,
        "LowPrice": 28.20,
        "ClosePrice": 28.05,
        "Value": 0.95,
        "52WeekHighPrice": 47.00,
        "52WeekLowPrice": 23.60,
        "nMsgTimeStamp": 1343836890,
        "52WeekHighDateTime": "Oct 11 2021  4:00PM",
        "52WeekLowDateTime": "Jun 20 2022  4:01PM",
        "PrevDayHighPrice": 28.50,
        "PrevDayLowPrice": 27.80,
        "TotalBuyQty": 0,
        "TotalSellQty": 0,
        "WeightedAverage": 28.37,
        "PrevBeta": 0.0016
                                                                    }
    ]

                      
                                                      
                            {
                              "sid":"3",
                              "instId":"1",
                              "rType":"1"
                                                                               }
                                                                              
                                                      
                            Authorization: Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-
                            Content-Type: application/json
                            Accept: application/xml
                          
                                                      
                        <BSEList>
                        <item>
                        <Segment>BSE</Segment>
                        <Instrument>Equity</Instrument>
                        <TPILCode>658</TPILCode>
                        <IndexName>SENSEX</IndexName>
                        <DateTime>16-September-2021 16:5:0</DateTime>
                        <CurrentIndexValue>59141.16</CurrentIndexValue>
                        <OpenIndexValue>58881.04</OpenIndexValue>
                        <HighIndexValue>59204.29</HighIndexValue>
                        <LowIndexValue>58700.50</LowIndexValue>
                        <CloseIndexValue>58723.20</CloseIndexValue>
                        <NetChange>417.96</NetChange>
                        <PercentChange>0.71</PercentChange>
                        <52WeekHighIndexValue>59204.29</52WeekHighIndexValue>
                        <52WeekLowIndexValue>36495.98</52WeekLowIndexValue>
                        </item>
                        </BSEList>
                        
                        
                        // Java Data Services - BSE
URL url = new
URL("http://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/BseEquity");

//Open URL connection
HttpURLConnection http = (HttpURLConnection)url.openConnection();

//POST Request
http.setRequestMethod("POST");
http.setDoOutput(true);
http.setRequestProperty("Accept", "application/json");
http.setRequestProperty("Content-Type", "application/json");
http.setRequestProperty("Authorization", "Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-");

//Create the Request Body
String data = "{\n  \"sid\": 3,\n  \"instId\": 1,\n  \"rType\": 1,\n  }";
byte[] out = data.getBytes(StandardCharsets.UTF_8);

// Response Data
OutputStream stream = http.getOutputStream();
stream.write(out);
System.out.println(http.getResponseCode() + " " + http.getResponseMessage());
http.disconnect();
                        
                        // C# Data Services - BSE
                                var  url = "http://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/BseEquity");
                                var httpRequest= (HttpWebRequest) WebRequest.Create(url);

                                

                        //POST Request
                                http.setRequestMethod("POST");
                                
                                httpRequest.Accept("application/json");
                                
                                http.Headers("Authorization", "Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-");
                                httpRequest.ContentType("application/json");

                        //Create the Request Body
                                var data = "{\n  \"sid\": 3,\n  \"instId\": 1,\n  \"rType\": 1,\n  }";
                                Using (var streamWriter = new StreamWriter(httpRequest.GetRequestStream()))
                                {
                                streamWriter.Write(data);
                                }


                        // Response Data

                                var httpResponse = (HttpWebResponse) httpRequest.GetResponse();
                                using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
                                {
                                Var result= streamReader.ReadToEnd();
                                }
                                Console.WriteLine(httpResponse.StatusCode);

                            
                        
                        //PHP Data Services - BSE

                              ?php

                                $url = ("http://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/BseEquity");
                                $curl = (curl_init($url));
                                curl_seropt($curl, CURLOPT_URL, $url);
                                curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);



                                

                        //POST Request



                                $headers = array("Authorization":"Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-" , Content-Type : application/json);
                                Curl_setopt($curl ,, CURLOPT_HTTPHEADER, , $headers);


                        //Create the Request Body
                                $data= DATA{ {
                                "sid" : 3,
                                "instId" : 1,
                                "rType": 1
                                };




                        // Response Data

                                Curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
                                $resp=curl_exec($curl);
                                curl_close($curl);
                                var_dump($resp);
                                ?>

                            
                        
                        //Python Data Services - BSE
                                Import requests
                                From requests.structure import CaseInsensitiveDict

                                url = ("http://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/BseEquity");
                                headers = CaseInsensitiveDict()



                                

                        //POST Request


                                headers [ "Accept"] = "application/json"
                                headers["Authorization"] = " Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe- "
                                headers["Content-Type"] = "application/json"


                        //Create the Request Body
                                data= """
                                {
                                "sid" : "3",
                                "instId": "1",
                                "rType": "1"
                                }
                                """




                        // Response Data

                                resp = request.post(url, headers=headers, data=data)
                                print(resp.status_code)


                            
                        
                        //Javascript Data Services - BSE


                                Var url=("http://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/BseEquity" )
                                Var xhr = new XMLHttpRequest();




                                

                        //POST Request


                                xhr.open("POST", url);
                                xhr.setRequestHeader("Accept","application/json" );
                                xhr.setRequestHeader("Authorization","Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe- " );
                                xhr.setRequestHeader(Content-Type, "application/json" );

                                xhr.onreadystatechange= function() {
                                if(xhr.readyState = = = 4)
                                {
                                Console.log(xhr.status);
                                Console.log(xhr.responseText);
                                }};



                        //Create the Request Body
                                Var data = '{
                                "sid" : 3,
                                "instId" : 1,
                                "rType": 1
                                }';





                        // Response Data

                                Xhr.send(data);
                                Console.log(xhr.status);



                            
                            
                                //CURL Data Services - BSE


                                #! /bin/bash
                                #Login:


                                //POST Request


                                curl -d  "{ \ username\" :  \ "ABB \" , \"password\" : \"password\"}" "-H content-type: application/json" " http://uat.tickermarket.com TPILWebAPI/Api/V1/Users/Login"

                                Curl -X POST http://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/BseEquity   -H "Authorization: Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-"  -H
                                "Content-Type: application/json"


                                //Create the Request Body
                                - - data-binary @- << DATA
                                {
                                "sid" : "3",
                                "instId": "1",
                                " rType": "1""
                                }
                                DATA