OrderDetails

class oandapyV20.endpoints.orders.OrderDetails(accountID, orderID)

Bases: oandapyV20.endpoints.orders.Orders

Get details for a single Order in an Account.

ENDPOINT = 'v3/accounts/{accountID}/orders/{orderID}'
EXPECTED_STATUS = 200
METHOD = 'GET'
__init__(accountID, orderID)

Instantiate an OrderDetails request.

Parameters:
  • accountID (string (required)) – id of the account to perform the request on.
  • orderID (string (required)) – id of the order to perform the request on.
>>> import oandapyV20
>>> import oandapyV20.endpoints.orders as orders
>>> client = oandapyV20.API(access_token=...)
>>> r = orders.OrderDetails(accountID=..., orderID=...)
>>> client.request(r)
>>> print r.response

Output:

{
  "order": {
    "partialFill": "DEFAULT_FILL",
    "price": "1.20000",
    "stopLossOnFill": {
      "timeInForce": "GTC",
      "price": "1.22000"
    },
    "timeInForce": "GTC",
    "createTime": "2016-10-25T21:07:21.065554321Z",
    "triggerCondition": "TRIGGER_DEFAULT",
    "positionFill": "POSITION_DEFAULT",
    "id": "2309",
    "instrument": "EUR_USD",
    "state": "PENDING",
    "units": "-100",
    "type": "LIMIT"
  },
  "lastTransactionID": "2309"
}