Results 1 to 5 of 5

Thread: Getting FTSE and NASDAQ stock market details

  1. #1
    Registered+
    Join Date
    Jun 2010
    Posts
    76
    Thanks
    34
    Thanked
    0 times in 0 posts

    Getting FTSE and NASDAQ stock market details

    Hi,

    I'm new to getting info from a website and rendering it but have been asked by a potential employer to create such a feature on a website. What would be useful is if someone could point me in the right direction and possibly some scripts to look at?

    Cheers.

  2. #2
    Senior Member oolon's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    2,294
    Thanks
    150
    Thanked
    302 times in 248 posts
    • oolon's system
      • Motherboard:
      • Asus P6T6
      • CPU:
      • Xeon w3680
      • Memory:
      • 3*4GB Kingston ECC
      • Storage:
      • 160GB Intel G2 SSD
      • Graphics card(s):
      • XFX HD6970 2GB
      • PSU:
      • Corsair HX850
      • Case:
      • Antec P183
      • Operating System:
      • Windows 7 Ultimate and Centos 5
      • Monitor(s):
      • Dell 2408WFP
      • Internet:
      • Be* Unlimied 6 down/1.2 up

    Re: Getting FTSE and NASDAQ stock market details

    Try getting it from yahoo loads has files with up to 500 lines in them like...

    3IN.L
    888.L
    AAIF.L

    Prices are 15 minutes delayed, live prices are expensive! if you just want to look at the for free have a look at Shareprice

    Code:
    #!/bin/bash
    
    # Copyright James Hawtin <oolon at NO ankh SPAM org PLEASE > 2009
    # All rights reserved
    
    PATH=/usr/local/bin:/usr/bin:/bin
    
    HM=/home/oolon
    PREFIX=stocks
    
    LOAD="true"
    cd $HM/$PREFIX/stocks/daily/yahoo/loads
    
    for i in *
    do
            cd $HM/$PREFIX/stocks/daily/yahoo
            multistocks=`cat loads/$i | while read a; do echo "$a+"; done | xargs echo | sed -e "sq qqg" | sed -e "sq+\\\$qq"`
    
    #   wget "http://uk.old.finance.yahoo.com/d/quotes.csv?s=$allstocks&f=sl1d1t1c1ohgv&e=.csv"
    #   wget "http://finance.yahoo.com/d/quotes.csv?s=$allstocks&f=sl1d1t1c1ohgv&e=.csv"
            FILE=`date +%Y%m%d-$i.csv`
            URL="http://uk.old.finance.yahoo.com/d/quotes.csv?s=$multistocks&f=sl1d1t1c1ohgv&e=.csv" 
            curl $URL > $FILE
            sleep 5
    done
    $HM/$PREFIX/script/daily_loaddata.sh
    Last edited by oolon; 22-06-2010 at 02:20 PM.
    (\__/) All I wanted in the end was world domination and a whole lot of money to spend. - NMA
    (='.*=)
    (")_(*)

  3. Received thanks from:

    smush (22-06-2010)

  4. #3
    Registered+
    Join Date
    Jun 2010
    Posts
    76
    Thanks
    34
    Thanked
    0 times in 0 posts

    Re: Getting FTSE and NASDAQ stock market details

    Hi oolon,

    Thanks for the info in your reply and code, but what I've been asked for is the ability to enter a stock symbol and to retrieve the FTSE and NASDAQ data for that company. This is what I'm struggling with as I've never done this before and also never had to get data from another website and render it in my own website so this is what I'm looking to get guidance in.

    Originally I had a WordPress blog with a Yahoo stocks widget but the widget takes you to Yahoo's website when you enter a stock symbol, but what the person wants is for it to be done all on my website (including displaying of a company's stock market data such as current share price etc)

    Cheers.

  5. #4
    Senior Member oolon's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    2,294
    Thanks
    150
    Thanked
    302 times in 248 posts
    • oolon's system
      • Motherboard:
      • Asus P6T6
      • CPU:
      • Xeon w3680
      • Memory:
      • 3*4GB Kingston ECC
      • Storage:
      • 160GB Intel G2 SSD
      • Graphics card(s):
      • XFX HD6970 2GB
      • PSU:
      • Corsair HX850
      • Case:
      • Antec P183
      • Operating System:
      • Windows 7 Ultimate and Centos 5
      • Monitor(s):
      • Dell 2408WFP
      • Internet:
      • Be* Unlimied 6 down/1.2 up

    Re: Getting FTSE and NASDAQ stock market details

    What you need to use is what I have shown a simple example for above, the Yahoo stocks API have a read here. Unless you cache things, (yahoo have a rate limiter that will lock you out for 2 days). You need to so some user side scripting so their computer pulls the information.
    (\__/) All I wanted in the end was world domination and a whole lot of money to spend. - NMA
    (='.*=)
    (")_(*)

  6. Received thanks from:

    smush (22-06-2010)

  7. #5
    Registered+
    Join Date
    Jun 2010
    Posts
    76
    Thanks
    34
    Thanked
    0 times in 0 posts

    Re: Getting FTSE and NASDAQ stock market details

    Cheers. I will have a look.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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