@@ -577,7 +577,9 @@ class _ACCOUNT(_CSTRUCT):
577
577
_fields_ = [("Balance" , ctypes .c_double ),
578
578
("FrozenBalance" , ctypes .c_double ),
579
579
("Stocks" , ctypes .c_double ),
580
- ("FrozenStocks" , ctypes .c_double )]
580
+ ("FrozenStocks" , ctypes .c_double ),
581
+ ("Equity" , ctypes .c_double ),
582
+ ("UPnL" , ctypes .c_double )]
581
583
582
584
class _ASSET (_CSTRUCT ):
583
585
_fields_ = [("Currency" , ctypes .c_char * 31 ),
@@ -843,7 +845,10 @@ def GetRecords(self, symbol='', period=-1, limit=0):
843
845
if len (c ) > self .maxBarLen :
844
846
c .pop (0 )
845
847
preTime = t
846
- return MyList (self .records_cache [k ])
848
+ r = MyList (self .records_cache [k ])
849
+ if limit > 0 :
850
+ r = r [- limit :]
851
+ return r
847
852
elif ret == API_ERR_FAILED :
848
853
return None
849
854
EOF ()
@@ -1415,7 +1420,7 @@ def __init__(self, task = None, autoRun=False, gApis = None, progressCallback=No
1415
1420
js = os .path .join (tmpCache , crcFile )
1416
1421
if os .path .exists (js ):
1417
1422
b = open (js , 'rb' ).read ()
1418
- if os .getenv ("BOTVS_TASK_UUID" ) is None or "1678d3c94a2aaed51284a6da2796e646 " in str (b ):
1423
+ if os .getenv ("BOTVS_TASK_UUID" ) is None or "13fd65e98fd0cf8f37fab4b0c79a76f9 " in str (b ):
1419
1424
hdic = json_loads (b )
1420
1425
loader = os .path .join (tmpCache , soName )
1421
1426
update = False
0 commit comments