Terminal Command for Stock Information [closed]
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
开发者_JS百科Closed 4 years ago.
Improve this questionI would like to have a command that gets me the value a stock closed at.
How can I do this?
This is a pretty open ended question and not very specific, so I'm basically just thinking out loud here. Tou would have to write a command line program that took in a stock code and then went off to some kind of web service and fetched the appropriate value for that code.
So do you want something that just outputs to the terminal window (ie. "standard out")?
>stock AAPL
339.30
stock
would be the name of the compiled binary.
The program takes in a single argument for the stock code. It send that code to a web service that provides pricing information, then parses the result and spites it back out.
精彩评论