Features request on margin trading for crypto brokers

Posted By: Ryu

Features request on margin trading for crypto brokers - 12/07/19 10:42

From the doc, now zorro's crypto brokers plugin(Binance/Bitfinex/Bittrex) doesn't support margin trading.
If this feature can be supported, that will be great to do crypto margin trading using zorro as well.
So convenient to write strategies and do backtest using zorro.
Thanks in advance.

> Only long positions are supported; for short trades the account must already contain a sufficient position of the asset. Otherwise an error message like INSUFFICIENT FUNDS is issued.
Posted By: jcl

Re: Features request on margin trading for crypto brokers - 12/09/19 13:01

I believe that's not an issue of the plugin. It depends on whether your account is set up for margin trading or not.
Posted By: Ryu

Re: Features request on margin trading for crypto brokers - 12/10/19 00:27

Hi, jcl, let me try to describe this problem more clearly.

Now I am using Binance which has 3 trading accounts:
- Spot: its API endpoint for new order is /api/v3/order
- Margin: its API endpoint for new order is /sapi/v1/margin/order
- Futures: its API endpoint for new order is /fapi/v1/order

An API key can be created to trade for all the above 3 accounts via setting its "API restrictions", like:
- "Enable Margin"
- "Enable Future"

I found that the balance displayed in Zorro is only the balance of Spot account and using "TradeTest" Script to test "Buy Short", it will failed with messages:{ "code":-2010,"msg":"Account has insufficient balance for requested action."}.
And I also created separate keys which were only enabled for Spot or Margin or Future trading.
But they are the same. It seems Zorro Binance plugin only support the Spot API, the same with the Binance Zorro plugin' doc:
> Only long positions are supported; for short trades the account must already contain a sufficient position of the asset. Otherwise an error message like INSUFFICIENT FUNDS is issued.

Has Binance Zorro plugin already implemented the Margin API and Futures API?
Thanks.
Posted By: marr

Re: Features request on margin trading for crypto brokers - 12/21/19 11:53

I also confirm this, I tried to use a script with shorting and got the error message stated above, tho there is some weird cases where it does not produce that error when using one `enterShort()` position. My API is already enabled for margin account. As of now I am currently testing margin account with Binance API, haven't yet opened a short trade so I'll get back how it goes, the error message only shows on some random occasions.
Posted By: Petra

Re: Features request on margin trading for crypto brokers - 01/04/20 11:07

Me too. Im trading with Binance and would like to use the new margin account.
Posted By: Aweys

Re: Features request on margin trading for crypto brokers - 01/30/20 09:40

Current Zorro API's do not support margin trading for none of the crypto exchange (Binance, Bittrex, Bitfinex, etc..)
And that is an issue of the plugin's.

Maybe we do have here developers which would be interested in creating plugin's which would support Future or Margin accounts in Bitfinex or any other exchange ?
Posted By: jcl

Re: Features request on margin trading for crypto brokers - 02/11/20 12:11

Ok, margin trading for the cryptocurrency plugins is on our to do list.
Posted By: Grat

Re: Features request on margin trading for crypto brokers - 05/04/20 09:44

I have question,


margin trading is not planned in version 2.26?
Posted By: onoff

Re: Features request on margin trading for crypto brokers - 05/28/20 23:00

excellent, any ETA? and any plans for Futures?
Posted By: jcl

Re: Features request on margin trading for crypto brokers - 06/03/20 08:49

Possibly in the next update, otherwise the next-but-one. And you can already trade crypto futures with IB.
Posted By: onoff

Re: Features request on margin trading for crypto brokers - 06/03/20 22:43

good to hear and thanks for the IB futures reminder
Posted By: Mio

Re: Features request on margin trading for crypto brokers - 06/04/20 06:20

Originally Posted by jcl
Ok, margin trading for the cryptocurrency plugins is on our to do list.


Could you also support Futures trading for Binance?
Posted By: loopiezlol

Re: Features request on margin trading for crypto brokers - 02/23/22 18:19

any updates on supporting margin trading with any crypto plugin? want to register my interest as well
Posted By: AndrewAMD

Re: Features request on margin trading for crypto brokers - 02/23/22 18:30

This is only supported on a plugin-by-plugin basis, and depending on what the broker offers. Many brokers only provide spot trading.

The Kraken plugin supports margin trading, but only when using the SET_LEVERAGE brokerCommand. The crypto futures plugins also support margin since the products are futures.
Posted By: loopiezlol

Re: Features request on margin trading for crypto brokers - 02/24/22 09:11

thanks for the prompt update Andrew - really appreciate it

I did know about the futures possibility, but recently there has been talk in the UK about banning crypto derivatives [1] [2]. margin trading shouldn't be affected by this and that's why I reached out for the update on that specifically

either way - seems it's high time for me to pull the trigger on a Zorro S licence and try out the various crypto brokers plugins available
© 2024 lite-C Forums