IG_close_open_pos: IG API Closes one or more OTC positions

Description Usage Arguments Value Examples

View source: R/IGAPI.R

Description

Closes one or more OTC positions

Usage

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)

Arguments

headers

Object returned from IG_Auth

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

Value

A data.frame Close position response

Examples

1
2
HEADERS = IG_Auth(" ","APIdemo1", " ")
IG_close_open_pos(headers = HEADERS, direction = 'BUY', epic = 'CS.D.AUDCAD.CFD.IP', size = 1)

ivanliu1989/RQuantAPI documentation built on Sept. 13, 2019, 11:54 a.m.