erdewit / ib_insync

Python sync/async framework for Interactive Brokers API
BSD 2-Clause "Simplified" License
2.8k stars 743 forks source link

HK structured products #603

Closed jacxia81 closed 1 year ago

jacxia81 commented 1 year ago

Hello,

I'm looking for ways to implement something for HK structured products. In IB the contract type = 'IOPT'. I cannot find the equivalent in ib-insync. Please kindly advise. Thank you

Best regards

Jason

Below is from TWS API official page:

Dutch Warrants and Structured Products To unambiguously define a Dutch Warrant or Structured Product (IOPTs) the conId or localSymbol field must be used. It is important to note that if reqContractDetails is used with an incompletely-defined IOPT contract definition, that thousands of results can be returned and the API connection broken. IOPT contract definitions will often change and it will be necessary to restart TWS or IB Gateway to download the new contract definition. 1 contract = Contract() 2 contract.localSymbol = "B881G" 3 contract.secType = "IOPT" 4 contract.exchange = "SBF" 5 contract.currency = "EUR"

jacxia81 commented 1 year ago

no need to have a specific class on it, issue closed