npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bitprophet

v0.6.19

Published

Crypto trading platform for Binance that uses chat bots as its interface

Downloads

51

Readme

Latest Version GitHub last commit npm downloads

NPM

BitProphet

BitProphet is a node crypto trading platform for Binance exchange that uses chat bots as its interface. Its main purpose is the automation of trading techniques, but it can also be used as a simple order notification tracker or as an alert system for the most used technical indicators. Suggestions and pull requests are very welcome!

Features

  • Analyse hundreds of tokens in multiple intervals EVERY second
  • Technical Indicators (SMA, EMA, RSI, Stochastics, Bollinger Bands, Ichimoku and more)
  • Stop loss and trailing profits
  • Paper trading
  • Create your own strategies
  • Be notified anywhere with Telegram or Discord

Telegram Interface

Installation

npm install bitprophet --save

Setting Up Telegram Bot

First, you'll need to create a bot for Telegram. Just talk to BotFather and follow simple steps until it gives you a token for it. You'll also need to create a Telegram group, the place where you and BitProphet will communicate. After creating it, add the bot as administrator (make sure to uncheck "All Members Are Admins").

Setting Up Discord Bot (optional)

Create a server and follow these simple steps until you have a token and added the bot to the server you've just created.

Retrieving Chat IDs

In order to find out the chat id where your bot was added to, run node with the following code and then just say something in the group/server. The bot will reply with the chat id.

const bitprophet = require('bitprophet')
bitprophet.options({
    telegram: {
        token: "YOUR_TELEGRAM_BOT_TOKEN"
    },
    discord: {
        token: "YOUR_DISCORD_BOT_TOKEN"
    }
})
bitprophet.listenToChatId()

Chat ID

Getting Started

This is the code to start BitProphet. If the only thing you need is to be notified of trades, you're done.

const bitprophet = require('bitprophet')
bitprophet.options({
    binance: {
        key: "YOUR_BINANCE_API_KEY",
        secret: "YOUR_BINANCE_API_SECRET"
    },
    telegram: {
        chatId: "YOUR_TELEGRAM_GROUP_ID",
        token: "YOUR_TELEGRAM_BOT_TOKEN"
    },
    discord: {
        chatId: "YOUR_DISCORD_CHANNEL_ID",
        token: "YOUR_DISCORD_BOT_TOKEN"
    }
})

bitprophet.start()

You should now see a message in Telegram/Discord telling you BitProphet has started.

In Telegram/Discord type list and you'll see all the available strategies listed with the respective ids. If a strategy listed has the [PT] prefix, it means it has Paper Trading active. To start a strategy, just type start strategy_id. For example, start buydip.

Getting Started

Adding Strategies

Add the following option naming a new directory for your strategies.

bitprophet.options({
    strategiesDir: "./path/my/strategies"
})

Create index.js inside that folder with the configuration for all your strategies

module.exports = {
    strategies: {
        alertsbb: {
            name: "Alerts Bollinger Bands",
            targetMarket: "BTC"
        },
        quickdip: {
            name: "Quick Dip",
            //buyAmountMarket: 0.012,
            buyPercentageAccount: 0.01,
            profitTarget: 1.4,
            maxLoss: 0.8,
            maxTradingPairs: 4,
            targetMarket: "BTC"
        },
        ichitest: {
            name: "Ichimoku Test",
            paperTrading: true,
            buyAmountMarket: 0.012,
            profitTarget: 1.4,
            maxTradingPairs: 8,
            targetMarket: "BTC",
            excludeTokens: ["NEO", "TRX"]
        },
        //...
    }
}

Create your strategies based on the examples.

Chat Bots Commands

  • help | h - Show all available commands
  • status | st - Show version and status
  • account | total | ttl - Show total balance in BTC and USDT, plus BNB amount
  • profits | % - Show profits
  • profits + | % + - Show profits per pair
  • left | l - Show trades left
  • sell token | exit token - Sell token, if it's currently trading
  • sell token price | exit token price - Sell token@price, if it's currently trading
  • cancel token - Cancel currently trading token
  • orders | o - Show open orders
  • orders token | o token - Show open orders for the given token
  • start strategyId - Start strategy
  • stop strategyId - Stop strategy
  • list - Show available strategies
  • list strategyId - Show valid / trading pairs for the given strategy
  • token | tokenmarket - Show price for the specified token, BTC market default. (e.g. ada, adaeth)
  • pause - Pause system (ongoing trades won't be paused)
  • restart - Kill BitProphet's process. Useful when using a keep alive process manager like pm2.

Profits Discord

Adding Custom Commands

Add the following option naming a new directory for your commands.

bitprophet.options({
    commandsCustomDir: "./path/my/commands"
})

Create index.js inside that folder with the configuration for all your commands

module.exports = {
    commands: {
        test: {
            triggers: ["test", "t"]
            description: "Just a test command"
        },
        //...
    }
}

Create in the same directory test.js and code it based on the examples.


Thank you to all contributors: supershwa, ionutgalita