Jump to content
Sign in to follow this  
JoelD311

StatusReason 30 - Cannot place short order

Recommended Posts

I am attempting to place a trade with an API enabled practice account. I am getting StatusReason 30. It doesn't make sense because I can log into the same account via web browser and place a short trade there, but not via the API.

Request:

{"MarketId":401166447,"Currency":null,"AutoRollover":null,"Direction":"buy","Quantity":0.0,"QuoteId":null,"PositionMethodId":null,"BidPrice":1.10894,"OfferPrice":1.10906,"AuditId":null,"TradingAccountId":"[RedactedForForumTopic]","IfDone":{"Stop":{"ExpiryDateTimeUTC":null,"Applicability":null,"ParentOrderId":null,"Associated":null,"Guaranteed":false,"OrderId":null,"TriggerPrice":1.10944,"Quantity":0.0,"TrailingDistance":null},"Limit":null},"Close":null,"isTrade":true,"PriceTolerance":1}

Response:

{"Status":4,"StatusReason":30,"OrderId":0,"ErrorMessage":null}

Per reference, StatusReason 30 is "Cannot open a new short position as the market is currently set to Long Only."

Will you please explain why this is happening?

Share this post


Link to post
40 minutes ago, JoelD311 said:

I am attempting to place a trade with an API enabled practice account. I am getting StatusReason 30. It doesn't make sense because I can log into the same account via web browser and place a short trade there, but not via the API.

Request:

{"MarketId":401166447,"Currency":null,"AutoRollover":null,"Direction":"buy","Quantity":0.0,"QuoteId":null,"PositionMethodId":null,"BidPrice":1.10894,"OfferPrice":1.10906,"AuditId":null,"TradingAccountId":"[RedactedForForumTopic]","IfDone":{"Stop":{"ExpiryDateTimeUTC":null,"Applicability":null,"ParentOrderId":null,"Associated":null,"Guaranteed":false,"OrderId":null,"TriggerPrice":1.10944,"Quantity":0.0,"TrailingDistance":null},"Limit":null},"Close":null,"isTrade":true,"PriceTolerance":1}

Response:

{"Status":4,"StatusReason":30,"OrderId":0,"ErrorMessage":null}

Per reference, StatusReason 30 is "Cannot open a new short position as the market is currently set to Long Only."

Will you please explain why this is happening?

 

I have resolved this. I realized that my Quantity was set to 0.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×