Code Monkey home page Code Monkey logo

passivbot_futures's Introduction

passivbot_futures

trading bot running on bybit inverse futures and binance usdt futures

use at own risk

requires python >= 3.8

dependencies, install with pip:

python3 -m pip install matplotlib pandas websockets ccxt


released freely -- anybody may copy, redistribute, modify, use for commercial, non-commercial, educational or non-educational purposes, censor, claim as one's own or otherwise do or not do whatever without permission from anybody


usage:

supports exchanges bybit and binance

add api key and secret as json file in dir api_key_secret/{exchange}/your_user_name.json

formatted like this: ["KEY", "SECRET"]

make a copy of settings/{exchange}/default.json

rename the copy your_user_name.json and make desired changes

run in terminal: python3 {exchange}.py your_user_name


overview

the bot's purpose is to accumulate btc in bybit inverse, usdt in binance usdt futures

it is a market maker bot, making a grid of limit orders above and below price

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


a backtester is included

use backtesting_notes.ipynb in jupyter notebook or jupiter-lab

to test multiple settings,

open backtester.py, go to def jackrabbit, adjust starting settings, n_iterations, ranges, etc

and run backtester.py:

python3 backtester.py exchange your_user_name n_days


settings, bybit example:

{

    'default_qty': 1.0                  # entry qty
    'grid_step': 25.0                   # grid price spacing
    'leverage': 100.0,                  # leverage (irrelevant in bybit because cross mode in is always 100x leverage)
    'margin_limit': 0.001,              # limits the bot's max allowed pos_size.  set it lower than actual account balance
    'markups': [0.0005, 0.01],          # when there's a position, bot makes a grid of n_close_orders whose prices are
                                        # evenly distributed between min and max markup, and whose qtys are pos_size // n_close_orders
    'n_close_orders': 10,               # max n close orders
    'n_entry_orders': 10,               # max n entry orders
    'symbol': 'BTCUSD'                  # only one symbol at a time

}


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

XMR: 49gUQ1jasDK23tJTMCvP4mQUUwndeLWAwSgdCFn6ovmRKXZAjQnVp2JZ2K4UuDDdYMNam1HE8ELZoWdeJPRfYEa9QSEK6XZ

passivbot_futures's People

Contributors

enarjord 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.