stoqey / ibkr

Interactive Brokers wrapper 🚩
MIT License
59 stars 11 forks source link

contract 'right' attribute is always undefined for options #78

Closed wamra closed 2 years ago

wamra commented 2 years ago

Hi, Great work on this project! Thank you for making our lives easier!

I have a tiny bug to report, it seems that the "right" element of a contract is not captured for options. It's supposed to be "C" or "P" not sure if it's an IBKR issue or a library issue.

{
 contract: {
          symbol: 'TSLA',
          secType: 'OPT',
          lastTradeDateOrContractMonth: '20220617',
          strike: 900,
          right: undefined,
          exchange: 'SMART',
          currency: 'USD',
          localSymbol: 'TSLA  220617P00900000',
          tradingClass: 'TSLA',
          conId: 442955799,
          multiplier: 100,
          primaryExch: ''
        }
 }
mfrener commented 2 years ago

This is not a bug this lib, but on the underlying https://github.com/stoqey/ib which has been fixed with https://github.com/stoqey/ib/commit/1c58d285f8b76007b57f96728cdaff510a253fb9 So the solution should be a simple dependecy version bump @ maintainers ;)

wamra commented 2 years ago

Thank you!