Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should bdit() have an overrides parameter? #40

Open
DS-London opened this issue Feb 22, 2024 · 1 comment
Open

Should bdit() have an overrides parameter? #40

DS-London opened this issue Feb 22, 2024 · 1 comment

Comments

@DS-London
Copy link

The signature for bdit() is (from the docs):

bdit(security: str, event_types: Sequence[str], start_datetime: str, end_datetime: str, overrides: Sequence | None = None, options: Dict | None = None) → DataFrame

However the IntradayTickRequest schema (added at the end of this note), does not have an overrides ELEMENT (unlike HistoricalDataRequest which does). If an overrides parameter is supplied to bdit() this error occurs:

NotFoundException: Attempt to access unknown sub-element 'overrides' on element 'IntradayTickRequest'

Unless I am missing something, perhaps the signature could be changed?

ELEMENT IntradayTickRequest {
    DESCRIPTION 
    MIN VALUES 1
    MAX VALUES 1
    TYPE IntradayTickRequest (SEQUENCE) {
        DESCRIPTION seqIntradayTickRequest
        ELEMENT security {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE STRING
        }
        ELEMENT startDateTime {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE DATETIME
        }
        ELEMENT endDateTime {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE DATETIME
        }
        ELEMENT eventTypes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 18446744073709551615
            TYPE EventType(ENUMERATION)  [] {
                DESCRIPTION 
                EventType(STRING) {
                    TRADE
                    BID
                    ASK
                    BID_BEST
                    ASK_BEST
                    BID_YIELD
                    ASK_YIELD
                    MID_PRICE
                    AT_TRADE
                    BEST_BID
                    BEST_ASK
                    SETTLE
                }
            }
        }
        ELEMENT includeConditionCodes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeNonPlottableEvents {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeExchangeCodes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT returnEids {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeBrokerCodes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeRpsCodes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT maxDataPoints {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE INT32
        }
        ELEMENT includeBicMicCodes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT forcedDelay {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeSpreadPrice {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeYield {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeActionCodes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeIndicatorCodes {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeTradeTime {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeUpfrontPrice {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeEqRefPrice {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT adjustmentNormal {
            DESCRIPTION Adjust historical pricing to reflect: Regular Cash, Interim, 1st Interim, 2nd Interim, 3rd Interim, 4th
                        Interim, 5th Interim, Income, Estimated, Partnership Distribution, Final, Interest on Capital, 
                        Distribution, Prorated.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT adjustmentAbnormal {
            DESCRIPTION Adjust historical pricing to reflect: Special Cash, Liquidation, Capital Gains, Long-Term Capital Gains, 
                         Short-Term Capital Gains, Memorial, Return of Capital, Rights Redemption, Miscellaneous, Return 
                         Premium, Preferred Rights Redemption, Proceeds/Rights, Proceeds/Shares, Proceeds/Warrants.
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT adjustmentSplit {
            DESCRIPTION Adjust historical pricing and/or volume to reflect: Spin-Offs, Stock Splits/Consolidations, Stock 
                         Dividend/Bonus, Rights Offerings/Entitlement.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT adjustmentFollowDPDF {
            DESCRIPTION Adjust historical pricing and/or volume as per user's DPDF screen
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeClientSpecificFields {
            DESCRIPTION option to retrieve custom fields for new XDF source for currency trades: 
                   ClientDomicile
                   ClientSegment
                   ClientSubsegment
                   ClientIdentifier
                   Direction
                   TradeId
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeTradeId {
            DESCRIPTION option to retrieve unique identifier for a trade event.                
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT maxDataPointsOrigin {
            DESCRIPTION 
            MIN VALUES 0
            MAX VALUES 1
            TYPE DataPointsOrigin(ENUMERATION) {
                DESCRIPTION 
                DataPointsOrigin(STRING) {
                    AT_END_TIME
                    AT_START_TIME
                }
            }
        }
        ELEMENT filter {
            DESCRIPTION format example: "size>10 && cc=ob"
            MIN VALUES 0
            MAX VALUES 1
            TYPE STRING
        }
        ELEMENT includeTradeDate {
            DESCRIPTION option to retrieve the date of the trade.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeDirtyTicks {
            DESCRIPTION option to retrieve ticks that had been subsequently cancelled or amended.  Return cancelledFlag, correctionFlag, and nativeTradeId.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeSubSecondTimestamps {
            DESCRIPTION option to retrieve sub-second timestamps - where available 
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeBloombergStandardConditionCodes {
            DESCRIPTION option to retrieve the Bloomberg Standard Condition Codes. Return bloombergStandardConditionCodes.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeMarketModelTypology {
            DESCRIPTION option to retrieve the Market Model Typology trade type, where available. Return marketModelTypology.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeNativeTradeId {
            DESCRIPTION option to retrieve he Trade Aggressor. Return tradeAggressor.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeAggressor {
            DESCRIPTION option to the Market Model Typology trade type, where available. Return marketModelTypology.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeSecurityStatusEvents {
            DESCRIPTION option to retrieve trading phase, suspension status and auction status changes. Return tradingPhase, suspensionState, auctionState and simplifiedState.
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT includeESMATradeFlag {
            DESCRIPTION option to retrieve ESMA Trade flag. Return ESMATradeFlag
            
            MIN VALUES 0
            MAX VALUES 1
            TYPE BOOL
        }
        ELEMENT filters {
            DESCRIPTION define intraday tick request FDM filter.
            
            MIN VALUES 0
            MAX VALUES 18446744073709551615
            TYPE FDMFilterType (SEQUENCE)  [] {
                DESCRIPTION 
                ELEMENT filterName {
                    DESCRIPTION name of the filter: have to be unique, e.g. "filter_0"
                    MIN VALUES 0
                    MAX VALUES 1
                    TYPE STRING
                }
                ELEMENT fieldId {
                    DESCRIPTION ticker plant FDM field ID string:e.g. "EVENT_PRICE"
                    MIN VALUES 0
                    MAX VALUES 1
                    TYPE STRING
                }
                ELEMENT filterRule {
                    DESCRIPTION rule apply on this field: e.g. "[10.5, 11.5]"
                    MIN VALUES 0
                    MAX VALUES 1
                    TYPE STRING
                }
            }
        }
    }
} 
@matthewgilbert
Copy link
Owner

Ahh good catch. This is just an oversight on my part. Happy to take a PR on this, it would probably also make sense to remove from create_intraday_tick_query

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants