mirror of
https://github.com/FlipsideCrypto/flipside-js.git
synced 2026-02-06 10:48:11 +00:00
| src | ||
| .babelrc | ||
| .gitignore | ||
| index.html | ||
| License.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| webpack.config.js | ||
| yarn.lock | ||
FlipsideJS
FlipsideJS provides a library embeddable widgets that display data from the Flipside Platform API.
Install
<script src="https://flipsidecrypto.com/flipside-js/flipside.js"></script>
Usage
<div id="container"></div>
<script>
var flipside = new Flipside(YOUR_FLIPSIDE_API_KEY);
flipside.create("container", "BTC");
</script>
API
create(id: string, symbol: string, options: object) Creates an FCAS widget in the given element ID.
Parameters
- id: ID of the element in which to create the widget.
- symbol: Symbol of the asset. e.g "BTC"
- opts: Display options for the widget
Options
score: boolean: Show/hide the score section.plot: boolean: Show/hide the plot graph.logo: boolean: Show/hide the asset's logo.symbol: boolean: Show/hide the asset's symbol.trend: boolean: Show/hide the 7 day trend.rank: boolean: Show/hide the FCAS rank.
Default options
flipside.create("container", "ETH", {
score: true,
plot: true,
logo: true,
symbol: true,
trend: true,
rank: true
});
Building
$ yarn run build
Development
$ yarn run dev