Beispiel #1
0
class TradeConfirmation(Schema, TradeMixin):
    """ Wrapped in <TradeConfirms> """
    buySell = OneOf("BUY", "BUY (Ca.)", "SELL", "SELL (Ca.)")
    levelOfDetail = OneOf("SYMBOL_SUMMARY", "ORDER", "EXECUTION")
    commissionCurrency = OneOf(*CURRENCY_CODES)
    price = Decimal()
    thirdPartyClearingCommission = Decimal()
    orderID = Decimal()
    allocatedTo = String()
    thirdPartyRegulatoryCommission = Decimal()
    dateTime = DateTime()
    brokerExecutionCommission = Decimal()
    thirdPartyExecutionCommission = Decimal()
    amount = Decimal()
    otherCommission = Decimal()
    commission = Decimal()
    brokerClearingCommission = Decimal()
    ibOrderID = String()
    ibExecID = String()
    execID = String()
    brokerageOrderID = String()
    orderReference = String()
    volatilityOrderLink = String()
    exchOrderId = String()
    extExecID = String()
    # Despite the name, orderTime actually contains both date & time data.
    orderTime = DateTime()
    changeInPrice = Decimal()
    changeInQuantity = Decimal()
    orderType = OneOf("LMT", "MKT", "MOC")
    traderID = String()
    isAPIOrder = Boolean()
Beispiel #2
0
class OpenPosition(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <OpenPositions> """
    reportDate = Date()
    position = Decimal()
    markPrice = Decimal()
    positionValue = Decimal()
    openPrice = Decimal()
    costBasisPrice = Decimal()
    costBasisMoney = Decimal()
    percentOfNAV = Decimal()
    fifoPnlUnrealized = Decimal()
    side = OneOf('Long', 'Short')
    levelOfDetail = OneOf('LOT', 'SUMMARY')
    openDateTime = DateTime()
    holdingPeriodDateTime = DateTime()
    code = List()
    originatingOrderID = String()
    originatingTransactionID = String()
    accruedInt = String()
Beispiel #3
0
class TradeMixin(AccountMixin, CurrencyMixin, SecurityMixin):
    tradeID = String()
    reportDate = Date()
    tradeDate = Date()
    tradeTime = Time()
    settleDateTarget = Date()
    transactionType = OneOf("ExchTrade", "TradeCancel", "FracShare",
                            "FracShareCancel", "TradeCorrect", "BookTrade",
                            "DvpTrade")
    exchange = String()
    quantity = Decimal()
    tradePrice = Decimal()
    tradeMoney = Decimal()
    proceeds = Decimal()
    taxes = Decimal()
    ibCommission = Decimal()
    ibCommissionCurrency = OneOf(*CURRENCY_CODES)
    netCash = Decimal()
    closePrice = Decimal()
    openCloseIndicator = OneOf("O", "C", "C;O")
    notes = List(separator=';')
    cost = Decimal()
    fifoPnlRealized = Decimal()
    fxPnl = Decimal()
    mtmPnl = Decimal()
    origTradePrice = Decimal()
    origTradeDate = Date()
    origTradeID = String()
    origOrderID = String()
    clearingFirmID = String()
    transactionID = String()
    openDateTime = DateTime()
    holdingPeriodDateTime = DateTime()
    whenRealized = DateTime()
    whenReopened = DateTime()
    levelOfDetail = OneOf("EXECUTION", "ORDER", "CLOSED_LOT",
                          "TRADE_TRANSFERS")
Beispiel #4
0
class CorporateAction(Schema, AccountMixin, CurrencyMixin, SecurityMixin):
    """ Wrapped in <CorporateActions> """
    reportDate = Date()
    dateTime = DateTime()
    amount = Decimal()
    proceeds = Decimal()
    value = Decimal()
    quantity = Decimal()
    fifoPnlRealized = Decimal()
    mtmPnl = Decimal()
    code = List()
    type = OneOf("BC", "BM", "CA", "CC", "CD", "CH", "CI", "CO", "CP", "CS",
                 "CT", "DI", "DW", "ED", "FA", "FI", "FS", "GV", "HD", "HI",
                 "IC", "OR", "PI", "PV", "RI", "RS", "SD", "SO", "SR", "TC",
                 "TI", "TO")
Beispiel #5
0
class FxLot(Schema, AccountMixin):
    """ Wrapped in <FxLots> """
    assetCategory = String()
    reportDate = Date()
    functionalCurrency = OneOf(*CURRENCY_CODES)
    fxCurrency = OneOf(*CURRENCY_CODES)
    quantity = Decimal()
    costPrice = Decimal()
    costBasis = Decimal()
    closePrice = Decimal()
    value = Decimal()
    unrealizedPL = Decimal()
    code = List()
    lotDescription = String()
    lotOpenDateTime = DateTime()
    levelOfDetail = OneOf('LOT', 'SUMMARY')
Beispiel #6
0
class Trade(Schema, TradeMixin):
    """ Wrapped in <Trades> """
    buySell = OneOf("BUY", "BUY (Ca.)", "SELL", "SELL (Ca.)")
    ibOrderID = String()
    ibExecID = String()
    brokerageOrderID = String()
    orderReference = String()
    volatilityOrderLink = String()
    exchOrderId = String()
    extExecID = String()
    # Despite the name, orderTime actually contains both date & time data.
    orderTime = DateTime()
    changeInPrice = Decimal()
    changeInQuantity = Decimal()
    orderType = OneOf("LMT", "MKT")
    traderID = String()
    isAPIOrder = Boolean()
Beispiel #7
0
class FlexStatement(Schema):
    accountId = String()
    fromDate = Date()
    toDate = Date()
    period = String()
    whenGenerated = DateTime()