Description Usage Arguments Value Examples
Close out a Oanda Position
1 2 | createOandaPositionClose(ACCOUNT_TYPE, ACCESS_TOKEN, ACCOUNT_ID,
INSTRUMENTS = "AUD_USD", LONGUNITS = NULL, SHORTUNITS = NULL)
|
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. |
INSTRUMENTS |
Instrument to get candlestick data for e.g. "AUD_USD" |
LONGUNITS |
Number of units of the instrument to be executed, 'ALL' or numbers |
SHORTUNITS |
Number of units of the instrument to be executed |
A HTTP Response
1 2 3 4 5 6 7 | createOandaPositionClose(.oandaEnv$ACCOUNT_TYPE, .oandaEnv$ACCESS_TOKEN, .oandaEnv$ACCOUNT_ID, INSTRUMENTS = 'AUD_USD', LONGUNITS = 'ALL')
# 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.