sushiswapcandles

0.0.2 • Public • Published

Candles Sushiswap DEX FREE

Dexi

Sushi

With this module, you can retrieve JSON data regarding the trading pairs created on SushiSwap. It allows you to obtain OHLC (Open, High, Low, Close) candlestick data for intervals of 12 hours and any other timeframes you desire. This data will prove invaluable for creating charts and visualizations using libraries like TradingView and other similar resources.

Installation

Install using npm:

npm install sushiswapcandles --save

Usage

Require library

import { getSushiCandles } from 'sushiswapcandles'
    /**
     *  Parameters
     * A => token_main example ( mytoken address) or ( 0x6B3595068778DD592e39A122f4f5a5cF09C90fE2 )
     * B => token_pair example (WETH) or (ETH) or (USDT) ( 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 ) 
     * C => time => default 720
    */

   /**
     * 1440 => 24 hours => recommended
     * 720 => 12 hours => recommended
     * 120 => 2 hour => recommended
     * 60 => 1 hour => recommended
     * 15 => 15 minute
     * 5 => 5 minute
     * 1 => 1 minute
    */
(async () => {
    const result = await getSushiCandles('0x6B3595068778DD592e39A122f4f5a5cF09C90fE2',
    '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', '720');
    console.log(result);
})();

DEXI

Package Sidebar

Install

npm i sushiswapcandles

Weekly Downloads

2

Version

0.0.2

License

MIT

Unpacked Size

10.1 kB

Total Files

11

Last publish

Collaborators

  • edinsoncs