orionapi 0.2.2__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__version__ = '0.2.
|
|
1
|
+
__version__ = '0.2.4'
|
|
2
2
|
|
|
3
3
|
import requests
|
|
4
4
|
import tabulate
|
|
@@ -245,7 +245,7 @@ class EclipseAPI(object):
|
|
|
245
245
|
"expirationTypeId": expire_type,
|
|
246
246
|
"expirationValue": expire_value,
|
|
247
247
|
"toleranceValue": expire_trans_tol,
|
|
248
|
-
"description":
|
|
248
|
+
"description": description,
|
|
249
249
|
"percentCalculationTypeId": percent_calc_type,
|
|
250
250
|
})
|
|
251
251
|
return res.json()
|
|
@@ -257,3 +257,9 @@ class EclipseAPI(object):
|
|
|
257
257
|
def get_account_cash_available(self,internal_id):
|
|
258
258
|
res = self.get_account_details(internal_id)
|
|
259
259
|
return res['summarySection']['cashAvailable']
|
|
260
|
+
|
|
261
|
+
def get_orders(self):
|
|
262
|
+
return self.api_request(f"{self.base_url}/tradeorder/trades?isPending=false").json()
|
|
263
|
+
|
|
264
|
+
def get_orders_pending(self):
|
|
265
|
+
return self.api_request(f"{self.base_url}/tradeorder/trades?isPending=true").json()
|