stoqey / ibkr

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

getContractDetails should be able to deliver several contracts #19

Closed krambox closed 4 years ago

krambox commented 4 years ago

With getContractDetails it is currently not possible to deliver multiple ContractDetails like an option chain.

{
  currency: 'USD',
  exchange: 'SMART',
  //expiry: '202007',
  multiplier: 100,
  right: 'C',
  secType: 'OPT',
  strike: 300,
  symbol: 'AAPL'
}

Currently this query returns 16 options in the TWS API but getContractDetails returns only one of them.

krambox commented 4 years ago

Yes, now get several options. You guys changed that incredibly quickly. But you changed the signature of the method getContractDetails. This is OK for me, but I hope this doesn't cause problems in other places.

ceddybi commented 4 years ago

@krambox #21 with this one, you can receive object or array depending on arguments passed,