Alpha DevCon 2018
Results 1 to 27 of 27

Thread: web address to get stock prices

  1. #1
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,127

    Default web address to get stock prices

    This address and code used to work to get stock prices directly using stock symbols. Worked great for years. The web address service is being discontinued. Anyone have a different address/method to acquire stock prices?
    Code:
     
    link = "http://download.finance.yahoo.com/d/quotes.csv?s="+vsymbol+"&f=sl1d1t1c1ohgv&e=.csv"
    result = http_get(link)
    p.price = word(result.body,2,",")
    stock_data = p
    vc_price_now=convert_type(stock_data.price,"c")
    vn_price_now=val(vc_price_now)
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  2. #2
    Member
    Real Name
    Alex
    Join Date
    Oct 2015
    Location
    Perth, WA Australia
    Posts
    101

    Default Re: web address to get stock prices

    Alex Collier

    "Give a man a fish and you will feed him for a day; teach a man to fish and he will eat forever."

    AA Build 5213-5149 >> Deploying to IIS 8.5 on Windows 2012 R2 Server in AWS

  3. #3
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,127

    Default Re: web address to get stock prices

    Hi Alex,
    Thank you for that. Unfortunately, I can't get any data out from the api return. There is an example of the address to get data:
    https://www.alphavantage.co/query?fu...ll&apikey=demo
    I can use sys_open() for the url and delivered is a CSV file that I can save or open and do manual extractions, but http_get() doesn't return data and I haven't discovered a way to have the return deliver data that I can extract using code.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  4. #4
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,800

    Default Re: web address to get stock prices

    Seems to work ok...

    Code:
    function getStocks as c (e as p)
    	
    	debug(1)
    	
    	dim url as c = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo"
    	dim result as p
    	result = http_get(url)
    	
    end function
    The returned JSON is in result.body.

    You can also do this client-side using the fetch() api... which is cool because fetch() uses promises.

    Code:
    function getStocks(){
    
    	debugger;
    	var stockURL = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo"
    	
    	fetch(stockURL)
    		.then(function(response) {
    			if (response.status !== 200) {
    				console.log('Looks like there was a problem. Status Code: ' +
    				response.status);
    				return;
    			}
    		
    			// Examine the text in the response
    		      
    			response.json().then(function(data) {
    				console.log(data);
    			});
    		})
    		.catch(function(err) {
    			console.log('Fetch Error :-S', err);
    		});
    
    
    }
    The returned JSON is in the data variable. In this case it's being sent to the console.

  5. #5
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    mike,
    you originally posted this in the desktop section, so i am assuming you are doing this in the desktop side. also somehow i think you have version 12, that i cannot be certain.
    i have tried http_get, http_fetch several times on my own and also in trying to answer this question. i cannot succeed. there may be problems the way alpha version of http functions work. jerry has indicated to use http_fetch and http_fetch_page in another post, that could be useful or if in fact you have version 12 take a look at curl integration that will definitely work, since i can easily get the json data using curl. i cannot test curl integration since it is not available in version 11 unless i write my own wrapper for it.
    Last edited by GGandhi; 12-15-2017 at 08:27 AM.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  6. #6
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,640

    Default Re: web address to get stock prices

    http_get() absolutely will work for this, however I see that the service can be quite slow though. The default timeout for http_get() is 8 seconds, so if the service does not respond in that amount of time, you will not get the results. You will be able to verify that this is the problem by looking at the error_text property returned from your http_get() call.

    You can specify a longer timeout as follows:

    Code:
    link = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo"
    timeout = 30000 '30 seconds (in milliseconds)
    result = http_get(link, "", 443, timeout)
    Last edited by Lenny Forziati; 12-15-2017 at 02:51 PM.

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

  7. #7
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    Lenny
    I just want to bring to your attention that mike is able to with yahoo
    That service is going away according to him
    The problem with is with Alphavantage
    Sorry to interject in mike’s thread
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  8. #8
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,800

    Default Re: web address to get stock prices

    No issues with AlphaAdvantage.co... as posted. AlphaAdvantage may take time to respond so apply Lenny's timeout solution to solve potential timing issues.

  9. #9
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,640

    Default Re: web address to get stock prices

    I've fixed my example to use alphavantage.co. I had tested with it originally, but copied the wrong code to post here. As David reiterated, it works but occasionally (often) takes longer than 8 seconds so will appear to fail if you do not increase the timeout.

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

  10. #10
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,127

    Default Re: web address to get stock prices

    Hi everyone,
    I appreciate everyone responding, and please don't take offense, but none of the codes and responses presented show a result actually obtained. Some of the arguments deliver results, like result.header:
    = HTTP/1.1 301 Moved Permanently
    Connection: close
    Server: gunicorn/19.7.0
    Date: Fri, 15 Dec 2017 23:20:54 GMT
    Transfer-Encoding: chunked
    Location: https://www.alphavantage.co/query?fu...in&apikey=demo
    Content-Type: text/html; charset=utf-8
    Via: 1.1 vegur
    However results.body is completely empty. Thanks Ghandi, you are very correct. It may be a source site issue and not a http_get() issue at all! I don't have the expertice to know, except the site clearly produces results via sys_open(), so I would think there would be a method to get those results, right?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  11. #11
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    do you have version 12? i thought you had.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  12. #12
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    i can get the data with curl without any problem, so it is not the site. if you ask me.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  13. #13
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    Code:
    link = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo"
    timeout = 30000 '30 seconds (in milliseconds)
    result = http_get(link, "", 443, timeout)
    ?result
    = body = 
    error_code = 1813
    error_text = Could not connect to server: Secure Sockets Layer OpenSSL Error
    OpenSSL Description: error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
    Error occurred in INET::SSLSocket::Connect
    headers = ""
    +parsed_headers.
    this is what I got with the code provided by lenny.
    so I cannot get any data. remember I am still on version 11
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  14. #14
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,800

    Default Re: web address to get stock prices

    Quote Originally Posted by Mike Wilson View Post
    Hi everyone,
    I appreciate everyone responding, and please don't take offense, but none of the codes and responses presented show a result actually obtained. Some of the arguments deliver results, like result.header:

    However results.body is completely empty. Thanks Ghandi, you are very correct. It may be a source site issue and not a http_get() issue at all! I don't have the expertice to know, except the site clearly produces results via sys_open(), so I would think there would be a method to get those results, right?
    Mike... you'll have to confirm your Alpha version/build... and post a sample component. Otherwise, it's just a lot of guessing.

    It's working for me without issue.

  15. #15
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,127

    Default Re: web address to get stock prices

    The app is built in v11. It is not destined to be advanced to v12, so whether curl works does not yield a solution. I get the same results in v9, v10, v11 using http_get() FOR THIS AlphaAdvantage site, which is the same results in my hands that Gandhi posted. David, as for the "sample component" , what I have is what I have given. I am needing a site to obtain stock prices. I have been able to use http_get() successfully with the Yahoo site, with the return of the petition using http_get() being a construct that data components can be harvested. With that site being discontinued, I'm needing another source. Maybe this AlphaAdvantage site is not going to work because the return is not a composite resolvable with Alpha.

    David, you wrote it is working for you without issue. Maybe you might show us a successful return of data in the Interactive Editor using this site and the script(s) we have been discussing, so we can see what you're scripting to achieve success, and the successful results you are obtaining? With which A5 version.

    BTW, I have no idea how this go into "General Questions" forum. I'd like a moderator to switch this to desktop v11 or Desktop forum.
    Last edited by Mike Wilson; 12-15-2017 at 10:34 PM.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  16. #16
    "Certified" Alphaholic
    Real Name
    David Kates
    Join Date
    Apr 2008
    Location
    Unionville, ON
    Posts
    6,800

    Default Re: web address to get stock prices

    Now we've got some info we can work with. 15 posts... but we now know that Version 11 and OpenSSL are your problem... at least when wanting to talk to an up to date world. I've tested this with Version 11 and get the same error you posted. Lots of changes and updates to security...
    https://www.alphasoftware.com/docume...rted%20SSL.xml

    Lenny is your guy for figuring this one out. Version 12 has no issue with the code posted. Version 11 chokes.

    However, Version 11 has no issue with the client-side, Javascript solution posted. As a last resort you can get the data client-side and shove it into XBasic via a callback.

  17. #17
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    the posts were wasted by the moderator moving this thread which was on the correct forum( desktop version 11) to the current location - please see my post #5 as a response to what looks like a web project answer to a desktop question. when moderator moved the question ( neither mike nor alex can do that, as far as i can tell, those were two on the thread for the longest time) could have indicated the inheritance, sadly it wasn't done.
    regardless lenny,
    Code:
    link = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo"
    timeout = 30000 '30 seconds (in milliseconds)
    result = http_get(link, "", 443, timeout)
    here is the code you provided and i have shown my result via interactive window.
    will you be kind enough to show how you got anything different via interactive window or on a script which will be applicable to desktop side.
    that will be most helpful to mike for sure and as a learning exercise.

    this question and the history is, mike works on the desktop side, and where will the client side fits in is difficult for me to understand.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  18. #18
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,127

    Default Re: web address to get stock prices

    Good morning,
    Thanks for the replies. Gandhi, you are correct that I develop on the desktop side. To date, I have not encountered a reason to move certain apps to v12, except maybe now that encounter has occurred. Thank you David for the link. That delivers the likely explanation for the http_get() failure with v11. However, the data can still be acquired using sys_open(). Being a desktop person, I don't have the understanding why you are allowed to acquire data from a server with one method that doesn't require special updated security features but are restricted through another method because it does require special updated security features. Whatever...
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  19. #19
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,140

    Default Re: web address to get stock prices

    Mike, I am not very active with A5 anymore and thus may be way off base here, but is this the kind data your are looking for?
    {
    "Meta Data": {
    "1. Information": "Intraday (1min) prices and volumes",
    "2. Symbol": "MSFT",
    "3. Last Refreshed": "2017-12-15 16:00:00",
    "4. Interval": "1min",
    "5. Output Size": "Compact",
    "6. Time Zone": "US/Eastern"
    },
    "Time Series (1min)": {
    "2017-12-15 16:00:00": {
    "1. open": "86.7199",
    "2. high": "86.8500",
    "3. low": "86.7100",
    "4. close": "86.8500",
    "5. volume": "12977320"
    },
    "2017-12-15 15:59:00": {
    "1. open": "86.6700",
    "2. high": "86.7600",
    "3. low": "86.6600",
    "4. close": "86.7199",
    "5. volume": "354627"

    If so, I got this using V11 and the following code:

    Code:
    url = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo" 
    '"http://download.finance.yahoo.com/d/quotes.csv?s="+vsymbol+"&f=sl1d1t1c1ohgv&e=.csv"
    result=http_get_page2(url,.f.)
    
    '*********** for testing
    CLIPBOARD.SET_DATA(result)	'capture just for testing
    end
    '**********End for testing
    If this is way off base, sorry for wasting your time.

    Ray Lyons

  20. #20
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    Quote Originally Posted by Raymond Lyons View Post
    Mike, I am not very active with A5 anymore and thus may be way off base here, but is this the kind data your are looking for?
    {
    "Meta Data": {
    "1. Information": "Intraday (1min) prices and volumes",
    "2. Symbol": "MSFT",
    "3. Last Refreshed": "2017-12-15 16:00:00",
    "4. Interval": "1min",
    "5. Output Size": "Compact",
    "6. Time Zone": "US/Eastern"
    },
    "Time Series (1min)": {
    "2017-12-15 16:00:00": {
    "1. open": "86.7199",
    "2. high": "86.8500",
    "3. low": "86.7100",
    "4. close": "86.8500",
    "5. volume": "12977320"
    },
    "2017-12-15 15:59:00": {
    "1. open": "86.6700",
    "2. high": "86.7600",
    "3. low": "86.6600",
    "4. close": "86.7199",
    "5. volume": "354627"

    If so, I got this using V11 and the following code:

    Code:
    url = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo" 
    '"http://download.finance.yahoo.com/d/quotes.csv?s="+vsymbol+"&f=sl1d1t1c1ohgv&e=.csv"
    result=http_get_page2(url,.f.)
    
    '*********** for testing
    CLIPBOARD.SET_DATA(result)	'capture just for testing
    end
    '**********End for testing
    If this is way off base, sorry for wasting your time.

    Ray Lyons
    exactly, it is. this is what jerry said in another post, i could not locate it ( see my post #5)
    (i erroneously said http_fetch_page2)
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  21. #21
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,140

    Default Re: web address to get stock prices

    It also works in V10.

    Ray

  22. #22
    "Certified" Alphaholic
    Real Name
    Govindan Gandhi
    Join Date
    Aug 2008
    Location
    New York, NY
    Posts
    4,294

    Default Re: web address to get stock prices

    very good, thank you for appropriate answer.
    learned something new.
    thanks.
    thanks for reading

    gandhi

    version 11 3381 - 4096
    mysql backend
    http://www.alphawebprogramming.blogspot.com
    ggandhi344@gmail.com
    Skype:ggandhi344@gmail.com
    1 914 924 5171

  23. #23
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,127

    Default Re: web address to get stock prices

    Ray,
    Badda Bing! That would be it. I swear I tried every http_X method after Gandhi suggetsed I try others, but clearly I did not. This is data I can parse. Thank you so much!!

    Later:
    Code:
    dim vstock_price as C
    dim vsymbol as C="GE"
    url = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol="+vsymbol+"&interval=1min&apikey=csv" 
    result=http_get_page2(url,.f.)
    vstock_price=word(word(word(result,2,"Time Series"),6,chr(10)),2,chr(58))
    vstock_price=alltrim(stritran(stritran(vstock_price,chr(34),""),chr(44),""))
    
    msgbox(vstock_price)
    Last edited by Mike Wilson; 12-17-2017 at 11:52 AM. Reason: corrected parsing code
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  24. #24
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,140

    Default Re: web address to get stock prices

    Mike, Glad it worked for you. Using various StringScanner Methods along with http_get_page2() I have been able to grab a small piece of data out of a large, complex web page (e.g. current price for a specific item). Interestingly my code sometimes fails to return anything, a problem I now suspect can be solved by increasing the timeout for whatever the default is for http_get_page2(). Thanks Lenny for pointing out the timeout option (which is in the documentation though I never noticed it or realized it might be the culprit for why my code sometimes returns nothing when I know what I am after is there). And here I thought I was done with all this stuff!

    Ray Lyons

  25. #25
    Alpha Software Employee Lenny Forziati's Avatar
    Real Name
    Lenny Forziati
    Join Date
    Nov 2001
    Location
    Alpha Software
    Posts
    4,640

    Default Re: web address to get stock prices

    http_get() and related HTTP functions use OpenSSL. OpenSSL is regularly updated, and those updates come with Alpha patches. Since V11 is no longer maintained, it does not have the most recent recent OpenSSL DLLs, and as such may have issues connecting to some SSL-enabled servers.

    The http_*2() functions do not use OpenSSL and instead rely on the OS for negotiating SSL connections. Depending on the version of Windows you are using, yuo will have varying results connecting to SSL-enabled servers. For example, Windows XP would haveWindows 10 have significantly different capabilities, regardless of your Alpha Five or Alpha Anywhere version.

    Please note that in my very first post, I said that error_text should be examined to see if the request completed successfully. This is key for EVERY HTTP request, as requests may fail for any number of reasons at any time. Remember, you are connecting to a remote service and there are a ton of variables that can impact the operation. As soon as Govindan showed the error text and code in post #13, David was able to properly ascertain that this is an SSL issue with older OpenSSL DLLs in V11. Always check the return status on HTTP calls.


    For the record (and as requested by Govindan), here is the code I posted running in V12 showing that it gets a response from the server:
    Code:
    link = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol=MSFT&interval=1min&apikey=demo"
    timeout = 30000 '30 seconds (in milliseconds)
    result = http_get(link, "", 443, timeout)
    ?result
    = body = {
        "Meta Data": {
            "1. Information": "Intraday (1min) prices and volumes",
            "2. Symbol": "MSFT",
            "3. Last Refreshed": "2017-12-18 16:00:00",
            "4. Interval": "1min",
            "5. Output Size": "Compact",
            "6. Time Zone": "US/Eastern"
        },
    <output truncated>


    And finally, regarding the moving of this thread to General Questions. The original question was:
    Quote Originally Posted by Mike Wilson
    Anyone have a different address/method to acquire stock prices?
    There is nothing at all about this that is V11 specific or desktop specific, so the post was moved in order to reach a wider audience and hopefully get better results for Mike. Note that Alexc - the user that gave the web service that Mike is now using - is an Alpha Anywhere user and may not have even seen the question in a V!1 topic.

    Lenny Forziati
    Vice President, Internet Products and Technical Services
    Alpha Software Corporation

  26. #26
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Michigan
    Posts
    4,127

    Default Re: web address to get stock prices

    Hi Lenny,
    Thank you for that very detailed explanation. Very helpful! Yes, my bad to not declare the A5 version under development to reach the correct user group. Thank you for your attention to this. And thank you for everyone helping find a solution. The app in use of this originated I believe with A5v7 maybe? I have upgraded the A5 version through the years. We'll see how long it can last. The owner has a rudimentary skill with A5 programming and would continuously change cosmetics, write some reports, able to add a couple of functionalities with action scripting and so forth, so he was willing to buy the A5 developer versions over the years and I would keep it upgraded. However, the days have past where purchasing the newest version of A5 beyond v11 is financially feasible for him. Like me, he doesn't do any work beyond desktop, and while I develop for small companies, he just does it for himself. I wonder how many others out there like this fellow have been lost to the A5 stream of loyal users.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

  27. #27
    "Certified" Alphaholic
    Real Name
    Raymond Lyons
    Join Date
    Apr 2000
    Location
    Carlsbad, CA
    Posts
    2,140

    Default Re: web address to get stock prices

    Quote Originally Posted by Lenny Forziati View Post
    http_get() and related HTTP functions use OpenSSL. OpenSSL is regularly updated, and those updates come with Alpha patches. Since V11 is no longer maintained, it does not have the most recent recent OpenSSL DLLs, and as such may have issues connecting to some SSL-enabled servers.

    The http_*2() functions do not use OpenSSL and instead rely on the OS for negotiating SSL connections. Depending on the version of Windows you are using, yuo will have varying results connecting to SSL-enabled servers. For example, Windows XP would haveWindows 10 have significantly different capabilities, regardless of your Alpha Five or Alpha Anywhere version.

    Please note that in my very first post, I said that error_text should be examined to see if the request completed successfully. This is key for EVERY HTTP request, as requests may fail for any number of reasons at any time. Remember, you are connecting to a remote service and there are a ton of variables that can impact the operation. As soon as Govindan showed the error text and code in post #13, David was able to properly ascertain that this is an SSL issue with older OpenSSL DLLs in V11. Always check the return status on HTTP calls.
    ...
    Interesting and good to know. I suppose my using http_get_page2() is the reason I have never had a problem (yet!) negotiating SSL connections with V10, V11 using XP and Windows 8 and Windows 10. Thanks Lenny.

    Ray Lyons

Similar Threads

  1. Hyperlinked prices to shopping cart
    By Laff_Riot in forum Application Server Version 8
    Replies: 3
    Last Post: 12-07-2007, 12:19 AM
  2. Version 5 Upgrade prices in UK
    By Dennis Silver in forum Announcements
    Replies: 5
    Last Post: 02-05-2003, 07:09 AM
  3. RE: the REAL V5 prices
    By Keith B in forum Alpha Five Version 4
    Replies: 61
    Last Post: 07-24-2002, 07:28 PM
  4. The REAL v5 prices
    By Bill Warner in forum Alpha Five Version 4
    Replies: 48
    Last Post: 07-18-2002, 05:42 AM
  5. Cheapest Prices
    By James Moulding in forum Alpha Five Version 4
    Replies: 5
    Last Post: 07-08-2002, 10:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •