Skip to content

dex-widget-react-library 0.1.1

Install from the command line:
Learn more about npm packages
$ npm install @covalenthq/dex-widget-react-library@0.1.1
Install via package.json:
"@covalenthq/dex-widget-react-library": "0.1.1"

About this version

DEX ticker React Component

This widget is designed as a React component to show a gist of your DEX data. It gives you details about volume and liquidity percentage change of Top Trading Pools and Top Tokens of a DEX for 24h and 7d timeframe.

DEX widget demo gif

Installation

npm install @covalenthq/[email protected]

Usage

To use the component, first import Widget into your file:

import { Widget } from '@covalenthq/dex-widget-react-library'; 

Example code

A sample code in a React App would look like 

import { Widget } from "@Calm-Rock/dex-widget";
function App() {
  return (
      <Widget 
        chain_id='1'
        dex_name='sushiswap'
        api_key='ckey_..' //Get it from your environment file
        bg_color='grey'
        text_color='white'
      /> 
  );
}

export default App;

Live Demo

See a live demo of the DEX widget here

Props

Property Description Example
chain_id The blockchain id "1" for Ethereum mainnet
dex_name The DEX name "sushiswap"
api_key Covalent API key "ckey_..."
bg_color Background color of the widget "#000000" for black
text_color Text color of dropdown & ticker pair "#FFFFFF" for white

Feedback and Support

If you have any questions, comments, issues and feedback regarding this code template, please message us on Discord.

About Covalent

Covalent provides the industry-leading Unified API bringing visibility to billions of Web3 data points.

Covalent Use Cases

Developers use Covalent to build exciting multi-chain applications like crypto wallets, NFT galleries, and investor dashboard tools utilizing data from 26+ blockchains. Covalent is trusted by a community of 15,000+ developers and powers data for 500+ applications including 0x, Zerion, Rainbow Wallet, Rotki, Bitski and many others.

Register and get your own Covalent API key here

Website | Discord | Telegram | Twitter | YouTube | WeChat

Details


Assets

  • dex-widget-react-library-0.1.1-npm.tgz

Download activity

  • Total downloads 1
  • Last 30 days 0
  • Last week 0
  • Today 0

Recent versions

View all