Alpha Video Training
Results 1 to 3 of 3

Thread: Stock Prices API

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

    Default Stock Prices API

    Does anyone have a good API for looking up stock prices that allows petitions for many stocks? I have this one (below), but it limits petitions to 5 per about 20 -30 seconds moments.

    Code:
    ALPHAVANTAGE:
    	url = "https://www.alphavantage.co/query?function=TIME_SERIES_INTRADAY&symbol="+vsymbol+"&interval=1min&apikey=csv" 
    	result=http_get_page2(url,.f.)
    
    	vc_price_now=word(word(word(result,2,"Time Series"),6,chr(10)),2,chr(58))
    	vc_price_now=alltrim(stritran(stritran(vc_price_now,chr(34),""),chr(44),""))
            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
    mumfie
    Join Date
    Dec 2008
    Location
    UK
    Posts
    201

    Default Re: Stock Prices API

    does it need to be realtime? If not you could schedule the update in a series of batches over a period of time.

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

    Default Re: Stock Prices API

    Yes, I have been trying that, a loop of 5 with a period of 3 min quiet then loop the next 5. For some reason, it doesn't work. It works if I do it manually, but for some very odd reason it does not work in a loop script.
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

Similar Threads

  1. web address to get stock prices
    By Mike Wilson in forum General Questions
    Replies: 26
    Last Post: 12-19-2017, 02:53 PM
  2. Version 5 Upgrade prices in UK
    By Dennis Silver in forum Announcements
    Replies: 5
    Last Post: 02-05-2003, 08:09 AM
  3. RE: the REAL V5 prices
    By Keith B in forum Alpha Five Version 4
    Replies: 61
    Last Post: 07-24-2002, 08:28 PM
  4. The REAL v5 prices
    By Bill Warner in forum Alpha Five Version 4
    Replies: 48
    Last Post: 07-18-2002, 06:42 AM
  5. Cheapest Prices
    By James Moulding in forum Alpha Five Version 4
    Replies: 5
    Last Post: 07-08-2002, 11: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
  •