OrdersPending¶
-
class
oandapyV20.endpoints.orders.
OrdersPending
(accountID)¶ Bases:
oandapyV20.endpoints.orders.Orders
List all pending Orders in an Account.
-
ENDPOINT
= 'v3/accounts/{accountID}/pendingOrders'¶
-
EXPECTED_STATUS
= 200¶
-
METHOD
= 'GET'¶
-
__init__
(accountID)¶ Instantiate an OrdersPending request.
Parameters: accountID (string (required)) – id of the account to perform the request on. Example:
>>> import oandapyV20 >>> import oandapyV20.endpoints.orders as orders >>> client = oandapyV20.API(access_token=...) >>> r = orders.OrdersPending(accountID) >>> client.request(r) >>> print r.response
Output:
{ "orders": [ { "partialFill": "DEFAULT_FILL", "price": "1.20000", "stopLossOnFill": { "timeInForce": "GTC", "price": "1.22000" }, "timeInForce": "GTC", "clientExtensions": { "comment": "myComment", "id": "myID" }, "id": "2304", "triggerCondition": "TRIGGER_DEFAULT", "positionFill": "POSITION_DEFAULT", "createTime": "2016-10-24T21:48:18.593753865Z", "instrument": "EUR_USD", "state": "PENDING", "units": "-100", "type": "LIMIT" } ], "lastTransactionID": "2305" }
-