Opening a Position

5 posts / 0 new
Last post
LB
Opening a Position

Hi all,

I'm just trying to get the hang of automated trades and opening orders to start with. Is there a standard syntax for placing a market order?

Using the OTC position function in REST I have input the following.
{"currencyCode":"AUD","epic":"CS.D.GBPEUR.CFD.IP","expiry":"DFB","direction":"BUY","size":"3","forceOpen":false,"guaranteedStop":false,"orderType":"MARKET"}

The output states success, however the order is rejected. For what reason is it rejected? The size and expiry don't seem to translate over to the confirmation.

CONFIRMS - value: {"direction":"BUY","epic":"CS.D.GBPEUR.CFD.IP","stopLevel":null,"limitLevel":null,"dealReference":"UBVU8M5T78GL4TP","dealId":"DIAAAAA2FXHVUAR","limitDistance":null,"stopDistance":null,"expiry":null,"affectedDeals":[],"dealStatus":"REJECTED","guaranteedStop":false,"trailingStop":false,"level":null,"reason":"CONTACT_SUPPORT_INSTRUMENT_ERROR","status":null,"size":null,"profit":null,"profitCurrency":null,"date":"2016-10-06T13:29:54.085"}

Any help would be great!.

Thanks,

LB

APItrader
> "reason":"CONTACT_SUPPORT

> "reason":"CONTACT_SUPPORT_INSTRUMENT_ERROR"

Did you try contacting support?

LB
Thanks APItrader. I've

Thanks APItrader. I've emailed them now and will await their response. Cheers.

Chris
CONTACT_SUPPORT_INSTRUMENT_ERROR

Hi,

The error: ' CONTACT_SUPPORT_INSTRUMENT_ERROR 'refers to the currency specified on the request does match one of the allowed trade currencies. With that in mind you can find out the trade currencies on the market details endpoints.

I hope that helps.

Chris

star_wibble
CONTACT_SUPPORT_INSTRUMENT_ERROR

Chris,

Always good to see you getting stuck in and helping people. Could I suggest you ask the dev team to update the error message? It would make more sense than the current one.

Cheers,

James

Log in or register to post comments