Description Usage Arguments Value Examples
Create Stoploss or Takeprofit Order for an Oanda Account
1 2 | createOandaTPSLOrder(ACCOUNT_TYPE, ACCESS_TOKEN, ACCOUNT_ID, TRADEID,
PRICE = NULL, ORDERTYPE = "TAKE_PROFIT", ...)
|
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" |
A HTTP Response
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
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.