Data Services - Mutual Fund

This path is about the data services of Mutual Fund : TPILWebAPI/Api/V1/Data/MutualFund

URL

Example POST API Request

https://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/MutualFund

Request Data Information

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

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

Request

Key Required Value Discription
Segments TPIL_MUTUALFUND 28 Mutual Fund
Instrument MUTUAL FUND 1 INFOFEED_GLOBAL_MUTUALFUND
Request Type Data Request Services 1 - 9
Otherinfo Optional 0 Timestamp-Seconds
                                                      
                            {
                                                    "sid":"28",
                                                    "instId":"1",
                                                    "rType":"1"
                                                                               }
                                                                              
                                                      
                            Authorization: Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-
                            Content-Type: application/json
                            Accept: application/json
                          
                                                      
    [
    {
                                            "Segment": "MUTUALFUND",
                                            "Instrument": "MUTUALFUND",
                                            "MutualFund": "Aditya Birla Sun Life Mutual Fund",
                                            "SchemeName": "Aditya Birla Sun Life Dual Advantage Fund - Series II - Direct - IDCW",
                                            "nSchemeType": 2,
                                            "SchemeCode": "BL01601"
                                            "SchemeType": "Close",
                                            "nSchemeCategory": 1,
                                            "SchemeCategory": "INCOME",
                                            "LaunchDate": 1549593226000,
                                            "Objective": "To generate income by investing in a portfolio of fixed income securities maturing on or before the maturity of the Scheme.\r\n",
                                            "Load": "NIL",
                                            "MinimumSubscriptionAmount": "1000",
                                            "DateTime": 1632853800000,
                                            "CurrentNAV": 13.3752,
                                            "PreviousDayNAV": 0.0000,
                                            "BuyPrice": 0.0000,
                                            "SellPrice": 0.0000,
                                            "PercentChange": 0.00,
                                            "NetChange": 0.00,
                                            "nLastTradedDate": 1317340800,
                                            "AMFICode": 146205

   }
    ]

                                                      
                            {
                                                    "sid":"28",
                                                    "instId":"1",
                                                    "rType":"1"
                                                                               }
                                                                              
                                                      
                            Authorization: Bearer GciOiJIUzUxMiJ9.eyJzdWIiOiJERkRFTU8wMDAxICAgICAiLCJleHAiOjE2MjkyMTEyNDMsImlhdCI6MTYyOTE5MzI0M30.7GQJ_UxBecVe-
                            Content-Type: application/json
                            Accept: application/xml
                          
                                                      
                                            <MutualFund>
                                            <item>
                                            <Segment>MUTUALFUND</Segment>
                                            <Instrument>MUTUALFUND</Instrument>
                                            <MutualFund>Aditya Birla Sun Life Mutual Fund</MutualFund>
                                            <SchemeName>Aditya Birla Sun Life Dual Advantage Fund - Series II - Direct - IDCW</SchemeName>
                                            <nSchemeType>2</nSchemeType>
                                            <SchemeCode>BL01601</SchemeCode>

                                            <SchemeType>Close</SchemeType>
                                            <nSchemeCategory>1</nSchemeCategory>
                                            <SchemeCategory>INCOME</SchemeCategory>
                                            <LaunchDate>1549593226000</LaunchDate>
                                            <Objective>To generate income by investing in a portfolio of fixed income securities maturing on or before the maturity of the Scheme.
</Objective>
                                            <Load>NIL</Load>

                                            <MinimumSubscriptionAmount>1000</MinimumSubscriptionAmount>
                                            <DateTime>1632853800000</DateTime>
                                            <CurrentNAV>13.3752</CurrentNAV>
                                            <PreviousDayNAV>0.0000</PreviousDayNAV>
                                            <BuyPrice>0.0000
</BuyPrice>
                                            <SellPrice>0.0000</SellPrice>


                                            <PercentChange>0.00</PercentChange>
                                            <NetChange>0.00</NetChange>
                                            <nLastTradedDate>1317340800
</nLastTradedDate>
                                            <AMFICode>146205</AMFICode>


                                            </item>
                                            </MutualFund>
                                                        
                                                        // Java Data Services - MUTUAL FUND
                                URL url = new
                                URL("https://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/MutualFund");

                                //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\": 28,\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 - MUTUAL FUND
                                                                var  url = "https://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/MutualFund");
                                                                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\": 28,\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 - MUTUAL FUND

                                                              ?php

                                                                $url = ("https://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/MutualFund");
                                                                $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" : 28,
                                                                "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 - MUTUAL FUND
                                                                Import requests
                                                                From requests.structure import CaseInsensitiveDict

                                                                url = ("https://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/MutualFund");
                                                                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" : "28",
                                                                "instId": "1",
                                                                "rType": "1"
                                                                }
                                                                """




                                                        // Response Data

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


                                                            
                                                        
                                                        //Javascript Data Services - MUTUAL FUND


                                                                Var url=("https://uat.tickermarket.com/TPILWebAPI/Api/V1/Data/MutualFund" )
                                                                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" : 28,
                                                                "instId" : 1,
                                                                "rType": 1
                                                                }';





                                                        // Response Data

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



                                                            
                                                            
                                                                //CURL Data Services - MUTUAL FUND


                                                                #! /bin/bash
                                                                #Login:


                                                                //POST Request


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

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


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