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

Missing attributes in the Future(Contract) class #133

Closed
AnAlgoTrader opened this issue Nov 28, 2021 · 2 comments
Closed

Missing attributes in the Future(Contract) class #133

AnAlgoTrader opened this issue Nov 28, 2021 · 2 comments

Comments

@AnAlgoTrader
Copy link

AnAlgoTrader commented Nov 28, 2021

Hi, I tried to subscribe to GLOBEX market data (level 1) by using the request 'reqMktData'.
I got an error as IB is asking for more attributes to be provided. I managed to get it to work by adding 'lastTradeDateOrContractMonth' and 'localSymbol' attributes.

This is the class I ended with, in case you would like to test it.

    class Future implements Contract {
         secType: SecType;
         symbol: string;
         localSymbol: string;
         lastTradeDateOrContractMonth: string;
         exchange: string;
         multiplier: number;
         currency: string;

        constructor(symbol: string, localSymbol: string, lastTradeDateOrContractMonth: string, 
                       exchange: string, multiplier: number, currency: string) {
        this.secType = SecType.FUT;
        this.symbol = symbol;
        this.lastTradeDateOrContractMonth = lastTradeDateOrContractMonth;
        this.localSymbol = localSymbol;
        this.exchange = exchange;
        this.multiplier = multiplier;
        this.currency = currency;
    }
}

Thank you for your hard work!
Great repository.

@mfrener
Copy link
Contributor

mfrener commented Nov 29, 2021

PR is open, thanks!
#134

@Tsopic
Copy link
Member

Tsopic commented Nov 30, 2021

Merged

@Tsopic Tsopic closed this as completed Nov 30, 2021
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

3 participants