Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
hubot-stock-checker
Advanced tools
Hubot script to interact with the IEX Cloud stock exchange apis. Provides stock quotes, company stats, company info and dividend history. Allows users and channels to manage watchlists of favorite stocks, check value of saved holdings, and provides quick
Get quick stats on any stock by asking your hubot!
This integration utilizes hubot to interact with stock stats provided by IEX Cloud. I wanted quick access via my bot to stock values and found many existing hubot options were broken. So, I chose to write my own interacting with the free IEX Trading API. As of v2, IEX has moved away from the original IEX Trading api's to a new IEX Cloud api. You will need an IEX Cloud token (api key) to utilize this hubot plugin. Please note that these tokens are free, but paid tiers based on usage do exists.
Since the start of this script, I've added a handful of features to fulfill the needs of me and my friends. However, if you have a feature you want, catch me on twitter (@kwandrews7) or create a pull request. API docs are linked are available here.
Example Interaction:
User >> hubot stock f
Hubot >> ▼ Ford Motor Company (F) | Price: $10.05 (-0.298%%) | Day: $10.04 - $10.10 | Year: $9.82 - $13.48 | Market Cap: $40.06 b
hubot get stock (symbol)
- Returns basic stock stats. 'get' is optional. Name, symbol, price, daily price change, day, month, and year price range, and market cap.hubot get stock (symbol) dividends
- Returns dividend history for the past year. 'dividends' can be replaced with div, divs, or dividends to achieve the same response. 'get' is still optional. Dividends as reported by IEX Trading for the past year. This API is currently missing the the two latest dividends on occasion, an active issue is open on GitHub.hubot get stock (symbol) info
- Returns company information. Name, symbol, description, CEO, website, industry, and IEX trading tags.hubot get stock (symbol) stats
- Returns key stats: Name, symbol, market cap, float, change (5d, 1m, 1y, 5y), dividends (yld / rate), latest EPS, EBITDA, revenue, gross profits, cash and debt.hubot get stock (symbol) news
- Returns related news articles as replies in a thread.hubot save stock (symbol)
- Saves the symbol to the current channel's watchlist.hubot delete stock (symbol)
- Deletes the symbol from the current channel's watchlist.hubot list (our/my) favorites
- Lists basic stock stats for each of the saved symbols.hubot get stock top losers
- Returns stocks with the most downward movement. (max 5).hubot get stock top movers
- Returns stocks with the most movement, absolute value. (max 5).hubot get stock top winners
- Returns stocks with the most upward movement. (max 5).hubot save (number) shares of (symbol)
- Saves the symbol and shares count to the current channel's holdings.hubot delete shares of (symbol)
- Deletes the symbol and shares count from the current channel's holdings.hubot save (number) shares of (symbol)
- Lists all holdings for the current channel showing price and value (price * shares).Run the following command
$ npm install hubot-stock-checker --save
To enable the script, add a hubot-stock-checker
entry to the external-scripts.json
file (you may need to create this file).
["hubot-stock-checker"]
Once installed, you will need to configure your IEX Cloud public token as environment variable HUBOT_IEX_CLOUD_TOKEN
.
list my holdings
command.list my holdings
command to allow for an optional trailing space to prevent missed commands typed using mobile keyboards that auto space words.latestPrice
to iexRealtimePrice
was a bad idea. Apparently, the real time price drops to zero after hours for certain stocks. I put it back to latestPrice, my bad.FAQs
Hubot script to interact with the IEX Cloud stock exchange apis. Provides stock quotes, company stats, company info and dividend history. Allows users and channels to manage watchlists of favorite stocks, check value of saved holdings, and provides quick
We found that hubot-stock-checker 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 researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.