Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

NinjaTrader Web - fetch outside data

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    NinjaTrader Web - fetch outside data

    In NinjaTrader desktop, I use the below code to bring outside data into NinjaTrader

    Code:
    string result = string.Empty;
                string url = @"https://my-api-endpoint.com";
    
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
                request.AutomaticDecompression = DecompressionMethods.GZip;
    
                using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                using (Stream stream = response.GetResponseStream())
                using (StreamReader reader = new StreamReader(stream))
                {
                    result = reader.ReadToEnd();
                    Print(result);
    
                }​
    Any advice how to use javascript fetch (or other library for similar task) in the new Web editor?

    #2
    Hello backtester831,

    Thank you for your note.

    We are really excited to be able to offer custom coding on our Web platform soon! Unfortunately, we do not have this resources and documentation completed quite yet.

    Thank you for your patience. Please let us know if we may be of further assistance.​
    Last edited by NinjaTrader_Jesse; 03-07-2023, 03:27 PM.
    JesseNinjaTrader Customer Service

    Comment


      #3
      I understand, but kind of a bummer
      Last edited by backtester831; 03-07-2023, 01:37 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by traderzoso, 12-27-2020, 05:19 PM
      6 responses
      229 views
      0 likes
      Last Post lekor
      by lekor
       
      Started by ETFVoyageur, 05-18-2024, 12:45 AM
      4 responses
      26 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by Skifree, Today, 11:47 AM
      4 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by molecool, Today, 01:48 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by ETFVoyageur, Today, 12:26 PM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X