🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

bitfox

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bitfox

Multi Exchange Crypto Currency Trading bot, Data Analysis Library and Strategy Back testing Engine

1.0.0
latest
Version published
Weekly downloads
11
266.67%
Maintainers
1
Weekly downloads
 
Created

fox png

BitFox

version download

Multi Exchange Crypto Currency Trading Bot
&
Data Analysis Library and Strategy Back testing Engine

BitFox is a comprehensive multi-exchange trading bot library and data analysis tool, with a powerful strategy back testing engine. It provides quick access to market data for storage, analysis, visualization, indicator development, algorithmic trading, strategy backtesting, bot programming, and related software engineering.

It is intended to be used by coders, developers, technically-skilled traders, data-scientists and financial analysts for building trading algorithms.

Warning

This application is under heavy development and in beta nothing has been tested. Use this tool and library at your own risk!

Support BitFox Development

Bitcoin address: bc1qs6rvwnx0wlrqlncm90kk7mu0xs6980t85avfll

Current feature list:

  • support for many cryptocurrency exchanges
  • fully implemented public and private APIs
  • Integrated BackTesting Engine
  • Flexible Event Handling
  • Real Time Trade & Strategy Execution
  • Data Analysis & Optimization
  • Email Notifications
  • Slack Notifications
  • Telegram Notifications

Documentation

BitFox Documentation

Installation

$ npm i bitfox@latest
$ npm install -g bitfox@latest

Quick Start

let {BitFoxEngine, Strategy, SuperTrend, builder} = require("bitfox").bitfox;



(async  () =>{
    
    // Initialize the Engine
    let engine = builder()
        .requiredCandles(200)
        .sidePreference("long")
        .backtest(true)
        .pollRate(10)
        .public(true)
        .exchange("bybit")
        .symbol("ADAUSDT")
        .timeframe("15m")
        .amount(100)
        .profitPct(1.03)
        .stopLossPct(0.98)
        //.fee(1.01)
        .key("FAKE_KEY")
        .secret("FAKE_SECRET")
        .life(false)
        .interval(10)
        .build(); 
    
    // Set up the Exchage Client
    await engine.setupAndLoadClient()
    
    // Leverage A Strategy from BitFoxes strategy repository
    engine.applyStrategy(SuperTrend)
    // or Alternatively 
    let bitfox = require("bitfox");
    engine.applyStrategy(bitfox.SuperTrend)
    
    
    // Set Up Event Handlers 
    engine.on('onStrategyResponse', (eventArgs) => {
        console.log(eventArgs)
    });
    engine.on('onMessage', (eventArgs) => {
        console.log(eventArgs)
    });
    engine.on('onError', (eventArgs) => {
        console.log(eventArgs)
    });
    engine.on('onOrderPlaced', (eventArgs) => {
        console.log(eventArgs)
    });
    engine.on('onOrderFilled', (eventArgs) => {
        console.log(eventArgs)
    });
    engine.on('onTradeComplete', (eventArgs) => {
        console.log(eventArgs)
    });
    engine.on('onStopLossTriggered', (eventArgs) => {
        console.log(eventArgs)
    });
    // SetUp Custom Event Handler (You need to fire the event yourself BitFox doesn't know about your Custom Event")
    engine.on('MyCustomEvent', (eventArgs) => {
        console.log(eventArgs)
    });
    
    // You could get the Event handler and fire an event by using below code
    engine.getEventEmitter().fireEvent("MyCustomEvent", {customEventData:"YourCustomEventData"})
    
    // Start The BitFox Engine
    await engine.run();
})();

FAQs

Package last updated on 12 Feb 2024

Did you know?

Socket

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