If so, which one should I consider to use?
https://github.com/achannarasappa/ticker
With ticker you can track stocks, crypto, and derivatives prices and positions in real time without leaving your terminal
The latest v5 release introduces functional and performance enhancements with a rewrite of many of the core components. Some of the enhancements include:
Streaming price updates for supported exchanges (e.g. Coinbase)
Price change animation
Debug mode with error logging
Derivatives support
Design improvements (data source extensibility, decoupling currency conversion, streaming and polling data source support)
These enhancements build on the existing features:
Live price tracking for stocks, crypto, and derivatives
Real time profit and loss tracking for positions and portfolios
Support for multiple portfolios
Support for tracking multiple cost basis lots
Customizable display options (color scheme, sorting, additional data)
Currency conversion for prices, positions, and portfolio
Output positions and watchlist as CSV, JSON, and pipe into other commands
Wrote a shell function for this:
q () {
curl -sL "https://www.google.com/finance/quote/$1" | pandoc -f html -t plain | grep -A9 "${1%:*}" | awk 'NR==1 || NR==9' ORS=' '
}Usage:
$ q "SPY:NYSEARCA" SPY • NYSEARCA $451.64
I wanted to do some woodworking & garden work and listen to music, so I wrote a PHP script to yell the current stock price at me. As soon as I post this some asshole will probably point out that there this already exists somewhere and I missed it in my preliminary google search. To that guy I say, "thanks, dick."
By default, it speak a higher stock price in a high pitch, and lower in lower.
Create a file called speakstock.php and run it like
$chmod +x speakstock.php
$./speakstock.php SPY
If you don't have it already, you'll need the spd-say ubuntu command and the number formatting packages
$sudo apt-get install gnustep-gui-runtime php-intl
Here's the script
#!/usr/bin/php
<?php
if($argc === 1) die ("No arguments, please provide stock symbol.\n");
$stock = $argv[1];
$f = new NumberFormatter("en", NumberFormatter::SPELLOUT);
$oldPrice = 0.0;
while(true){
$data = json_decode(file_get_contents("https://financialmodelingprep.com/api/v3/stock/real-time-price/$stock"),true);
$price = floatval($data["price"]) + 0.0;
if( $price !== $oldPrice ){
$pitch = ($price > $oldPrice ? 30 : -30);
$oldPrice = $price;
$number = $f->format($price);
echo $price . PHP_EOL;
`spd-say -p $pitch "$number" `; //1>/dev/null
} else {
echo ".";
// var_dump($data );
}
sleep(1);
}
E: added a package you need
I'm trying to write a script to pull stock quotes using curl
Can this be done easily using curl -L https://someURL.com to pull the data?
Do stock quotes require a login or browser only? Or could I pull it down using JSON?
Thanks in advance.
Many of you may recognize this project from a post I made on this subreddit a few weeks ago - but the then project (a weekend throw-together script) has evolved into a much more serious program.
cliStocksTracker includes many features it didn't before - including custom color selection, command line argument configuration, a more detailed view of your portfolio, and more! Best of all - it's been refactored (twice already!) to make it as friendly for new (and relatively unexperienced) developers to start contributing.
Check out this screenshot, featuring two tickers on the same axis - as well as that upgraded table view!
Straight from the README, this is clearly just a sample - so just imagine how great your portfolio would look!Interested in checking it out (or even better, contributing)? Check out the project on Github:https://github.com/ConradSelig/cliStocksTracker
Hope you enjoy! ~C
If you live in the terminal and want to keep an eye on the markets without leaving it — I built something you might like.
stocksTUI is a terminal-based stock tracker built with Textual. It gives you real-time(ish) prices, ticker-specific news, historical data, and ASCII charts — all navigable with Vim-style keys, no mouse required.
Features:
🧮 Custom watchlists (tech, crypto, indices, etc.)
📉 Historical data with inline charts (via
plotext)📰 Ticker-specific news headlines
⚙️ Configurable UI and themes (Solarized, Dracula, Nord, etc.)
⌨️ Full keybinding support — you never need to leave the keyboard
Works on:
Linux
macOS
Windows (via WSL2)
I built it to have a market dashboard running alongside htop and btop without ever launching a browser.
🔗 GitHub: https://github.com/andriy-git/stocksTUI
Open to feedback, feature ideas, or pull requests!