Code Monkey home page Code Monkey logo

bitmex-copy-bot's Introduction

Bitmex Copy Bot

A python bot that copies all trades in realtime from your primary bitmex account to secondary using bitmex api.

  • Supports copy of all instruments (XBTUSD, XRPU19 etc)
  • Supports copy of all order types : limit orders, market orders, close order, cancellation of orders, stop orders and trailing stops.
  • Copy order amendments(for both drag order on UI and panel amend)
  • Copy a percentage or a ratio of primary account(can be used for leverage)
  • Copy to/from multiple accounts.
  • Realtime copy ~1 second.

Compatibility

Python 3.6+ Check python version by typing in shell

python --version

If <3.6, download latest python version.

Install

git clone https://github.com/destructiondogo/bitmex-copy-bot.git
cd bitmex-copy-bot
pip install -r requirements.txt

Configure

Modify your api keys in the config.py file.

Change ENDPOINT from TESTNET_URL to BITMEX_URL if you want to try it directly on bitmex. It's suggested that you try running it on testnet first.

ENDPOINT : BITMEX_URL

LEADERS are the primary bitmex accounts. Create key here https://www.bitmex.com/app/apiKeys

'API_KEY' : 'rCkGLrr2hF',
'API_SECRET' : 'seiJbiBGLrxrPBmgsV'

FOLLOWERS are the copiers. Make sure api keys have both read + modify order access.

FOLLOWS can be used to follow multiple leaders with different percentage quantities. If leader creates a 1000 quantity buy order, follower with 30% follow will create 300 quantity buy order.

Run

python run.py

Need help?

DM on twitter for any errors/suggestions/help. https://twitter.com/destructionDogo

Independent contributors

  • https://github.com/tolgamorf Added support for amending orders, optimisation of bot, bot restart if websocket disconnects, testing the bot.

bitmex-copy-bot's People

Contributors

destructiondogo avatar tolgamorf avatar

Watchers

James Cloos 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.