示例#1
0
 def invstmttrnrq(
     self,
     acctid: str,
     brokerid: str,
     dtstart: Optional[datetime.datetime] = None,
     dtend: Optional[datetime.datetime] = None,
     inctran: bool = True,
     incoo: bool = False,
     dtasof: Optional[datetime.datetime] = None,
     incpos: bool = True,
     incbal: bool = True,
 ) -> INVSTMTTRNRQ:
     """Construct INVSTMTRQ; package in INVSTMTTRNRQ"""
     acct = INVACCTFROM(acctid=acctid, brokerid=brokerid)
     if inctran:
         inctran_: Optional[INCTRAN] = INCTRAN(dtstart=dtstart,
                                               dtend=dtend,
                                               include=inctran)
     else:
         inctran_ = None
     incpos_ = INCPOS(dtasof=dtasof, include=incpos)
     stmtrq = INVSTMTRQ(
         invacctfrom=acct,
         inctran=inctran_,
         incoo=incoo,
         incpos=incpos_,
         incbal=incbal,
     )
     trnuid = self.uuid
     return INVSTMTTRNRQ(trnuid=trnuid, invstmtrq=stmtrq)
示例#2
0
 def invstmttrnrq(
     self,
     acctid,
     brokerid,
     dtstart=None,
     dtend=None,
     inctran=True,
     incoo=False,
     dtasof=None,
     incpos=True,
     incbal=True,
 ):
     """ Construct INVSTMTRQ; package in INVSTMTTRNRQ """
     acct = INVACCTFROM(acctid=acctid, brokerid=brokerid)
     if inctran:
         inctran = INCTRAN(dtstart=dtstart, dtend=dtend, include=inctran)
     incpos = INCPOS(dtasof=dtasof, include=incpos)
     stmtrq = INVSTMTRQ(
         invacctfrom=acct, inctran=inctran, incoo=incoo, incpos=incpos, incbal=incbal
     )
     trnuid = self.uuid
     return INVSTMTTRNRQ(trnuid=trnuid, invstmtrq=stmtrq)
示例#3
0
 def aggregate(cls):
     return INCPOS(dtasof=datetime(2009, 11, 22, tzinfo=UTC), include=True)