Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs
    1. Home
    2. saleem
    3. Best
    S
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by saleem

    • GTT Triggered - SELL Order

      When GTT is triggered, it places a SELL (or BUY) Order as LIMIT. Instead, how do we change to MARKET?

      posted in C#/.Net SDK
      S
      saleem
    • RE: Downloading All Instruments

      @vcb
      Implement a class like this...
      public class NSEInstrument
      {
      [JsonProperty("token")]
      public string token { get; set; }
      [JsonProperty("symbol")]
      public string symbol { get; set; }
      [JsonProperty("name")]
      public string name { get; set; }
      }

      And write this function...
      public List<NSEInstrument> GetNSEInstruments()
      {
      WebRequest webRequest = WebRequest.Create("https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json");
      HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
      if (response.StatusDescription == "OK")
      {
      Stream dataStream = response.GetResponseStream();
      StreamReader reader = new StreamReader(dataStream);
      string responseFromServer = reader.ReadToEnd();
      List<NSEInstrument> data = JsonConvert.DeserializeObject<List<NSEInstrument>>(responseFromServer);
      return data;
      }
      return null;
      }

      Call this function to get all the instruments and tokens

      posted in C#/.Net SDK
      S
      saleem