alphaswap-tradingview
v1.0.0
Published
Financial charts using data from AlphaSwap.
Downloads
1
Readme
🦄 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
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
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');