npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

aframe-stock-ticker

v1.1.0

Published

An aframe component for displaying live stock tickers.

Downloads

4

Readme

aframe-stock-ticker

Latest NPM release Minzipped size License

An aframe component for displaying live stock tickers. Also works with cryptocurrency and forex.

Example gif

Usage

crypto-chart

To create a crypto chart, add the crypto-chart component.

<a-entity crypto-chart="id: ethereum; days: 30; width: 5; height: 2.5;"></a-entity>

Uses the Coingecko API to gather data. This API doesn't require an API key, and works out of the box with the code above.

stock-chart

To create a stock chart, add the stock-chart component.

<a-entity stock-chart="symbol: AMC; interval: 30min; length: 100; width: 5; height: 2.5;"></a-entity>

Uses the Twelve Data API to gather data. This API works for any asset type - stocks, forex, and crypto - but it requires an API key. An API key can be acquired here for free, with a limit of 800 requests / day.

Once you have a Twelve API key, set window.TWELVE_API_KEY equal to it, as seen at the top of the example.

Properties

crypto-chart

Properties

| Property | Description | Default | | ---------------- | -------------------------------------------------------------------------------------------------------------------------------- | ---------- | | id | id of the target token. Full list available as a JSON here | "Ethereum" | | days | how many days back to display data from. Can only be: 1,7,14,30,90,180,365,max | 14 | | width | width of the chart | 4 | | height | height of the chart | 2 | | refreshRate | how often to refresh the chart data, in seconds | 30 | | | | | | backgroundColor | the color of the chart background | "#333" | | enableBackground | whether to enable a background behind the candles | true | | enableTitle | whether to display the ticker name on the chart | true | | enablePrices | whether to display the prices on the chart | true | | coloredWicks | whether to display wicks in the candles | true |

Members

| Member | Description | Path | | ---------- | ----------------------------------------------------------------------- | ---------------------------------------- | | timeseries | the current timeseries data. | el.components["crypto-chart"].timeseries |

stock-chart

Properties

| Property | Description | Default | | ---------------- | ------------------------------------------------- | ------- | | symbol | symbol of the target asset. | "AMC" | | interval | chart interval, how long each candle represents | "15min" | | length | how many candles to display | 100 | | width | width of the chart | 4 | | height | height of the chart | 2 | | refreshRate | how often to refresh the chart data, in seconds | 30 | | | | | | backgroundColor | the color of the chart background | "#333" | | enableBackground | whether to enable a background behind the candles | true | | enableTitle | whether to display the ticker name on the chart | true | | enablePrices | whether to display the prices on the chart | true | | coloredWicks | whether to display wicks in the candles | true |

Members

| Member | Description | Path | | ---------- | ----------------------------------------------------------------------- | --------------------------------------- | | timeseries | the current timeseries data. | el.components["stock-chart"].timeseries |

Events

| Event | Description | Event.detail | | -------------- | -------------------------------------------------- | --------------------------------------------------------------- | | price_increase | fired on chart refresh, if the price has increased | {name: asset name, price: current price, candle: latest candle} | | price_decrease | fired on chart refresh, if the price has decreased | {name: asset name, price: current price, candle: latest candle} |