Jump to content
motown69

Error Code in Live Account

Recommended Posts

Hi Can you Help....

I have a scenario where i have been trading on a Demo account fine.  When attempting to trade on a Live account I get the following error code.:

160 - Market unavailable due to local regulations or account restrictions.

I have spoken to the api support team and they have checked my account and cannot see any restrictions.  The Balance on my account is over the required £5K

Are you able to advise what else may cause this error:

This is the response i get when attempting to place a trade:

{
   "Status":2,
   "StatusReason":75,
   "OrderId":0,
   "Orders":[
      {
         "OrderId":0,
         "StatusReason":160,
         "Status":10,
         "OrderTypeId":1,
         "Price":0.0,
         "Quantity":61625.0,
         "TriggerPrice":0.0,
         "CommissionCharge":0.0,
         "IfDone":[
            {
               "Stop":{
                  "OrderId":0,
                  "StatusReason":160,
                  "Status":10,
                  "OrderTypeId":2,
                  "Price":0.0,
                  "Quantity":61625.0,
                  "TriggerPrice":1.20731,
                  "CommissionCharge":0.0,
                  "IfDone":[
                     
                  ],
                  "GuaranteedPremium":0.0,
                  "OCO":null,
                  "AssociatedOrders":{
                     "Stop":null,
                     "Limit":null
                  },
                  "Associated":false
               },
               "Limit":{
                  "OrderId":0,
                  "StatusReason":160,
                  "Status":10,
                  "OrderTypeId":3,
                  "Price":0.0,
                  "Quantity":61625.0,
                  "TriggerPrice":1.20831,
                  "CommissionCharge":0.0,
                  "IfDone":[
                     
                  ],
                  "GuaranteedPremium":0.0,
                  "OCO":null,
                  "AssociatedOrders":{
                     "Stop":null,
                     "Limit":null
                  },
                  "Associated":false
               }
            }
         ],
         "GuaranteedPremium":0.0,
         "OCO":null,
         "AssociatedOrders":{
            "Stop":null,
            "Limit":null
         },
         "Associated":false
      }
   ],
   "Quote":null,
   "Actions":[
      
   ],
   "ErrorMessage":null
}

 

Many Thanks

 

 

Share this post


Link to post

Hi Motown,

I've seen this error occur a few times before in the past. In all cases, it is because of the reason stated in the error message: an attempt is made to trade a market that is not available to that account.

For example, if you have a Spreadbet only account and accidentally attempt to trade the CFD version of a market instead of the spreadbet. I suggest using the ListMarketSearch call to find the market you are attemtpting to trade. The search response contains the MarketId, which you use in your trade request. This should ensure you are only using valid MarketIDs.

Kind Regards, PM

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
×