Back

Invalid Message: Insufficient buying power to complete order

Hello Community!  I am in need of some help.  I have researched this issue and attempted my due diligence, although I am not a programmer by any means.  Can anyone point me in the right direction on identifying and solving the following issue...

I am live trading on GDAX, using the python library.  After about an hour of trading, I begin to receive this error:  "New Order Event: Time: 2/18/2018 3:28:00 PM OrderID: 124 Symbol: BTCUSD Status: Invalid Message: Insufficient buying power to complete order".  At that point, the system continues to attempt a limitorder short/sell and it breaks the system and all trading stops.  I am test trading on a 10% of my portfolio algo, so I have a total portfolio value 90% unused during the whole algo.  The algo generally works without issue for the first hour or so.  Any help would be greatly appreciated!

Here is a list of the message errors:

2018-02-18 15:28:00 :

Limit Order: -0.01962778000000000000000 coins @ $10855.35 per coin

2018-02-18 15:28:00 :

New Order Event: Time: 2/18/2018 3:28:00 PM OrderID: 124 Symbol: BTCUSD Status: Invalid Message: Insufficient buying power to complete order

2018-02-18 15:28:00 :

New Order Event: Time: 2/18/2018 3:28:00 PM OrderID: 124 Symbol: BTCUSD Status: Invalid Message: Insufficient buying power to complete order

2018-02-18 15:29:00 :

Order Error: id: 125, Insufficient buying power to complete order (Value:-213.4776).

2018-02-18 15:29:00 :

Limit Order: -0.019627780000000000000000 coins @ $10876.3 per coin

2018-02-18 15:29:00 :

New Order Event: Time: 2/18/2018 3:29:00 PM OrderID: 125 Symbol: BTCUSD Status: Invalid Message: Insufficient buying power to complete order

Update Backtest








Attached is my sterilized code.  This only happens during live trading on GDAX.

0


Check out this post to check for limit? Or search in the forum, there are more feeds. JoshuaGardner posted the same, maybe he resolved it?

https://www.quantconnect.com/forum/discussion/381/how-do-i-check-buying-power
0

Thanks Quant Trader!  I did review that post a few days ago and it has some slight connection, but the issue I believe is resolved, in that situation, by cancelling orders that did not fill and were hanging.  In my case, all unfilled orders are cancelled before attempting to initiate an order.  There was another thread with similiar issue as mine, but they were unable to provide their algo and therefore they stopped responding to the community.

0

You are welcome. I believe helping out and sharing algos would increase learning. The topics on Quantopian are quite sophisticated and in general there is also not a lot of sharing. I am trying to help a bit around and to see who is willing to share and collaborate. You see a lot of bitcoin traders now. Let me know if yours is succesfully backtested. I have no idea on bitcoin trading. Are orders all fullfilled ? I hear collegues that sometimes there is so much volatilty that trading / logging in is not possible.

0

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