scrtlabs / catalyst

An Algorithmic Trading Library for Crypto-Assets in Python
http://enigma.co
Apache License 2.0
2.49k stars 724 forks source link

Margin Trading in Catalyst - Short Sells practically not possible #415

Open avolution opened 6 years ago

avolution commented 6 years ago

At the Moment when I execute an order lets say

order_target_value(symbol('btc_usd'), -30.0)

It will be executed as an low level exchange order.

This is a problem because in this case Short Positions are not really possible because you have to have an amount of every currency which have pairs in your universe.

Otherwise you will get an exceptions like this: For example: catalyst.exchange.exchange_errors.ExchangeRequestError: Request failed: bitfinex {"message":"Invalid order: not enough exchange balance for -0.00367152 BTCUSD at 8170.0"}

So its not practically posible to use short sells(and related strategies in result).

Is it possible/ planed to switch to margin trading I think ccxt is able to do margin-trading

Margin Trading makes much more sense cause a lot of quant strategies are more related to margin trading with leverage as to low level exchange trading.


I have tested this on Bitfinex Catalyst Version 0.5.18

SOGorman35 commented 6 years ago

according to issue #235, shorting is not yet possible. :(

avolution commented 6 years ago

@SOGorman35 Thanks for the link So its from 16 Feb

@catalyst-support @lenak25 How is the priority for implementing margin-trading? I can provide help for implementing it, if needed.

lenak25 commented 6 years ago

@avolution, we haven't yet started addressing it and will appreciate any contribution. Thanks!

richrines commented 6 years ago

@catalyst-support Curious if this has been started and/or if myself or someone else should lend a hand to start work on it? Thanks!

lenak25 commented 6 years ago

Hi @richrines , we still haven't started addressing it, any contribution will be very much appreciated.

0xDmtri commented 5 years ago

Hi @richrines , we still haven't started addressing it, any contribution will be very much appreciated.

Hi, what's up with shorts now?

avolution commented 5 years ago

@QuantDimension check out -> https://github.com/enigmampc/catalyst/issues/559