Premium Cryptocurrency Widgets — JavaScript / PHP Plugin

Server requirements

PHP 5.4.x or above is required to use this plugin (you have 7.3.33 installed).

Setup

Copy pcw folder to the web root folder of your website (preferably) or any other folder accoring to your website structure.

To display stock market widgets on a PHP page it should load necessary CSS, JavaScript and PHP files. The plugin uses few external assets, including Font Awesome icons, JQuery and Socket.io. To load necessary CSS / JavaScript assets add the following lines to the <HEAD> section of your web page:

          <script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.js"></script>
<script src="/pcw/assets/vendor/socket/socket.io.js"></script>
<link rel="stylesheet" type="text/css" href="http://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
<link rel="stylesheet" type="text/css" href="/pcw/assets/css/style.css" />
<script src="/pcw/assets/js/app.min.js"></script>

If you copied the pcw folder to a folder other than the web root you also need to add the following line before loading the app.min.js (note, that the path should not contain slash at the end):

          <script>var pcwPathToAssets = '/path/to/pcw/folder';</script>
        

To load necessary PHP functions add this line to the top of your PHP file (path may need to be corrected depending on where the pcw folder was copied to):

          <?php require_once '/pcw/shortcode.php'; ?>
        

To display a widget you need to call pcw_shortcode() function and pass widget parameters to it. Widget parameters can vary from one widget type to another, but the most common are: type (widget type - box, table, spark chart etc), symbol (cryptocurrency symbol or comma-separated list of symbols), template and color (color theme - some widget templates have only one color available). The following section illustrates how to call the shortcode function to display various types of widgets. If all files are properly copied the widgets below will display live values.

Inline widgets

Widget parameters

Basic

<?php pcw_shortcode(['type' => 'inline', 'symbol' => 'BTC~USD', 'template' => 'basic']); ?>

  ( ) price has rocketed to new highs this week. The price of   ( ) has risen sharply

Basic 2

<?php pcw_shortcode(['type' => 'inline', 'symbol' => 'BTC~USD', 'template' => 'basic2']); ?>

  ( ) price has rocketed to new highs this week. The price of   ( ) has risen sharply

Basic 3

<?php pcw_shortcode(['type' => 'inline', 'symbol' => 'BTC~USD', 'template' => 'basic3']); ?>

   price has rocketed to new highs this week. The price of    has risen sharply

Box widgets

Widget parameters

Basic

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'basic', 'color' => 'blue']); ?>
()
()

Basic 2

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'basic2', 'color' => 'blue']); ?>

Basic 3

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'basic3', 'color' => 'blue']); ?>
/

Basic 4

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'basic4', 'color' => 'blue']); ?>

Basic 5

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'basic5', 'color' => 'blue']); ?>

Basic 6

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'basic6', 'color' => 'blue']); ?>

Basic 7

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'basic7', 'color' => 'blue']); ?>

Rounded

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'rounded', 'color' => 'blue']); ?>

Color header

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'header', 'color' => 'blue']); ?>

Color background

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'background', 'color' => 'blue']); ?>
()

Gradient background

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'gradient', 'color' => 'blue']); ?>

Horizontal (green / red)

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'horizontal', 'color' => 'blue']); ?>

Circle

<?php pcw_shortcode(['type' => 'box', 'symbol' => 'BTC~USD', 'template' => 'circle', 'color' => 'blue']); ?>
()

Spark charts widgets

Widget parameters

Spark line chart

<?php pcw_shortcode(['type' => 'spark', 'symbol' => 'BTC~USD', 'template' => 'line', 'color' => 'blue']); ?>

Spark line chart 2

<?php pcw_shortcode(['type' => 'spark', 'symbol' => 'BTC~USD', 'template' => 'line2', 'color' => 'blue']); ?>
|

Spark line chart 3

<?php pcw_shortcode(['type' => 'spark', 'symbol' => 'BTC~USD', 'template' => 'line3', 'color' => 'blue']); ?>

Spark bar chart

<?php pcw_shortcode(['type' => 'spark', 'symbol' => 'BTC~USD', 'template' => 'bar', 'color' => 'blue']); ?>

Leaderboard widgets

Widget parameters

Basic

<?php pcw_shortcode(['type' => 'leaderboard', 'symbol' => 'BTC~USD', 'template' => 'basic', 'color' => 'blue']); ?>
24H Range -
/

Color frame

<?php pcw_shortcode(['type' => 'leaderboard', 'symbol' => 'BTC~USD', 'template' => 'color-frame', 'color' => 'blue']); ?>
/
Low 24H
High 24H
Volume 24H
Last Trade Vol
Last Market

Color background

<?php pcw_shortcode(['type' => 'leaderboard', 'symbol' => 'BTC~USD', 'template' => 'background', 'color' => 'blue']); ?>
/
Volume 24H | Low 24H | High 24H | Last Market

Black background

<?php pcw_shortcode(['type' => 'leaderboard', 'symbol' => 'BTC~USD', 'template' => 'black-background', 'color' => 'blue']); ?>
/
Volume 24H | Low 24H | High 24H | Last Market

Table widgets

Widget parameters

Basic

<?php pcw_shortcode(['type' => 'table', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'basic', 'fields' => 'FROMSYMBOL,NAME,PRICE,ABSCHANGE24HOUR,PCTCHANGE24HOUR', 'color' => 'blue']); ?>
Symbol Name Price Change % Change

Color text

<?php pcw_shortcode(['type' => 'table', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'color-text', 'fields' => 'FROMSYMBOL,NAME,PRICE,ABSCHANGE24HOUR,PCTCHANGE24HOUR', 'color' => 'blue']); ?>
Symbol Name Price Change % Change

Color background

<?php pcw_shortcode(['type' => 'table', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'color-background', 'fields' => 'FROMSYMBOL,NAME,PRICE,ABSCHANGE24HOUR,PCTCHANGE24HOUR', 'color' => 'blue']); ?>
Symbol Name Price Change % Change

Color header rounded

<?php pcw_shortcode(['type' => 'table', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'color-header-rounded', 'fields' => 'FROMSYMBOL,NAME,PRICE,ABSCHANGE24HOUR,PCTCHANGE24HOUR', 'color' => 'blue']); ?>
Symbol Name Price Change % Change

Color header & border

<?php pcw_shortcode(['type' => 'table', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'color-header-border', 'fields' => 'FROMSYMBOL,NAME,PRICE,ABSCHANGE24HOUR,PCTCHANGE24HOUR', 'color' => 'blue']); ?>
Symbol Name Price Change % Change

Zebra

<?php pcw_shortcode(['type' => 'table', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'zebra', 'fields' => 'FROMSYMBOL,NAME,PRICE,ABSCHANGE24HOUR,PCTCHANGE24HOUR', 'color' => 'blue']); ?>
Symbol Name Price Change % Change

Comparison widgets

Widget parameters

Basic

<?php pcw_shortcode(['type' => 'comparison', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'basic', 'fields' => 'NAME,OPEN24HOUR,LOW24HOUR,HIGH24HOUR,ABSCHANGE24HOUR,PCTCHANGE24HOUR,VOLUME24HOUR', 'color' => 'blue']); ?>
Name
Open 24H
Low 24H
High 24H
Change
% Change
Volume 24H

Color background

<?php pcw_shortcode(['type' => 'comparison', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'background', 'fields' => 'NAME,OPEN24HOUR,LOW24HOUR,HIGH24HOUR,ABSCHANGE24HOUR,PCTCHANGE24HOUR,VOLUME24HOUR', 'color' => 'blue']); ?>
Name
Open 24H
Low 24H
High 24H
Change
% Change
Volume 24H

Black background

<?php pcw_shortcode(['type' => 'comparison', 'symbol' => 'BTC~USD,ETH~USD,LTC~USD', 'template' => 'black-background', 'fields' => 'NAME,OPEN24HOUR,LOW24HOUR,HIGH24HOUR,ABSCHANGE24HOUR,PCTCHANGE24HOUR,VOLUME24HOUR', 'color' => 'blue']); ?>
Name
Open 24H
Low 24H
High 24H
Change
% Change
Volume 24H

Ticker widgets

Widget parameters

Basic

<?php pcw_shortcode(['type' => 'ticker', 'symbol' => 'BTC~USD,BCH~USD,ETH~USD,ETC~USD,LTC~USD,XMR~USD,DOGE~USD,DSH~USD,ZEC~USD,DASH~USD', 'template' => 'basic', 'color' => 'blue', 'speed' => 20000, 'direction' => 'left', 'pause' => TRUE]); ?>

Basic 2

<?php pcw_shortcode(['type' => 'ticker', 'symbol' => 'BTC~USD,BCH~USD,ETH~USD,ETC~USD,LTC~USD,XMR~USD,DOGE~USD,DSH~USD,ZEC~USD,DASH~USD', 'template' => 'basic2', 'color' => 'blue', 'speed' => 20000, 'direction' => 'left', 'pause' => TRUE]); ?>
() () () () () () () () () () () () () () () () () () () ()

Color background

<?php pcw_shortcode(['type' => 'ticker', 'symbol' => 'BTC~USD,BCH~USD,ETH~USD,ETC~USD,LTC~USD,XMR~USD,DOGE~USD,DSH~USD,ZEC~USD,DASH~USD', 'template' => 'background', 'color' => 'blue', 'speed' => 20000, 'direction' => 'left', 'pause' => TRUE]); ?>
( / ) ( / ) ( / ) ( / ) ( / ) ( / ) ( / ) ( / ) ( / ) ( / )

Supported color themes

Supported cryptocurrencies (1535)

Data fields

Get support

Contact us if you have any questions. Please don't forget to supply the purchase code along with your message.