Skip to content

Poilaucul/BitMEX-scaled-orders

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents

BitMEX scaled orders tool

This project is a trading tool based on BitMEX API to help you place orders in a range (It can also be used to overcome the overload feature on the website (although sometimes API's also get suspended due to high load)). (In the next major update, I'll try to include custom order placement with a stepping stop-loss)

Current Features

  • Scaled orders:
    • Place up to 30 orders in a range at once (small order sizes will cause a spam warning);
    • Uniform, Normal, Positive or Negative order placing distributions; (see Distributions section).
  • Shows current price:
    • Based on the latest ask price;
    • Fetched via Websocket;
    • BTC and ETH (currently).
  • Details table:
    • Average entry of scaled orders;
    • Risk in BTC;
    • Risk of account balance.

Built With

The Backend was built using Node + Express and the Frontend, React + Redux. Styled components were taken from React Bootstrap. (CCXT is no longer a dependency since v1.2)

Getting Started

  • Create a BitMEX account;

    (If you are new to BitMEX, consider using my affiliate link to get 10% off the fees for 6 months.)

  • Get API keys:
    • Account > API keys > Create API key;
      • Key Permissions : Order;
      • Withdraw: Unchecked;

Prerequisites

Installation

  1. Clone the repo:
git clone https://github.com/Effanuel/Bitmex-scaled-orders.git
cd Bitmex-scaled-orders-master/api
  1. Install NPM packages for client and server:
npm run init:packages
  1. Enter your API keys in .env (no quotes are needed):
API_KEY = <API_KEY>
API_SECRET = <API_SECRET_KEY>
TESTNET = false

Disclaimer: You need to set API keys before building the application. If you make a typo and only notice after a build, do
npm run clean and npm build

Disclaimer: If you set TESTNET to true, you need to create a Testnet account and set the API keys appropriately. Your main BitMEX account API won't work with TESTNET option set to true.

  1. Build the application:
npm run build

TLDR setup:

git clone https://github.com/Effanuel/Bitmex-scaled-orders.git
cd Bitmex-scaled-orders/api
  • Put API keys in .env
npm run init:packages
npm run build
npm run prod

Usage

After building you just need to run the application:
cd Bitmex-scaled-orders/api
npm run prod

Run tests: (not many at the moment)

cd Bitmex-scaled-orders/client
npm test

Distributions

These are the available distributions to choose from:

This is the formula used to calculate distributions:

formula

(The chart representations are symbolic)
(You can view the code in client/src/util/index.ts file)

Roadmap

  • Chasing price for limit orders;

  • Faster price update;

  • Stepping stop-loss;

  • Custom order/profit target placement;

  • Market Orders;

  • Bitfinex/Binance API;

  • Easier API setup;

  • Multiple accounts for every platform;

  • Saving cache;

  • Settings for multiple ticker subscriptions;

License

Distributed under the MIT License. See LICENSE for more information.

Useful Material

About

Bitmex trading tool using REST API and Websocket

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 85.9%
  • CSS 11.8%
  • HTML 1.9%
  • JavaScript 0.4%