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)
- 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.
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)
-
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;
- Account > API keys > Create API key;
- Clone the repo:
git clone https://github.com/Effanuel/Bitmex-scaled-orders.git
cd Bitmex-scaled-orders-master/api
- Install NPM packages for client and server:
npm run init:packages
- 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.
- Build the application:
npm run build
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
cd Bitmex-scaled-orders/api
npm run prod
Run tests: (not many at the moment)
cd Bitmex-scaled-orders/client
npm test
These are the available distributions to choose from:
This is the formula used to calculate distributions:
(The chart representations are symbolic)
(You can view the code in client/src/util/index.ts
file)
-
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;
Distributed under the MIT License. See LICENSE
for more information.