Socket
Socket
Sign inDemoInstall

uniswapdexcandles

Package Overview
Dependencies
6
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    uniswapdexcandles

![Dexi](https://i.ibb.co/ZBk2v0b/dexi.png)


Version published
Weekly downloads
2
increased by100%
Maintainers
1
Install size
8.82 MB
Created
Weekly downloads
 

Readme

Source

Candles Uniswap V2 Pairs DEX FREE

Dexi

Sushi

With this module, you can retrieve JSON data regarding the trading pairs created on Uniswap. 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 uniswapdexcandles --save

Usage

Require library

import { getUniswapCandles } from 'uniswapdexcandles'
    /**
     *  Parameters
     * A => token_main example ( mytoken address) or ( 0x8390a1da07e376ef7add4be859ba74fb83aa02d5 )
     * 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 getUniswapCandles('0x8390a1da07e376ef7add4be859ba74fb83aa02d5',
    '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2', '720');
    console.log(result);
})();

DEXI

Keywords

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc