Jump to content
Sign in to follow this  
yarane

Failed attempt to place a trade

Recommended Posts

I send to http://ciapipreprod.cityindextest9.co.uk/tradingapi/order/newtradeorder the following Json string: 

{“MarketId”:154287,“Currency”:“GBP”,“AutoRollover”:false,“Direction”:“buy”,“Quantity”:1,“QuoteId”:“20110324-G2PREPROD3-026519”,“BidPrice”:0.8733,“OfferPrice”:0.8735,“AuditId”:“20110324-G2PREPROD3-026519”,“TradingAccountId”:400088018,“IfDone”:null,“Close”:[[]]}

 Server returns HTTP 500 and a message “The server encountered an error processing the request. Please see the server logs for more details”.

What am I doing wrong?

Share this post


Link to post

Don’t populate the quote id with the price audit id. Use the quote when the API previously returned a quote id on a trade request (i.e. because it’s an oversize trade you’re trying to do).

Share this post


Link to post

Don’t populate the quote id with the price audit id. Use the quote when the API previously returned a quote id on a trade request (i.e. because it’s an oversize trade you’re trying to do).

Thanks Timothy. As a matter of fact we tried with blank Quite ID and AuditID in different combinations and still could not make it work. Right now there is no feed so I can not confirm it. Can you turn on the feed?

Share this post


Link to post
Guest sky.sanders

Don’t populate the quote id with the price audit id. Use the quote when the API previously returned a quote id on a trade request (i.e. because it’s an oversize trade you’re trying to do).

@yarane – lack of feed may be due to markets being closed. timothy?

Share this post


Link to post

Don’t populate the quote id with the price audit id. Use the quote when the API previously returned a quote id on a trade request (i.e. because it’s an oversize trade you’re trying to do).

In response to request for new trade I get {“OrderId”:0,“Orders”:

[{“CommissionCharge”:0,“GuaranteedPremium”:0,“IfDone”:null,“OCO”:null,“OrderId”:0,“Price”:0,“Status”:10,“StatusReason”:43}],“Quote”:null,“Status”:2,“StatusReason”:75}

 with a set of statuses and reasons. What do they mean? You described some inhttp://faq.labs.cityindex.com/questions/apitradeorderresponsedto-object-s-fields-values but there is not neither 75 nor 43 reasons there.

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  
×