Description Usage Arguments Value Examples
Closes one or more OTC positions
1 2 3 4 | IG_close_open_pos(headers,
url = "https://demo-api.ig.com/gateway/deal/positions/otc", deal_id = "",
direction, epic, expiry = "-", level = "", timeInForce = "",
order_type = "MARKET", quote_id = "", size, timeo = 5)
|
headers |
Object returned from |
url |
API URL |
deal_id |
Deal identifier |
direction |
Deal direction ('BUY' or 'SELL') |
epic |
Instrument epic identifier |
expiry |
Instrument expiry |
level |
Closing deal level |
order_type |
'LIMIT', 'MARKET', 'QUATE' |
quote_id |
Lightstreamer price quote identifier |
size |
Deal size |
timeo |
number of tries |
A data.frame
Close position response
1 2 | HEADERS = IG_Auth(" ","APIdemo1", " ")
IG_close_open_pos(headers = HEADERS, direction = 'BUY', epic = 'CS.D.AUDCAD.CFD.IP', size = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.