Coder Social home page Coder Social logo

effanuel / bitmex-scaled-orders Goto Github PK

View Code? Open in Web Editor NEW
33.0 9.0 15.0 39.44 MB

Bitmex trading tool using REST API and Websocket

License: MIT License

JavaScript 0.17% HTML 0.39% TypeScript 97.53% Shell 0.02% SCSS 1.88%
websocket rest-api reactjs express distributions bitmex-api

bitmex-scaled-orders's Introduction

bitmex-scaled-orders's People

Contributors

dependabot[bot] avatar effanuel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bitmex-scaled-orders's Issues

Crossover_BUY order and Cross_under SELL order for market order and trailing limit orders)

@Effanuel Hello master.

Could you add a new feature like this one:
Crossover_BUY and Cross_under SELL ( for market order and trailing limit orders) .

Bitmex website has a more or less this feature , but it is manually. It is using "Stop Market , but unchecking close on trigger box "

image

The program has to save in memory this order or algorithm and execute it when the market achieve that rule (crossover and crossunder) on the selected price ?

I know that every feature you had launched have the best quality .

This features help the traders have more possibility to have a win trade, because the trade is excecuted on the market trend .

This feature help when traders use strategies like these ones :

  • Support and resitance ( Rectangular, triangle or any shape).
  • Cross moving average (EMAs , MA , etc.)

I think many people is going to use it, i think it is very useful.
Now that you have Maket orders and Trailing orders would be a little more easy for you.

This orders or algorithm help a lot ; this is a logic and useful feature .

I will wait your reply.

Automatically quantity needed or contracts needed(enhancement)

@Effanuel could you create a checked dot or checked box on the "trailing order feature " and "market order feature" , when it is checked do this :
the program automatically calculate the "quantity needed " at the current price to have a better entry and more close to the current price.

Example : I have 10,000 contracts for example on the wallet

I executed a buy order using 100 contracts at the price $1000.

Then the price move down to 999.5 so my unrealised PNL is negative, but if I execute a new order 200 contracts at the current price 999.5 my new current entry is 999.5 and so on ....

Calculate manually the exact quantity needed to us it is too slow compared to the computer; imagine if we used 3736 contracts and then the price moves against us 6 points , calculate the exact Quantity needed at the current prices takes time , time the market do not allow us. The fast we react the better the entry.

What I am trying to say is that most of the times we are on a trade but maybe we entered late and the prices goes against us but we have enough contracts to keep buying to have a better entry , but it takes time calculate the quantity value needed at the current prices to have a better entry.

Like you know the price move very fast and when we try to calcule the quantity needed on excel the prices just go away.
It is more easy the program automatically caculate and we just click or press the buy button .

I think for this enhancement the program has to display the "entry price" , "contracts executed " , the "unrealised PNL" ( dollars ) , and the "quantity needed at the current price" . I suggest to add information feature below the bitcoin price , this is just a information feature.

I will wait your answer.

Question about API keys setup.

Hello,

You need to set API keys before building the application.
This means that .env file is of no use after npm build ? If so the private API key being "built into" the package could cause some privacy issues, that is if you plan to add containers as a deployment method down the road.
Maybe add an option to force using the .env file?

BTW did that behavior change beetwen 1.7.1 and 1.7.2? It used to work with .env file being binded after npm build and now I get

Missing API Key

Regards,

Trailing buy/sell or sticky order buy/sell

Hello.
I really like your software, I use it .
Could you add a Trailing buy/sell order or sticky order buy/sell order to buy or sell faster and Chase the price if it moves as close as possible and excecute it as soon as possible with limit (post only) automatically, please .

Websocket doesn't subscribe to TESTNET

Expected Behavior

If TESTNET .env option is set to true, Websocket should subscribe to
wss://testnet.bitmex.com/realtime?subscribe

Current Behavior

Websocket doesn't subscribe to testnet instrument data.

Possible Solution

Create a new .env file.

Possible Implementation

  1. Create a global .env file;
    • It would require ejecting from create-react-app;
  2. Create a second .env file in the client/ directory;
    • Too much of a hassle;

[FEATURE] Auto-fill with current price

Hello,

When going long:
Auto fill the "Lower Price" box with [current price + 1 (or a user defined amount)]
If "Higher Price" price could be set at the same time at [current price + [user] defined percentage] would be nice.

And the other way around when going short.

Regards,

Bybit API or primexbt api

Hello Effanuel .

How difficult it is add a Bybit API or primexbt ? It will take you to much time ? .

Price and quantity rounding problem for many placed orders

Expected Behavior

Generating multiple count orders using <ScaledOrders /> table should limit Quantity, Range start and Range end of placed orders as to not exceed the provided inputs.

Current Behavior

Given some larger Order count, contracts quantity and last order's price are wrongly calculated.

Results:

  • Quantity - 9,994 (instead of 10,000)
  • Range end USD - 8,888.5 (instead of 8,888)

Possible Solution

Check Quantity and Range end USD at the end of generating orders

Steps to Reproduce

  1. Inputs:
    • Quantity - 10000
    • Order count - 10
    • Range start USD - 7777
    • Range end USD - 8888
    • Distribution - Positive

Possible Implementation

  • Add the difference between the expected amounts to the first/last orders quantity for Quantity.
  • Limit the Range end USD

KuCoin Support

Hey!

Nice tool, exactly what I was looking for! Are you actively still working on this project?

Would you be interested in adding support for KuCoin as well?

Thanks

Preview doesn't properly close if state changes are reverted

Expected Behavior

<PreviewContainer /> should properly close, if <ScaledContainer /> components states are the same as they were after <PreviewContainer /> was opened.

Current Behavior

If some kind of change is made and then reverted, <PreviewContainer /> doesn't close on "Preview" click.

  • Current situation is handled using boolean cache variable that sets to false after every state change.

Possible Solution

Save state after opening and check before closing/opening.

Steps to Reproduce

  1. Open <PreviewContainer />;
  2. Delete any number of <PreviewContainer /> input and then revert it;
  3. Press "Preview".

Possible Implementation

After opening the <PreviewContainer />, stringify and save its state to compare it before every open/close of <PreviewContainer />.

[FEATURE] Take profit targets

Hello,

Would it be possible to add the ability to set multiple take profit targets with a stop limit order when price reaches deepest entry order?
Something like:
image

Or new boxes for Take Profit #1, Take Profit #2, Take Profit #N and so forth.
With a "+" button to add Take Profit Boxes.

Regards,

Issues with npm run build

When sending the command npm run build an error message is produced.

sh: SET: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] build: SET NODE_ENV=production && cd ../client && npm run build && cd ../api
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Support for XRPUSD

What would be involved to add XRPUSD to the list of available instruments?

I had looked at the code briefly, and it looks like the calculations are coded in, so any new instruments would require new calculations.

New fork for linux

I've wanted to shift this tool over to run on a linux server so it can be available 24/7 and external. In order to do that, I modified the /api/package.json and /client/package.json to remove the "SET" for NODE_ENV so it would build on Linux. The SET is needed for Windows but causes build to fail on linux.

So I created a new fork, and it's currently running. Putting this issue here as an FYI.

program improvements to be the best and more helpful.

@Effanuel I only want to use your program and not the Bitmex website.
This are the improvement that needs the program are:

Number 1: Scale order using the current price , contracts , order count , apart feature
This improvement use a apart feature instead range start and range end.
This improvement speed up place the a scale order .
This improvement do not waste time typing a range .

Example:

scale apart

scale_apart

Number 2: Limit order with post only with a feature to place the order at the current price if the option is checked or place a normal limit order at the price that we want and has a stop-loss too.

This impovement is helpful , because we can place a limit order at a specific price or at the current price when we see a imminent reversal in price.

Number 3: Trailing order automatically reopen the order until it got filled , but do not duplicate the order or stop if we manually stop it.
This happen when the order is rejected by bitmex.
Sometimes when we use trailing order bitmex close it and there is this error :
order had excint of parcitipate do not initiate

image

i search on github, i found something that could solve the problem ?
ctubio/Krypto-trading-bot#969 (comment)

Number 4 : feature to paste the current price maybe a little button or just clicking the current price and a feature to increment or decrease the price just clicking a arrow up or arrow down for this button too.
stop-loss , range start , range end .

This improvement speed up place a order and we can concentrate on technical analysis and we do not waste time typing the orders.

example :
current_price , increase, decrease

please commnet, tell me your thought,

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.