Jump to content
Medved Trader Forums

Problem with HTTP web API?


Jason

Recommended Posts

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...