New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

alphavantage

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alphavantage - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

7

CHANGELOG.md

@@ -48,1 +48,8 @@ 0.0.1

- Fixing documentation for data endpoints
1.1.2
- Updating deps
- Fixing broken forex test
1.2.0
- Adding global quote endpoint support

1

lib/data.js

@@ -33,2 +33,3 @@ 'use strict';

monthly_adjusted: series('TIME_SERIES_MONTHLY_ADJUSTED'),
quote: series('GLOBAL_QUOTE'),
batch: symbols => {

@@ -35,0 +36,0 @@ // Convert array to csv string.

@@ -66,2 +66,3 @@ 'use strict';

'Stock Quotes': 'data',
'Global Quote': 'data',
'Technical Analysis: SMA': 'data',

@@ -119,2 +120,12 @@ 'Technical Analysis: EMA': 'data',

'Technical Analysis: HT_PHASOR': 'data',
'01. symbol': 'symbol',
'02. open': 'open',
'03. high': 'high',
'04. low': 'low',
'05. price': 'price',
'06. volume': 'volume',
'07. latest trading day': 'latest_trading_day',
'08. previous close': 'prev_close',
'09. change': 'change',
'10. change percent': 'change_percent',
'1. Information': 'information',

@@ -309,3 +320,7 @@ '1. From_Currency Code': 'from_currency',

.then(data => {
if (data['Meta Data'] === undefined && data['Realtime Currency Exchange Rate'] === undefined) {
if (
data['Meta Data'] === undefined &&
data['Realtime Currency Exchange Rate'] === undefined &&
data['Global Quote'] === undefined
) {
throw `An AlphaVantage error occurred. ${data['Information'] || JSON.stringify(data)}`;

@@ -312,0 +327,0 @@ }

2

package.json
{
"name": "alphavantage",
"version": "1.1.2",
"version": "1.2.0",
"description": "A simple interface to the Alpha Vantage API.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -75,2 +75,3 @@ # AlphaVantage

alpha.data.monthly_adjusted(symbol, outputsize, datatype, interval)
alpha.data.quote(symbol, outputsize, datatype, interval)
alpha.data.batch([symbol1, symbol2..])

@@ -77,0 +78,0 @@ ```

@@ -79,2 +79,12 @@ 'use strict';

test(`global quote data works`, () => {
expect.assertions(2);
return delay(TIME)
.then(() => alpha.data.quote(`msft`))
.then(data => {
expect(data['Global Quote']).toBeDefined();
expect(data['Global Quote']['01. symbol']).toEqual('MSFT');
});
});
test(`batch data works`, () => {

@@ -81,0 +91,0 @@ expect.assertions(9);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc