flipside-js/README.md
2018-12-02 20:49:50 -05:00

1.6 KiB

FlipsideJS

FlipsideJS is a library of embeddable widgets that display data from the Flipside Platform API, including FCAS.

To get started, request an API Key: api@flipsidecrypto.com.

Live Example

View Live FCAS Widget Example

Install

The FlipsideJS library is made available over our CDN to ensure a speedy response time.

<script src="https://d3sek7b10w79kp.cloudfront.net/flipside-v1.2.0.js"></script>

Usage

<div id="container"></div>
<script>
  var flipside = new Flipside(YOUR_FLIPSIDE_API_KEY);
  // To render an FCAS widget
  flipside.createFCAS("container", "ZEC");
</script>

API

createFCAS(id: string, symbol: string, options: object) Creates an FCAS widget in the given DOM element ID.

Parameters

  • id: ID of the DOM 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.createFCAS("container", "ZEC", {
  score: true,
  plot: true,
  logo: true,
  symbol: true,
  trend: true,
  rank: true
});

Building

$ yarn run build

Current Build Status

Codeship Status for FlipsideCrypto/flipside-js