Jason Posted July 8, 2022 Report Share Posted July 8, 2022 Hello, I seem to be having a problem with the web API. If I enter the following line: http://127.0.0.1:16239/req?getLastQuote(SYMBOL) Into my browser I seem not to be able to get the last quote for the SYMBOL unless I've already entered that symbol into a chart in MT. After I do, it always pulls the quote. I can load a different ticker into the chart so that the original SYMBOL isn't loaded anymore but subsequent calls through my browser with the above URL continue to work. I am using QuoteMedia for my data stream and haven't encountered this before. Thanks, Jason Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted July 8, 2022 Report Share Posted July 8, 2022 the HTTP API requests are passive - the return whatever data is in MT, but they will NOT subscribe to the symbol with the underlying datafeed, so you have to have the symbols either in the portfolio or on a chart. The Websocket API is better suited if you need to have active subscriptions Quote Link to comment Share on other sites More sharing options...
Jason Posted July 8, 2022 Author Report Share Posted July 8, 2022 Okay, I think I haven't encountered this before as I'm trying to use the API in a way I haven't in the past. It's an easy workaround for me though to simply put them in a portfolio list when I need to access the latest quotes. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.