Open adacumos opened 6 years ago
yes it is there is cross margin of 10
Thanks @Lappls but where can I find settings for leverage to use? I couldn't find anything defined on settings.py
there is a method inside the codes for setting cross-margin in the system
it defaults to 10 so there is no method or something inside setting.py file
Thanks @Abhisheksoni1 btw thanks for this awesome project. It does need allot of improvement though. I'm looking at using TA-Lib so the bot can use different indicators. Will do a pr once done.
Thank you @cofibit it means alot, Yeah we can work on TA-Lib let me know if you need my help in this i am happy to code with you :D
Hi @Abhisheksoni1 is this the method you were referring to on setting the leverage?
bitmex_bot/bitmex.py
@authentication_required def isolate_margin(self, symbol, rethrow_errors=False): """Set the leverage on an isolated margin position""" path = "position/isolate" postdict = { 'symbol': symbol, 'enabled': False } return self._curl_bitmex(path=path, postdict=postdict, verb="POST", rethrow_errors=rethrow_errors)
So I just need to set enabled to True? you said that the default is 10 but where is the default leverage value value defined?
I was trying to figure out the exact same thing let me know if you find something.
@hashtagex yes on bitmex.py there's a method named isolate_margin just set enabled to True as per @Abhisheksoni1 by default it is set to 10x leverage, I'm not sure if it does get whatever leverage you set on your account or it is hard coded to 10x.
@cofibit Great I actually see this in the code before, so I'll look into it again. Thanks for the tip. Would be great if we could get bitmex running on freqtrade. I tried before but I was having trouble getting it to recognize the xbt symbol. Anyways I'll try this out.
@hashtagex yeah was trying to make bitmex work on freqtrade but was throwing allot of errors reason is that bitmex pairs are not the same with bittrex/binance format. Also this is much better than freqtrade since it is using websocket. Ccxt just polls servers and is subjected to limits.
@cofibit true, I can agree with you there. It's just limited, I like seeing and being able to control on the go. But I ran the default bot live for a bit with a few changes to the indicator numbers and didn't do too bad. I was trying to add some of my own as well, but haven't been able to implement them in the bitmex.py file. I see your trying to implement talib. That would be great. I was def not getting anywhere when I was trying, but I'm not a pro, I just get around and learning everyday.
when the bot starts it resets to Cross, should I just change the leverage through bitmex ui? using latest master, thanks
nm, tried the True value in the isolate method and started out with 50x, thanks
Is leverage trading supported?