Stock Quotes

This is a discussion on Stock Quotes within the Networking/Device Communication forums, part of the General Programming Boards category; I'm interested in retrieving stock quotes in a C++ program of mine. I was wondering if there's a server I ...

  1. #1
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532

    Stock Quotes

    I'm interested in retrieving stock quotes in a C++ program of mine. I was wondering if there's a server I could connect to in my program, query, and receive the quotes? Any related help would also be appreciated. Thanks.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    http://finance.yahoo.com/d/?s=msft&f=l1

    That gives you the quote for microsoft in plain ascii as I understand it. For other stocks, change the 's' querystring variable
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Thanks a ton! That's exactly what I needed.
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  4. #4
    C++ Enthusiast jmd15's Avatar
    Join Date
    Mar 2005
    Location
    MI
    Posts
    532
    Well after you informed me of that server, I utilized it and wrote a program that grabs the stock price of the specified stock symbol and saves it to a list and then will run through the list on request. I implemented time stamps as stocks are always changing. I wrote the program yesterday and just now decided that it might be a good idea to share the source code. That way anyone who may be interested can learn from my code(my attempt at self-flattery). It's written for Windows using Winsock, sorry you Linux users. To compile it you have to link the wsock32 library. I know it's basic but I wrote it so I can grab my code from this sample program and add it into a game or whatever I may want to use real stock quotes for. It was fun to write it anyways since I don't really have much else to work on. Feedback is appreciated as well even though it's not some big thing. Thanks and I hope it can help someone.
    Attached Files Attached Files
    Trinity: "Neo... nobody has ever done this before."
    Neo: "That's why it's going to work."
    c9915ec6c1f3b876ddf38514adbb94f0

  5. #5
    Registered User
    Join Date
    Dec 2005
    Posts
    5
    Quote Originally Posted by FillYourBrain
    Seconding thanks for this link!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Niche Question: real time stock quotes
    By keira in forum C Programming
    Replies: 0
    Last Post: 03-08-2008, 10:06 AM
  2. Retail Outlet Managment System - the 4th
    By Presidentofusa in forum C Programming
    Replies: 3
    Last Post: 11-10-2007, 09:44 PM
  3. Moving Average Question
    By GCNDoug in forum C Programming
    Replies: 4
    Last Post: 04-23-2007, 11:05 PM
  4. Debug Error Really Quick Question
    By GCNDoug in forum C Programming
    Replies: 1
    Last Post: 04-23-2007, 12:05 PM
  5. Stock Taking program
    By C Babe in forum C++ Programming
    Replies: 3
    Last Post: 05-15-2003, 07:40 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21