binance-historical
    TypeScript icon, indicating that this package has built-in type declarations

    1.5.11 • Public • Published

    binance-historical

    Utility to retrieve historical data from Binance.

    Alt Text

    Usage

    With the cli

    npm install -g binance-historical
    binance-historical download
    
    # or by using npx
    npx binance-historical download

    With the library

    import { getKline, Kline } from 'binance-historical';
    
    const result: Array<Kline> = await getKline(
      'ETHUSDT',
      '4h',
      new Date('01-09-2020'),
      new Date('01-12-2021'),
    );
    
    console.log(result);
    // [
    //   ...,
    //   {
    //     openTime: 1579953600000,
    //     open: '159.30000000',
    //     high: '161.00000000',
    //     low: '158.70000000',
    //     close: '160.41000000',
    //     volume: '25015.67605000',
    //     closeTime: 1579967999999,
    //     quoteAssetVolume: '4001959.95527980',
    //     trades: 14330,
    //     takerBaseAssetVolume: '13000.12296000',
    //     takerQuoteAssetVolume: '2079824.44045350',
    //     ignored: '0'
    //   },
    //   ...
    // ]

    Install

    npm i binance-historical

    DownloadsWeekly Downloads

    33

    Version

    1.5.11

    License

    MIT

    Unpacked Size

    13.8 kB

    Total Files

    13

    Last publish

    Collaborators

    • maxgfr