FMP
Jul 17, 2025 7:57 PM - Sanzhi Kobzhan
Image credit: VWAP indicator. defining the strength of the trend
If you're a trader who wants to understand the real average price a stock is trading at during the day, you'll love the VWAP indicator. In this article, I'll show you how to calculate VWAP using hourly stock data from the Financial Modeling Prep (FMP) API. I'll also explain how you can use it to forecast the strength of the trend.
VWAP stands for Volume Weighted Average Price. It tells you the average price a stock has traded at, based on both price and volume. Unlike a simple average, VWAP takes into account how much of the stock was traded at each price point.
This makes it super helpful for:
Finding the fair price of a stock.
Spotting if a stock is overpriced or underpriced during the day.
Helping big investors know if they got a good deal on a trade.
You can use the FMP 1-Hour Stock Chart API Endpoint to get open, high, low, close, and volume for each hour. Here's what the API URL looks like:
Replace AAPL with any stock ticker.
Replace custom_api_key with your actual API key from FMP.
The response provides you JSON data that looks like this:
{
To calculate VWAP, use this formula:
Where:
Price = (High + Low + Close) ÷ 3
Multiply Typical Price by Volume for each hour
Add up all those values and divide by the total volume
Let's say you have this data for three hours:
Now:
Calculate Typical Price for each hour:
(211.28 + 210.84 + 210.96) ÷ 3 ≈ 211.03
(211.80 + 210.94 + 211.33) ÷ 3 ≈ 211.36
(211.46 + 210.82 + 210.94) ÷ 3 ≈ 211.07
Multiply by volume:
211.03 × 33,616,336 = 7,096,025,672
211.36 × 32,338,011 = 6,835,828,890
211.07 × 3,864,360 = 815,965,051
Add them up:
Total (Price × Volume) = 14,747,819,613
Total Volume = 69,818,707
Divide:
VWAP = 14,747,819,613 ÷ 69,818,707 = 211.2
Calculate in a similar way for every hour. You can also plot your findings on a graph, as shown on the below image. I will explain below how to use your findings.
Here's how VWAP helps traders every day:
If the stock is trading below VWAP, it may be undervalued.
If it's above VWAP, it may be overvalued.
Use VWAP as a support or resistance line.
If price bounces off VWAP, it might be time to enter or exit a trade.
Using VWAP with hourly stock data from the FMP API is a great way to trade smarter. It's simple to calculate, and it gives powerful insights into how a stock is really performing during the day. You can use the 1 Hour Interval Stock Chart API Endpoint to fetch data to your custom app and automate the VWAP building process. You can also import your findings in Google Sheets or use them in your browser to build it manually.
Nov 22, 2024 5:08 AM - Parth Sanghvi
Fundamental analysis is one of the most essential tools for investors and analysts alike, helping them assess the intrinsic value of a stock, company, or even an entire market. It focuses on the financial health and economic position of a company, often using key data such as earnings, expenses, ass...
Dec 22, 2024 7:59 AM - Sanzhi Kobzhan
When it comes to cutting-edge software and data analytics, Palantir Technologies (NYSE: PLTR) is often front and center. But for many investors, it’s important to consider alternative or complementary stocks in the same sector that may offer robust growth potential. As PLTR looks expensive (overvalu...
Dec 30, 2024 4:32 AM - Sanzhi Kobzhan
Are you curious about how professional investors decide whether a stock might be one of the best undervalued stocks to buy now? One of the most popular tools is the Discounted Cash Flow (DCF) model. In this article, I’ll walk you through a DCF step by step. By the end, you’ll see how the Advanced DC...