
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@gviper/alphavantage-api
Advanced tools
TypeScript SDK for Alpha Vantage API with comprehensive type safety and all endpoint support
⚠️ IMPORTANT NOTICE: This SDK was generated using Claude Code AI. While most functionality has been verified, please thoroughly test all features in your specific use case before production deployment. Users should validate API responses and error handling according to their requirements.
A professional TypeScript SDK for the Alpha Vantage Financial API featuring complete endpoint coverage, full type safety, and enterprise-grade reliability.
# npm
npm install @gviper/alphavantage-api
# pnpm
pnpm add @gviper/alphavantage-api
# yarn
yarn add @gviper/alphavantage-api
import { AlphaVantage } from '@gviper/alphavantage-api';
// Initialize with your API key - all endpoints ready to use
const av = new AlphaVantage({
apiKey: process.env.ALPHA_VANTAGE_API_KEY
});
// Start using immediately
const stockData = await av.stocks.daily({ symbol: 'AAPL' });
const companyInfo = await av.fundamental.companyOverview({ symbol: 'AAPL' });
const exchangeRate = await av.forex.exchangeRate({
from_currency: 'USD',
to_currency: 'EUR'
});
// Real-time and historical stock prices
const intradayData = await stocks.intraday({
symbol: 'AAPL',
interval: '5min'
});
const dailyData = await stocks.daily({ symbol: 'AAPL' });
const weeklyData = await stocks.weekly({ symbol: 'AAPL' });
const monthlyData = await stocks.monthly({ symbol: 'AAPL' });
// Company financials and metrics
const overview = await fundamental.companyOverview({ symbol: 'AAPL' });
const income = await fundamental.incomeStatement({ symbol: 'AAPL' });
const balance = await fundamental.balanceSheet({ symbol: 'AAPL' });
const cashflow = await fundamental.cashFlow({ symbol: 'AAPL' });
const earnings = await fundamental.earnings({ symbol: 'AAPL' });
// Currency exchange rates and data
const rate = await forex.exchangeRate({
from_currency: 'USD',
to_currency: 'EUR'
});
const fxIntraday = await forex.intraday({
from_symbol: 'EUR',
to_symbol: 'USD',
interval: '5min'
});
// Digital currency market data
const btcDaily = await crypto.daily({
symbol: 'BTC',
market: 'USD'
});
const cryptoRate = await crypto.exchangeRate({
from_currency: 'BTC',
to_currency: 'USD'
});
// 50+ technical analysis indicators
const sma = await technicals.sma({
symbol: 'AAPL',
interval: 'daily',
time_period: 20,
series_type: 'close'
});
const rsi = await technicals.rsi({
symbol: 'AAPL',
interval: 'daily',
time_period: 14,
series_type: 'close'
});
const macd = await technicals.macd({
symbol: 'AAPL',
interval: 'daily',
series_type: 'close'
});
// Macroeconomic data
const gdp = await economic.realGDP();
const cpi = await economic.cpi();
const unemployment = await economic.unemployment();
const federalFunds = await economic.federalFundsRate();
// News sentiment and market insights
const sentiment = await intelligence.newsSentiment({
tickers: 'AAPL,TSLA'
});
const topGainers = await intelligence.topGainersLosers();
// Commodity prices
const oil = await commodities.crudeOilWTI();
const gold = await commodities.copper();
// Options data
const optionsData = await options.realtime({ symbol: 'AAPL' });
// Search and lookup tools
const search = await util.symbolSearch({ keywords: 'Microsoft' });
const listing = await util.listingStatus();
| Module | Description | Key Methods |
|---|---|---|
| Stocks | Real-time & historical stock data | intraday(), daily(), weekly(), monthly() |
| Fundamental | Company financials & metrics | companyOverview(), incomeStatement(), balanceSheet() |
| Forex | Foreign exchange rates | exchangeRate(), intraday(), daily() |
| Crypto | Cryptocurrency market data | daily(), weekly(), monthly(), exchangeRate() |
| Technicals | 50+ technical indicators | sma(), rsi(), macd(), bbands(), adx() |
| Economic | Macroeconomic indicators | realGDP(), cpi(), unemployment(), inflation() |
| Intelligence | Market news & sentiment | newsSentiment(), topGainersLosers() |
| Options | Options market data | realtime() |
| Commodities | Commodity prices | crudeOilWTI(), naturalGas(), copper() |
| Util | Search & utility functions | symbolSearch(), listingStatus() |
All methods include comprehensive TypeScript definitions:
// Full IntelliSense support
const data = await stocks.intraday({
symbol: 'AAPL', // string (required)
interval: '5min', // '1min' | '5min' | '15min' | '30min' | '60min'
adjusted: true, // boolean (optional)
extended_hours: true, // boolean (optional)
month: '2024-01', // string (optional)
outputsize: 'full' // 'compact' | 'full' (optional)
});
The SDK provides structured error handling for common API scenarios:
try {
const data = await stocks.daily({ symbol: 'INVALID' });
} catch (error) {
if (error.message.includes('Invalid API call')) {
console.log('Invalid symbol or API parameters');
} else if (error.message.includes('API call frequency')) {
console.log('Rate limit exceeded');
}
}
Get your free API key from Alpha Vantage:
// Environment variable (recommended)
const client = new AlphaVantageClient({
apiKey: process.env.ALPHA_VANTAGE_API_KEY
});
// Direct assignment (for testing only)
const client = new AlphaVantageClient({
apiKey: 'YOUR_API_KEY_HERE'
});
This package is part of a monorepo. Please refer to the root README for development guidelines and contribution instructions.
MIT License - see the LICENSE file for details.
FAQs
TypeScript SDK for Alpha Vantage API with comprehensive type safety and all endpoint support
We found that @gviper/alphavantage-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.