Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
marketmuster
Advanced tools
##About
###Description A simple nodejs library to gather stock data.
###Author Norman Joyner - norman.joyner@gmail.com
##Getting Started
###Installation
npm install marketmuster
###Configuration Simply require the marketmuster module, instantiate a new MarketMuster object, configure it if necessary, and start making calls.
The .config(options)
method is optional. It is used to configure the datasource that marketmuster will pull from. Here is an example:
var MarketMuster = require("marketmuster");
var marketmuster = new MarketMuster();
var options = {
datasource: "markitondemand"
}
marketmuster.config(options);
The default datasource is the Yahoo Finance API.
###Supported APIs
####Yahoo Finance API
The Yahoo Finance API is unauthenticated, so no additional configuration parameters are necessary. This is the default configured API, so no .config()
call is needed. If you like to be explicit, you can use the following config object:
var options = {
datasource: "yahoo"
}
####Markit On Demand API The Markit On Demand API is unauthenticated, so no additional configuration parameters are necessary. To interact with this API, you can use the following config object:
var options = {
datasource: "markitondemand"
}
###Examples Printing a live TSLA quote using the Yahoo Finance API:
var MarketMuster = require("marketmuster");
var marketmuster = new MarketMuster();
marketmuster.getQuotes("TSLA", function(quote){
console.log(quote.TSLA);
});
Printing live TSLA / AAPL quotes using the Markit On Demand API:
var MarketMuster = require("marketmuster");
var marketmuster = new MarketMuster();
marketmuster.config({
datasource: "markitondemand"
});
marketmuster.getQuotes(["TSLA", "AAPL"], function(quote){
console.log(quote.TSLA);
console.log(quote.AAPL);
});
Printing a live TSLA quote using the Yahoo Finance API, returning only the Bid attribute:
var MarketMuster = require("marketmuster");
var marketmuster = new MarketMuster();
marketmuster.getQuotes("TSLA", { filter: ["Bid"] }, function(quote){
console.log(quote.TSLA);
});
Printing streaming TSLA / AAPL quotes using the Yahoo Finance API:
var MarketMuster = require("marketmuster");
var marketmuster = new MarketMuster();
marketmuster.streamQuotes(["TSLA", "AAPL"], function(stream){
stream.on("AAPL", function(quote){
console.log(quote);
});
stream.on("TSLA", function(quote){
console.log(quote);
});
});
FAQs
Streaming and static stock quotes from various datasources
We found that marketmuster demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.