Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bitmex Only Limit Order Size To XBT Available On Side With Accumulated Position #994

Open
asfbhero opened this issue Aug 30, 2019 · 7 comments

Comments

@asfbhero
Copy link

I'm essentially trying to accomplish what TBPValue would do if percentages worked on Margin exchanges as they do on cash accounts.

I am able to get into winning trades without much of an issue, however, since XBT available will continue to go down as more and more leverage is added (buying more and more in an uptrend and selling more and more into a downtrend), when in a winning trade, both the bidsize and the ask size will decrease as margin available decreases.

Want I want to have happen is, if I'm long XBT/USD, and XBT available decreases, I only want the bid size to decrease along with XBT avail, not the ask size.

If I'm short and XBT available decreases, I only want the ask size to decrease along with XBT available.

This should allow for leverage not to get out of control, and turn large winners into losers. I think it would greatly help out anyone trying to use this on Bitmex.

@asfbhero
Copy link
Author

asfbhero commented Sep 4, 2019

@ctubio Where is the code that limits order size to available balance? The changes I've been making haven't worked, which if I was modifying the correct code it should.
Clearly I'm barking up the wrong tree, and I've found that I can only get free coding help from my manager like once a month before he gets bored and I have to wait another month for him to become interested again lol.

@nonkreon
Copy link
Contributor

nonkreon commented Mar 9, 2020

@asfbhero are you getting the same thing I'm getting here:
bitmexkrypto
I have 0.1XBT in my account. Each contract is supposed to be 1USD, but the bot tries to sell 1XBT? It's my first time trying to get into bitmex, I'm not sure if I understand correctly the bitmex situation and what our bot is trying to do

@cryp2owl
Copy link

cryp2owl commented Mar 9, 2020

try doing it on Snapex instead, or Binance futures. I think it'll work in there.

@nonkreon
Copy link
Contributor

nonkreon commented Mar 9, 2020

thank you for your response @cryp2owl , how do you configure K.sh for Snapex or binance futures? I cannot find the API_EXCHANGE files, I checked your fork but that seems to be even with carles', can you commit the exchange config files for those exchanges?

@nonkreon
Copy link
Contributor

@asfbhero i solved my problem by opening a ticket with bitmex, apparently something else wrong with my account.

But there's another problem @ctubio , the bot only shorts and never closes the short in xbtusd on bitmex! Even the holdings only show the xbt and not the USD

@nonkreon
Copy link
Contributor

@asfbhero i solved my problem by opening a ticket with bitmex, apparently something else wrong with my account.

But there's another problem @ctubio , the bot only shorts and never closes the short in xbtusd on bitmex! Even the holdings only show the xbt and not the USD

OK apparently it could bid if i pull the TBP limits from 0 to 100, but I still don't understand relative to what the bot takes positions on bitmex, for example when it 'sells' the quote currency stays at 0 and as it buys the base currency stays the same...
from what i figure the only way to use bitmex is to turn technical analysis to manual, turn it off, and just be a hardcore market maker right?

@eniware-org
Copy link

I started to dab into BITFINEX_MARGIN and found this thread. It looks like the margin trading TBP is still a mess... UP!

@ctubio ctubio changed the title Only Limit Order Size To XBT Available On Side With Accumulated Position Bitmex Only Limit Order Size To XBT Available On Side With Accumulated Position Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants