Skip to content

stebansaa/tradeviw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦄 Uniswap Tradingview

Financial charts using data from Uniswap and other DEXs.

🛠 Installation

npm install uniswap-tradingview

Usage

<div id="uniswap_tradingview_chart"></div>
import { UniswapTradingview, Dex } from 'uniswap-tradingview';

const chart = new UniswapTradingview({dex: Dex.UNISWAP});
const pairAddress = '0xa478c2975ab1ea89e8196811f51a7b7ade33eb11';
await chart.createChart('uniswap_tradingview_chart', { width: 400, height: 300 }, pairAddress, '1m', 'LINE');

Examples

Candle Chart

Example 1

import { UniswapTradingview, Dex } from 'uniswap-tradingview';

const chart = new UniswapTradingview({dex: Dex.UNISWAP});
const pairAddress = '0xa478c2975ab1ea89e8196811f51a7b7ade33eb11';
await chart.createChart('uniswap_tradingview_chart', { width: 400, height: 300 }, pairAddress, '1w', 'CANDLE');

Line chart

Example 2

import { UniswapTradingview, Dex } from 'uniswap-tradingview';

const chart = new UniswapTradingview({dex: Dex.UNISWAP});
const pairAddress = '0xa478c2975ab1ea89e8196811f51a7b7ade33eb11';
await chart.createChart('uniswap_tradingview_chart', { width: 400, height: 300 }, pairAddress, '1m', 'LINE');

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.2%
  • JavaScript 1.8%