createOandaTPSLOrder: Create Stoploss or Takeprofit Order for an Oanda Account

Description Usage Arguments Value Examples

View source: R/OandaOrders.R

Description

Create Stoploss or Takeprofit Order for an Oanda Account

Usage

1
2
createOandaTPSLOrder(ACCOUNT_TYPE, ACCESS_TOKEN, ACCOUNT_ID, TRADEID,
  PRICE = NULL, ORDERTYPE = "TAKE_PROFIT", ...)

Arguments

ACCOUNT_TYPE

"practice", "real" or "sandbox"

ACCESS_TOKEN

The authorization bearer token previously obtained by the client, can be found in oanda environment

ACCOUNT_ID

ID of the Account to create the Order for.

TRADEID

trade id

PRICE

prices to trigger the action

ORDERTYPE

"TAKE_PROFIT", "STOP_LOSS"

Value

A HTTP Response

Examples

1
2
3
4
5
6
7
createOandaTPSLOrder(.oandaEnv$ACCOUNT_TYPE, .oandaEnv$ACCESS_TOKEN, .oandaEnv$ACCOUNT_ID, TRADEID = '1111', PRICE = 1.3475, ORDERTYPE = 'TAKE_PROFIT')
# HTTP 201 – The Order was created as specified
# Response [https://api-fxpractice.oanda.com/v3/accounts/101-011-4686012-003/orders]
# Date: 2016-11-28 11:38
# Status: 201
# Content-Type: application/json
# Size: 775 B

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