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

opentrader

v1.0.0-beta.25

Published

OpenTrader is a powerful open-source crypto trading bot designated to automate your trading strategies on various cryptocurrency exchanges.

Downloads

6,841

Readme

GitHub Actions Workflow Status NPM Version GitHub commit activity Static Badge Static Badge

OpenTrader is an advanced cryptocurrency trading bot offering high-frequency, cross-exchange arbitrage and event-based strategies, including technical analysis with indicators. Features a user-friendly management UI, robust backtesting capabilities, and support for 100+ exchanges via CCXT.

Features:

  • ✨ Robust UI: A user-friendly interface for managing the bots.
  • 🌐 Multiple Exchanges: Trade across various cryptocurrency exchanges.
  • 📝 Paper Trading: Test your strategies without risking real money.
  • ⚙️ Easy Installation: Install effortlessly via NPM for a streamlined setup process.

Strategies:

  • [x] Grid: A grid trading strategy that profits from the price fluctuation of an asset.
  • [x] RSI: A Relative Strength Index (RSI) strategy that buys and sells based on the RSI indicator.
  • [x] DCA: Dollar-Cost Averaging (DCA) strategy that buys an asset at regular intervals.
  • [ ] ARB: Arbitrage strategy that takes advantage of price differences through cross-exchange trading.
  • [x] CUSTOM: Build your own strategy in just a few lines of code

🤖 State of the Project

This project is a personal passion, developed in my free time, and currently not monetized. If you find it useful, please give it a ⭐️. Your support means a lot and motivates me to keep improving the bot. If you'd like to make a donation, see the options below. 💖

[!NOTE] If you choose to build the project from source, please note that you'll only be able to interact with the bot via the CLI, and you can run only one bot instance. Running multiple bots requires the UI, which currently resides in a private repo until I finalize the licensing and funding options.

Currently, the NPM version includes the full bot functionality, including the UI, and I'm offering it for free to early adopters. 🎉

Quick start

Get started with OpenTrader in just a few steps. Follow this quick guide to install, configure, and run your crypto trading bot.

Installation

  1. Install OpenTrader globally using npm:
npm install -g opentrader
  1. Set an admin password for later accessing the OpenTrader UI:
opentrader set-password <password>
  1. Start the OpenTrader app
opentrader up

The app will start the RPC server and listen on port 8000.

Tip: Use opentrader up -d to start the app as a daemon. To stop it, run opentrader down.

Usage

UI

The user interface allows managing multiple bots and strategies, viewing backtest results, and monitoring live trading.

UI Preview

You can access the OpenTrader UI on: http://localhost:8000

CLI

Connect an exchange

Copy the exchanges.sample.json5 file to exchanges.json5 and add your API keys.

Available exchanges: OKX, BYBIT, BINANCE, KRAKEN, COINBASE, GATEIO

Choose a strategy

Create the strategy configuration file config.json5. We will use the grid strategy as an example.

{
  // Grid strategy params
  settings: {
    highPrice: 70000, // upper price of the grid
    lowPrice: 60000, // lower price of the grid
    gridLevels: 20, // number of grid levels
    quantityPerGrid: 0.0001, // quantity in base currency per each grid
  },
  pair: "BTC/USDT",
  exchange: "DEFAULT",
}

Currently supported strategies: grid, dca, rsi

Run a backtest

Command: opentrader backtest <strategy> --from <date> --to <date> -t <timeframe>

Example running a grid strategy on 1h timeframe.

opentrader backtest grid --from 2024-03-01 --to 2024-06-01 -t 1h

To get more accurate results, use a smaller timeframe, e.g. 1m, however, it will take more time to download OHLC data from the exchange.

Running a Live Trading

Command: opentrader trade <strategy>

Example running a live trading with grid strategy.

opentrader trade grid

To stop the live trading, run opentrader stop

Project structure

🪪 License

Licensed under the Apache 2.0 License. See the LICENSE file for more information.

Disclaimer

This software is for educational purposes only. USE THE SOFTWARE AT YOUR OWN RISK. THE AUTHORS AND ALL AFFILIATES ASSUME NO RESPONSIBILITY FOR YOUR TRADING RESULTS. Do not risk money that you are afraid to lose. There might be bugs in the code - this software DOES NOT come with ANY warranty.

Donate

If you find OpenTrader useful and would like to support its development, consider making a donation. Your contributions will help cover the costs of maintaining and improving this project.

Donate via:

  • Bitcoin (BTC): 1LBqWWne1ac455UmUDVF32ozVAhy1HgVXn
  • Ethereum (ETH): 0x60371d49F9Cc7ec7d7e34979D5DD31996B7B43Ff

Thank you for your support!