Jump to content
  • 0

Place 'MARKET' order with IG-API


AlgoTrader

Question

Is there any way to place market order using API?

I get this error when I follow IG-documentation on placing market order:

 

currency_code = "USD"
direction = "BUY"
epic = "CS.D.BITCOIN.CFD.IP"
order_type = "MARKET"
expiry = "-"
guaranteed_stop = False

---------------------------

error message:

    raise IGException(response.text)
trading_ig.rest.IGException: {"errorCode":"invalid.request.type"}

----------------------------

Is there something I'm missing here?

For me the only thing working is order_type = 'BUY'

 

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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
×
×
  • Create New...