GetAllOpenOrders¶
-
class
saxo_openapi.endpoints.portfolio.orders.
GetAllOpenOrders
(params=None)¶ all the open orders on an account or a client.
-
ENDPOINT
= 'openapi/port/v1/orders/'¶
-
EXPECTED_STATUS
= 200¶
-
METHOD
= 'GET'¶
-
__init__
(params=None)¶ Instantiate a GetAllOpenOrders request.
Parameters: params (dict (optional)) – dict representing the querystring parameters >>> import saxo_openapi >>> import saxo_openapi.endpoints.portfolio as pf >>> import json >>> client = saxo_openapi.API(access_token=...) >>> params = { "ClientKey": "Cf4xZWiYL6W1nMKpygBLLA==" }
>>> r = pf.orders.GetAllOpenOrders(params=params) >>> client.request(r) >>> print(json.dumps(r.response, indent=2))
Output:
{ "__count": 3, "Data": [ { "AccountId": "9226397", "AccountKey": "Cf4xZWiYL6W1nMKpygBLLA==", "Amount": 100000, "AssetType": "FxSpot", "BuySell": "Buy", "CalculationReliability": "Ok", "ClientKey": "Cf4xZWiYL6W1nMKpygBLLA==", "CorrelationKey": "925ab7aa-998b-4f4b-af26-7c1b3f4eee27", "CurrentPrice": 7.46175, "CurrentPriceDelayMinutes": 0, "CurrentPriceType": "Ask", "DistanceToMarket": 0.46175, "Duration": { "DurationType": "GoodTillCancel" }, "IsMarketOpen": false, "MarketPrice": 7.46175, "OpenOrderType": "Limit", "OrderAmountType": "Quantity", "OrderId": "76332324", "OrderRelation": "StandAlone", "OrderTime": "2019-03-07T14:54:17.423333Z", "Price": 7, "RelatedOpenOrders": [], "Status": "Working", "Uic": 16 }, { "AccountId": "9226397", "AccountKey": "Cf4xZWiYL6W1nMKpygBLLA==", "Amount": 100000, "AssetType": "FxSpot", "BuySell": "Buy", "CalculationReliability": "Ok", "ClientKey": "Cf4xZWiYL6W1nMKpygBLLA==", "CorrelationKey": "e684a2e2-f9f9-4b10-91ad-a50e2f8b80ae", "CurrentPrice": 7.46175, "CurrentPriceDelayMinutes": 0, "CurrentPriceType": "Ask", "DistanceToMarket": 0.46175, "Duration": { "DurationType": "GoodTillCancel" }, "IsMarketOpen": false, "MarketPrice": 7.46175, "OpenOrderType": "Limit", "OrderAmountType": "Quantity", "OrderId": "76328908", "OrderRelation": "StandAlone", "OrderTime": "2019-03-07T12:04:13.493333Z", "Price": 7, "RelatedOpenOrders": [], "Status": "Working", "Uic": 16 }, { "AccountId": "9226397", "AccountKey": "Cf4xZWiYL6W1nMKpygBLLA==", "Amount": 10000, "AssetType": "FxSpot", "BuySell": "Buy", "CalculationReliability": "Ok", "ClientKey": "Cf4xZWiYL6W1nMKpygBLLA==", "CorrelationKey": "ec6ca0f4-8380-4068-a32d-538b7b06208e", "CurrentPrice": 1.30179, "CurrentPriceDelayMinutes": 0, "CurrentPriceType": "Ask", "DistanceToMarket": 0.20179, "Duration": { "DurationType": "GoodTillCancel" }, "IsMarketOpen": false, "MarketPrice": 1.30179, "OpenOrderType": "Limit", "OrderAmountType": "Quantity", "OrderId": "76289260", "OrderRelation": "StandAlone", "OrderTime": "2019-03-04T17:55:59.503333Z", "Price": 1.1, "RelatedOpenOrders": [], "Status": "Working", "Uic": 31 } ] }
-
expected_status
¶
-
response
¶ response - get the response of the request.
-
status_code
¶
-