Easy Stock Market Quotes with marketstack

By (Sponsor)  on  

The stock market is wild right now, at least in the United States. Between pandemic, political events, and everything else going on, the stock market is one swing after another. There are a host of services that give you stock quotes but I don't trust them; I feel like they delay information, good or bad, so they can get their transactions first. That's why I created my own price alert system, and to do so, I used marketstack!


Quick Hits

  • Free to join!
  • Provides real-time, history, and end of day quotes
  • Covers 72 major exchanges around the globe (NYSE, NASDAQ, DAX, etc.)
  • Trusted by Garmin, Revolut, Uber, Amazon, and more
  • Documentation provides code samples in PHP, Node.js, Python, and more

After joining marketstack, you can start hitting the marketstack API with your stock quote requests. A basic request is as easy as:

# Single stock
curl http://api.marketstack.com/v1/eod

# Multiple stocks
curl http://api.marketstack.com/v1/eod

As with every endpoint, you get very detailed results:


If I'm looking for by-the-minute quotes, I can grab intra-day results or even real time quotes with the interval parameter:

# Intra-day
curl http://api.marketstack.com/v1/intraday

# Real-time
curl http://api.marketstack.com/v1/intraday

I've used the historical data API to create my own charts:

# Historical
# Buy date to today, so I can calculate loss or profit
curl http://api.marketstack.com/v1/intraday

marketstack also features JSONP support, ticker information, and much more! I really enjoyed using marketstack and the wealth of information it provided for my important use cases. If you need to present stock and financial information on your website, marketstack might be your best bet!


    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!