Back

Live trading GDAX

I get this error when placing a market order through the QC UI:

Brokerage Warning: Order failed, Order Id: 1 timestamp: 12/24/2017 11:42:56 PM quantity: 0.004 content: {"message":"Margin currently not available for BTC-USD"}

I do have cash to cover 0.004 BTC... Any suggestions would be appreciated

Update Backtest








See the example BTC algorithm and the one we provided when launching BTC,

they both show how to set the margin model appropriately.
0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Sorry Jared, I don't see the specifc example you are referring to. Is it in the Lean solution?

0

I think you meant this?

SetBrokerageModel(BrokerageName.GDAX, AccountType.Cash)
0

The docs show a little on how you can set leverage when using AddX(). You an also use it on an asset after the fact like so.

With universes(coarse/fine) managing assets, you can use self.UniverseSettings.Leverage as seen here.

To understand what SetBrokerageModel is doing, you can read about that here. You will need AccountType set to Margin. Once you have the margin account being modeled, you can mess with leverage over 1, or the value that you set per asset/universe.

1

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed