GithubHelp home page GithubHelp logo

morteza-taheri / passivbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from enarjord/passivbot

0.0 0.0 0.0 2.66 MB

trading bot running on binance and bybit futures

License: Other

Python 99.90% Dockerfile 0.10%

passivbot's Introduction

passivbot

passivbot Version

Trading bot running on Bybit and Binance Futures

⚠️ Use at own risk ⚠️

Overview

The bot's purpose is to accumulate tokens over time

It is a market maker bot working in futures markets, making multiple post only limit orders above and below current price

It listens to websocket live stream of trades, and updates its orders continuously

If possible, it will use hedge mode

Requirements

Setup dependencies

    pip install -r requirements.txt

Usage:

Supports exchanges Bybit futures and Binance futures, using hedge mode when supported

  1. Add your api key and secret in file api-keys.json
  2. python3 start_bot.py {account_name} {symbol} {path/to/config.json}

Example:

python3 start_bot.py binance_01 XMRUSDT configs/live/binance_xmrusdt.json

Run with docker

Modify command with exchange and user_name in docker-compose.yml and start with docker-compose up -d (-d for background run). All code and files generated are in original git folder.

Stopping bot

For graceful stopping of the bot, set do_longand do_shrt both to false, and bot will continue as normal, opening no new positions, until all existing positions are closed.

Setting up Telegram

The bot provides interfacing with the bot via Telegram via a telegram bot. In order to set it up, you'll need a telegram bot token and a chat-id. Once you have those, you can enable teleegram for each individual account that is specified in the api-keys.json file. There is an example telegram configuration in that file to get started. If a telegram configuration is not present for an account, telegram is disabled at startup.

For setup instructions, see https://docs.microsoft.com/en-us/azure/bot-service/bot-service-channel-connect-telegram?view=azure-bot-service-4.0

Start a chat with @getmyid_bot in telegram to get chat id.

There are several commands & messages provided via Telegram, please issue a /help command in the telegram chat to see all the options.

Documentation [WIP], see the wiki at:

https://github.com/enarjord/passivbot/wiki

Support

Discord

Telegram

Resources

License

Released freely without conditions. Anybody may copy, distribute, modify, use or misuse for commercial, non-commercial, educational or non-educational purposes, censor, claim as one's own or otherwise do whatever without permission from anybody.

Backtester

A backtester is included

  1. modify configs/backtest/default.hjson as desired
  2. run with python3 backtest.py {path_to_live_config_to_test.json}
  3. optional args: -b or --backtest-config: use different backtest config

Will use numba's just in time compiler to speed up backtesting.

Optimizer

To optimize a configuration by iterating multiple backtests,

  1. modify configs/backtest/default.hjson and configs/optimize/default.hjson as desired
  2. run with python3 optimize.py
  3. optional args: -b or --backtest-config: use different backtest config
  4. optional args: -o or --optimize-config: use different optimize config
  5. optionally make optimizer start from given candidate(s) by adding kwarg --start {path_to_starting_candidate.json} if pointing to a directory, will use all .json files in that directory as starting candidates

See wiki for more info on backtesting and optimizing

Live settings

Support the project

Feel free to make a donation to show support of the work

  • XMR: 49gUQ1jasDK23tJTMCvP4mQUUwndeLWAwSgdCFn6ovmRKXZAjQnVp2JZ2K4UuDDdYMNam1HE8ELZoWdeJPRfYEa9QSEK6XZ

  • Nano: nano_1nf3knbhapee5ruwg7i8sqekx3zmifdeijr8495t9kgp3uyunik7b9cuyhf5

  • EOS: nbt4rhnhpjan

  • XLM: GDSTC6KQR6BCTA7BH45B3MTSY52EVZ4UZTPZEBAZHJMJHTUQQ5SM57S7

  • USDT TRC20 (Binance): TJr3KYY8Bz7wRU7QLwoYQHk88LcaBJqQN5

Referrals

passivbot's People

Contributors

enarjord avatar hawkeye-bot avatar johnkearney1 avatar migueltg avatar moafred avatar jeremie-martin avatar jontstaz avatar pbosch avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.